diff options
41 files changed, 190 insertions, 119 deletions
@@ -31,10 +31,14 @@ sync_translations: check_layouts: python check_layout.py $(wildcard res/xml/*.xml) > check_layout.output +gen_layouts: + python gen_layouts.py + # Will modify the source tree. -runtest: rebuild_special_font sync_translations check_layouts +runtest: rebuild_special_font sync_translations check_layouts gen_layouts -.PHONY: release debug installd clean rebuild_special_font check_layouts sync_translations runtest +.PHONY: release debug installd clean rebuild_special_font check_layouts \ + sync_translations runtest gen_layouts $(shell mkdir -p _build) diff --git a/gen_layouts.py b/gen_layouts.py new file mode 100644 index 0000000..2b86883 --- /dev/null +++ b/gen_layouts.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# Generates the list of layouts in res/values/layouts.xml from the layout files +# in res/xml. Every layouts must have a 'name' attribute to be listed. + +import itertools as it +import sys, os, glob +import xml.etree.ElementTree as XML + +# Layouts first in the list (these are the programming layouts). Other layouts +# are sorted alphabetically. +FIRST_LAYOUTS = [ "latn_qwerty_us", "latn_colemak", "latn_dvorak" ] + +# Read a layout from a file. Returns [None] if [fname] is not a layout. +def read_layout(fname): + root = XML.parse(fname).getroot() + if root.tag != "keyboard": + return None + return { "name": root.get("name") } + +# Yields the id (based on the file name) and the display name for every layouts +def read_layouts(files): + for layout_file in files: + layout_id, _ = os.path.splitext(os.path.basename(layout_file)) + layout = read_layout(layout_file) + if layout == None: + print("Not a layout file: %s" % layout_file) + elif layout["name"] == None: + print("Layout doesn't have a name: %s" % layout_id) + else: + yield (layout_id, layout["name"]) + +# Sort layouts alphabetically, except for layouts in FIRST_LAYOUTS, which are +# placed at the top. +# Returns a list. 'layouts' can be an iterator. +def sort_layouts(layouts): + layouts = dict(layouts) + head = [ (lid, layouts.pop(lid)) for lid in FIRST_LAYOUTS ] + return head + sorted(layouts.items()) + +# Write the XML arrays used in the preferences. +def generate_arrays(out, layouts): + def add_items(parent, strings): + for s in strings: + item = XML.Element("item") + item.text = s + parent.append(item) + none_item = [ ("none", "None") ] + custom_item = [ ("custom", "@string/pref_layout_e_custom") ] + lids, names = zip(*(none_item + layouts + custom_item)) # unzip + values = XML.Element("string-array", name="pref_layout_values") + add_items(values, lids) + entries = XML.Element("string-array", name="pref_layout_entries") + add_items(entries, names) + root = XML.Element("resources") + root.append(XML.Comment(text="DO NOT EDIT. This file is generated, see gen_layouts.py.")) + root.append(values) + root.append(entries) + XML.indent(root) + XML.ElementTree(element=root).write(out, encoding="unicode", xml_declaration=True) + +layouts = sort_layouts(read_layouts(glob.glob("res/xml/*.xml"))) +with open("res/values/layouts.xml", "w") as out: + generate_arrays(out, layouts) diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 713459d..14a536d 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1,85 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string-array name="pref_layout_values"> - <item>none</item> - <item>latn_qwerty_us</item> - <item>latn_colemak</item> - <item>latn_dvorak</item> - <item>arab_pc_ckb</item> - <item>arab_pc</item> - <item>arab_alt</item> - <item>arab_pc_ir</item> - <item>beng_national</item> - <item>beng_provat</item> - <item>cyrl_jcuken_ru</item> - <item>cyrl_jcuken_uk</item> - <item>cyrl_yaverti</item> - <item>deva_inscript</item> - <item>deva_alt</item> - <item>grek_qwerty</item> - <item>hang_dubeolsik_kr</item> - <item>hebr_1_il</item> - <item>hebr_2_il</item> - <item>latn_azerty_fr</item> - <item>latn_bone</item> - <item>latn_neo2</item> - <item>latn_qwerty_hu</item> - <item>latn_qwerty_br</item> - <item>latn_qwerty_es</item> - <item>latn_qwerty_lv</item> - <item>latn_qwerty_no</item> - <item>latn_qwerty_pl</item> - <item>latn_qwerty_se</item> - <item>latn_qwerty_tr</item> - <item>latn_qwerty_vi</item> - <item>latn_qwerty_ro</item> - <item>latn_qwertz</item> - <item>latn_qwertz_cz</item> - <item>latn_qwertz_de</item> - <item>latn_qwertz_hu</item> - <item>latn_qwertz_sk</item> - <item>custom</item> - </string-array> - <string-array name="pref_layout_entries"> - <item>None</item> - <item>QWERTY (US)</item> - <item>Colemak</item> - <item>Dvorak</item> - <item>Arabic (کوردی)</item> - <item>Arabic PC</item> - <item>Arabic Alt</item> - <item>Persian PC</item> - <item>বাংলা (জাতীয়)</item> - <item>বাংলা (প্রভাত)</item> - <item>ЙЦУКЕН (Русский)</item> - <item>ЙЦУКЕН (Українська)</item> - <item>ЯВЕРТЪ</item> - <item>देवनागरी (हिंदी)-1</item> - <item>देवनागरी (हिंदी)-2</item> - <item>QWERTY (Greek)</item> - <item>두벌식 (Korean)</item> - <item>Hebrew 1</item> - <item>Hebrew 2</item> - <item>AZERTY (Français)</item> - <item>Bone</item> - <item>Neo 2</item> - <item>QWERTY (Magyar)</item> - <item>QWERTY (Brasileiro)</item> - <item>QWERTY (Español)</item> - <item>QWERTY (Latvian)</item> - <item>QWERTY (Norwegian)</item> - <item>QWERTY (Polski)</item> - <item>QWERTY (Swedish)</item> - <item>QWERTY (Türkçe)</item> - <item>QWERTY (Vietnamese)</item> - <item>QWERTY (Română)</item> - <item>QWERTZ</item> - <item>QWERTZ (Czech)</item> - <item>QWERTZ (Deutsch)</item> - <item>QWERTZ (Magyar)</item> - <item>QWERTZ (Slovak)</item> - <item>@string/pref_layout_e_custom</item> - </string-array> <string-array name="pref_accents_entries"> <item>@string/pref_accents_e_all_installed</item> <item>@string/pref_accents_e_selected</item> diff --git a/res/values/layouts.xml b/res/values/layouts.xml new file mode 100644 index 0000000..6042437 --- /dev/null +++ b/res/values/layouts.xml @@ -0,0 +1,84 @@ +<?xml version='1.0' encoding='UTF-8'?> +<resources> + <!--DO NOT EDIT. This file is generated, see gen_layouts.py.--> + <string-array name="pref_layout_values"> + <item>none</item> + <item>latn_qwerty_us</item> + <item>latn_colemak</item> + <item>latn_dvorak</item> + <item>arab_alt</item> + <item>arab_pc</item> + <item>arab_pc_ckb</item> + <item>arab_pc_ir</item> + <item>beng_national</item> + <item>beng_provat</item> + <item>cyrl_jcuken_ru</item> + <item>cyrl_jcuken_uk</item> + <item>cyrl_yaverti</item> + <item>deva_alt</item> + <item>deva_inscript</item> + <item>grek_qwerty</item> + <item>hang_dubeolsik_kr</item> + <item>hebr_1_il</item> + <item>hebr_2_il</item> + <item>latn_azerty_fr</item> + <item>latn_bone</item> + <item>latn_neo2</item> + <item>latn_qwerty_br</item> + <item>latn_qwerty_es</item> + <item>latn_qwerty_hu</item> + <item>latn_qwerty_lv</item> + <item>latn_qwerty_no</item> + <item>latn_qwerty_pl</item> + <item>latn_qwerty_ro</item> + <item>latn_qwerty_se</item> + <item>latn_qwerty_tr</item> + <item>latn_qwerty_vi</item> + <item>latn_qwertz</item> + <item>latn_qwertz_cz</item> + <item>latn_qwertz_de</item> + <item>latn_qwertz_hu</item> + <item>latn_qwertz_sk</item> + <item>custom</item> + </string-array> + <string-array name="pref_layout_entries"> + <item>None</item> + <item>QWERTY (US)</item> + <item>Colemak</item> + <item>Dvorak</item> + <item>Arabic Alt</item> + <item>Arabic PC</item> + <item>Arabic (کوردی)</item> + <item>Persian PC</item> + <item>বাংলা (জাতীয়)</item> + <item>বাংলা (প্রভাত)</item> + <item>ЙЦУКЕН (Русский)</item> + <item>ЙЦУКЕН (Українська)</item> + <item>ЯВЕРТЪ</item> + <item>देवनागरी (हिंदी)-2</item> + <item>देवनागरी (हिंदी)-1</item> + <item>QWERTY (Greek)</item> + <item>두벌식 (Korean)</item> + <item>Hebrew 1</item> + <item>Hebrew 2</item> + <item>AZERTY (Français)</item> + <item>Bone</item> + <item>Neo 2</item> + <item>QWERTY (Brasileiro)</item> + <item>QWERTY (Español)</item> + <item>QWERTY (Magyar)</item> + <item>QWERTY (Latvian)</item> + <item>QWERTY (Norwegian)</item> + <item>QWERTY (Polski)</item> + <item>QWERTY (Română)</item> + <item>QWERTY (Swedish)</item> + <item>QWERTY (Türkçe)</item> + <item>QWERTY (Vietnamese)</item> + <item>QWERTZ</item> + <item>QWERTZ (Czech)</item> + <item>QWERTZ (Deutsch)</item> + <item>QWERTZ (Magyar)</item> + <item>QWERTZ (Slovak)</item> + <item>@string/pref_layout_e_custom</item> + </string-array> +</resources>
\ No newline at end of file diff --git a/res/xml/arab_alt.xml b/res/xml/arab_alt.xml index bc5f123..f594f92 100644 --- a/res/xml/arab_alt.xml +++ b/res/xml/arab_alt.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="arabic"> +<keyboard name="Arabic Alt" script="arabic"> <row> <key key0="ض" key2="١" key3="`" key4="esc"/> <key key0="ص" key2="٢" key3="\@"/> diff --git a/res/xml/arab_pc.xml b/res/xml/arab_pc.xml index 8ab8650..9fb9dad 100644 --- a/res/xml/arab_pc.xml +++ b/res/xml/arab_pc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="arabic"> +<keyboard name="Arabic PC" script="arabic"> <row> <key key0="ض" key1="َ" key2="١" key3="`" key4="esc"/> <key key0="ص" key1="ً" key2="٢" key3="\@"/> diff --git a/res/xml/arab_pc_ckb.xml b/res/xml/arab_pc_ckb.xml index bc8bb4a..53f09d9 100644 --- a/res/xml/arab_pc_ckb.xml +++ b/res/xml/arab_pc_ckb.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="arabic"> +<keyboard name="Arabic (کوردی)" script="arabic"> <row> <key key0="ق" key1="ٯ" key2="١" key3="esc"/> <key key0="و" key1="وو" key2="٢" key3="\@"/> diff --git a/res/xml/arab_pc_ir.xml b/res/xml/arab_pc_ir.xml index be2720c..f285123 100644 --- a/res/xml/arab_pc_ir.xml +++ b/res/xml/arab_pc_ir.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Adapted from standard SIRI 9147 --> -<keyboard script="arabic"> +<keyboard name="Persian PC" script="arabic"> <row> <key key0="ض" key2="۱"/> <key key0="ص" key2="۲"/> diff --git a/res/xml/beng_national.xml b/res/xml/beng_national.xml index 9d70e37..2df7bce 100644 --- a/res/xml/beng_national.xml +++ b/res/xml/beng_national.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard> +<keyboard name="বাংলা (জাতীয়)"> <row> <key key0="ঙ" key2="ং" key3="esc" key4="১"/> <key key0="য" key2="য়" key3="¶" key4="২"/> diff --git a/res/xml/beng_provat.xml b/res/xml/beng_provat.xml index caaa836..572e0ef 100644 --- a/res/xml/beng_provat.xml +++ b/res/xml/beng_provat.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<keyboard> +<keyboard name="বাংলা (প্রভাত)"> <row> <key key0="দ" key1="ধ" key2="১" key3="!" key5="esc" /> <key key0="ূ" key1="ঊ" key2="২" key3="\@" /> diff --git a/res/xml/cyrl_jcuken_ru.xml b/res/xml/cyrl_jcuken_ru.xml index 5f392ca..eb4b939 100644 --- a/res/xml/cyrl_jcuken_ru.xml +++ b/res/xml/cyrl_jcuken_ru.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="cyrillic"> +<keyboard name="ЙЦУКЕН (Русский)" script="cyrillic"> <row> <key key0="й" key2="1" key4="esc"/> <key key0="ц" key1="loc ї" key2="2" key3="\@" key4="~"/> diff --git a/res/xml/cyrl_jcuken_uk.xml b/res/xml/cyrl_jcuken_uk.xml index d5ae950..905f0e1 100644 --- a/res/xml/cyrl_jcuken_uk.xml +++ b/res/xml/cyrl_jcuken_uk.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="cyrillic"> +<keyboard name="ЙЦУКЕН (Українська)" script="cyrillic"> <row> <key shift="0.1 " key0="й" key2="1" key4="esc"/> <key key0="ц" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/cyrl_yaverti.xml b/res/xml/cyrl_yaverti.xml index f4eb820..a228f24 100644 --- a/res/xml/cyrl_yaverti.xml +++ b/res/xml/cyrl_yaverti.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="cyrillic"> +<keyboard name="ЯВЕРТЪ" script="cyrillic"> <row> <key key0="я" key2="1" key4="esc"/> <key key0="в" key1="!" key2="2" key3="\@" key4="ч"/> diff --git a/res/xml/deva_alt.xml b/res/xml/deva_alt.xml index 1606abd..453285c 100644 --- a/res/xml/deva_alt.xml +++ b/res/xml/deva_alt.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="devanagari"> +<keyboard name="देवनागरी (हिंदी)-2" script="devanagari"> <row> <key shift="0.35" width="0.9" key0="क" key1="ख" key2="घ" key3="ङ" key4="ग"/> <key width="0.9" key0="च" key1="छ" key2="झ" key3="ञ" key4="ज"/> diff --git a/res/xml/deva_inscript.xml b/res/xml/deva_inscript.xml index 1f306e7..553f43d 100644 --- a/res/xml/deva_inscript.xml +++ b/res/xml/deva_inscript.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="devanagari"> +<keyboard name="देवनागरी (हिंदी)-1" script="devanagari"> <row> <key key0="ौ" key1="औ" key2="₹" key3="esc" key4="१"/> <key key0="ै" key1="ऐ" key2="ऍ" key3="¶" key4="२"/> diff --git a/res/xml/grek_qwerty.xml b/res/xml/grek_qwerty.xml index 50da475..f5499ec 100644 --- a/res/xml/grek_qwerty.xml +++ b/res/xml/grek_qwerty.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Greek)" script="latin"> <row> <key key0=";" key2="1" key4="esc"/> <key key0="ς" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/hang_dubeolsik_kr.xml b/res/xml/hang_dubeolsik_kr.xml index 998ab8f..29dd01b 100644 --- a/res/xml/hang_dubeolsik_kr.xml +++ b/res/xml/hang_dubeolsik_kr.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="hangul"> +<keyboard name="두벌식 (Korean)" script="hangul"> <row> <key key0="ㅂ" key2="1" key4="esc"/> <key key0="ㅈ" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/hebr_1_il.xml b/res/xml/hebr_1_il.xml index 50ba86e..bbf5e56 100644 --- a/res/xml/hebr_1_il.xml +++ b/res/xml/hebr_1_il.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Based on standard SI-1452-1 --> -<keyboard script="hebrew"> +<keyboard name="Hebrew 1" script="hebrew"> <row> <key key0="/" key2="1" key3="!" key4="esc"/> <key key0="'" key2="2" key3="\@" key1=";"/> diff --git a/res/xml/hebr_2_il.xml b/res/xml/hebr_2_il.xml index ff83a91..090bef8 100644 --- a/res/xml/hebr_2_il.xml +++ b/res/xml/hebr_2_il.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Based on standard SI-1452-2 --> -<keyboard script="hebrew"> +<keyboard name="Hebrew 2" script="hebrew"> <row> <key key0="ץ" key2="1" key3="!" key4="esc"/> <key key0="ן" key2="2" key3="\@" key1=";"/> diff --git a/res/xml/latn_azerty_fr.xml b/res/xml/latn_azerty_fr.xml index 8434466..e3cc130 100644 --- a/res/xml/latn_azerty_fr.xml +++ b/res/xml/latn_azerty_fr.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Adapted from standard NF Z71-300 --> <!-- https://norme-azerty.fr/ --> -<keyboard script="latin"> +<keyboard name="AZERTY (Français)" script="latin"> <row> <key key0="a" key2="1" key4="esc"/> <key key0="z" key2="2" key3="&" key4="~"/> diff --git a/res/xml/latn_bone.xml b/res/xml/latn_bone.xml index 2f8a012..ea31131 100644 --- a/res/xml/latn_bone.xml +++ b/res/xml/latn_bone.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- https://neo-layout.org/Layouts/bone/ --> -<keyboard bottom_row="false" script="latin"> +<keyboard name="Bone" bottom_row="false" script="latin"> <row> <key key0="j" key2="esc" key4="…"/> <key key0="d" key2="°" key4="_"/> diff --git a/res/xml/latn_colemak.xml b/res/xml/latn_colemak.xml index a7c78f2..1a73fbb 100644 --- a/res/xml/latn_colemak.xml +++ b/res/xml/latn_colemak.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- https://colemak.com/ --> -<keyboard script="latin"> +<keyboard name="Colemak" script="latin"> <row> <key key0="q" key1="esc" key2="loc accent_aigu" key3="loc accent_tilde" shift="0.5"/> <key key0="w" key1="loc accent_grave" key2=" ́" key3="~" /> diff --git a/res/xml/latn_dvorak.xml b/res/xml/latn_dvorak.xml index 4dccc23..4e052ee 100644 --- a/res/xml/latn_dvorak.xml +++ b/res/xml/latn_dvorak.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="Dvorak" script="latin"> <row> <key key0="shift" width="1.5" key2="esc" key4="tab"/> <key key0="p" key1="loc accent_ring" key2="." key3="<" key4="f11_placeholder"/> diff --git a/res/xml/latn_neo2.xml b/res/xml/latn_neo2.xml index 6f20f38..939e131 100644 --- a/res/xml/latn_neo2.xml +++ b/res/xml/latn_neo2.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- https://neo-layout.org/Layouts/neo/ --> -<keyboard bottom_row="false" script="latin"> +<keyboard name="Neo 2" bottom_row="false" script="latin"> <row> <key key0="x" key1="°" key2="1" key4="…"/> <key key0="v" key1="§" key2="2" key4="_"/> diff --git a/res/xml/latn_qwerty_br.xml b/res/xml/latn_qwerty_br.xml index fda6f93..d76c6e4 100644 --- a/res/xml/latn_qwerty_br.xml +++ b/res/xml/latn_qwerty_br.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Adapted from standard ABNT NBR 10346 --> -<keyboard script="latin"> +<keyboard name="QWERTY (Brasileiro)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@" key4="!"/> diff --git a/res/xml/latn_qwerty_es.xml b/res/xml/latn_qwerty_es.xml index 273cfed..5f1fc24 100644 --- a/res/xml/latn_qwerty_es.xml +++ b/res/xml/latn_qwerty_es.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Español)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_hu.xml b/res/xml/latn_qwerty_hu.xml index 302c304..aee223c 100644 --- a/res/xml/latn_qwerty_hu.xml +++ b/res/xml/latn_qwerty_hu.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Magyar)" script="latin"> <row> <key key0="q" key2="0" key4="esc"/> <key key0="w" key1="'" key2="1" key3="~" key4="|"/> diff --git a/res/xml/latn_qwerty_lv.xml b/res/xml/latn_qwerty_lv.xml index 7f16d5a..1e82d8e 100644 --- a/res/xml/latn_qwerty_lv.xml +++ b/res/xml/latn_qwerty_lv.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Latvian)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@" key4="!"/> diff --git a/res/xml/latn_qwerty_no.xml b/res/xml/latn_qwerty_no.xml index 33e9f3b..9f38f06 100644 --- a/res/xml/latn_qwerty_no.xml +++ b/res/xml/latn_qwerty_no.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Norwegian)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_pl.xml b/res/xml/latn_qwerty_pl.xml index 1c28766..c31ae76 100644 --- a/res/xml/latn_qwerty_pl.xml +++ b/res/xml/latn_qwerty_pl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Polski)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_ro.xml b/res/xml/latn_qwerty_ro.xml index e5e0a19..1282d36 100644 --- a/res/xml/latn_qwerty_ro.xml +++ b/res/xml/latn_qwerty_ro.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Română)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_se.xml b/res/xml/latn_qwerty_se.xml index 69884d7..aab6bc6 100644 --- a/res/xml/latn_qwerty_se.xml +++ b/res/xml/latn_qwerty_se.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Swedish)" script="latin"> <row> <key key0="q" key4="esc" key2="1"/> <key key0="w" key2="2" key3="`" key4="\@"/> diff --git a/res/xml/latn_qwerty_tr.xml b/res/xml/latn_qwerty_tr.xml index 60f52a2..2093db7 100644 --- a/res/xml/latn_qwerty_tr.xml +++ b/res/xml/latn_qwerty_tr.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTY (Türkçe)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_us.xml b/res/xml/latn_qwerty_us.xml index 06e91b9..9165283 100644 --- a/res/xml/latn_qwerty_us.xml +++ b/res/xml/latn_qwerty_us.xml @@ -20,7 +20,7 @@ See bottom_row.xml for the definition of the bottom row and neo2.xml for a layout that re-defines it. See srcs/juloo.keyboard2/KeyValue.java for the keys that have a special meaning. --> -<keyboard script="latin"> +<keyboard name="QWERTY (US)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="~" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwerty_vi.xml b/res/xml/latn_qwerty_vi.xml index 8b51299..6af7bc7 100644 --- a/res/xml/latn_qwerty_vi.xml +++ b/res/xml/latn_qwerty_vi.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Adapted from standard TCVN 6064--> -<keyboard script="latin"> +<keyboard name="QWERTY (Vietnamese)" script="latin"> <row> <key key0="q" key1="~" key2="1" key3="`" key4="esc"/> <key key0="w" key1="accent_horn" key2="2" key3="\@"/> diff --git a/res/xml/latn_qwertz.xml b/res/xml/latn_qwertz.xml index 107b738..6ba19c6 100644 --- a/res/xml/latn_qwertz.xml +++ b/res/xml/latn_qwertz.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTZ" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="^" key2="2" key3=""" key4="\@"/> diff --git a/res/xml/latn_qwertz_cz.xml b/res/xml/latn_qwertz_cz.xml index 6546163..fc096ee 100644 --- a/res/xml/latn_qwertz_cz.xml +++ b/res/xml/latn_qwertz_cz.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTZ (Czech)" script="latin"> <row> <key key0="q" key1="1" key4="esc"/> <key key0="w" key1="2" key3="~"/> diff --git a/res/xml/latn_qwertz_de.xml b/res/xml/latn_qwertz_de.xml index 906c4fc..ff1ec11 100644 --- a/res/xml/latn_qwertz_de.xml +++ b/res/xml/latn_qwertz_de.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Adapted from standard DIN 2137-1 --> -<keyboard script="latin"> +<keyboard name="QWERTZ (Deutsch)" script="latin"> <row> <key key0="q" key2="1" key4="esc"/> <key key0="w" key1="^" key2="2" key3=""" key4="\@"/> diff --git a/res/xml/latn_qwertz_hu.xml b/res/xml/latn_qwertz_hu.xml index 557b2e5..a77aa1c 100644 --- a/res/xml/latn_qwertz_hu.xml +++ b/res/xml/latn_qwertz_hu.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTZ (Magyar)" script="latin"> <row> <key key0="q" key2="0" key4="esc"/> <key key0="w" key1="'" key2="1" key3="~" key4="|"/> diff --git a/res/xml/latn_qwertz_sk.xml b/res/xml/latn_qwertz_sk.xml index 7d3d1f4..f71a825 100644 --- a/res/xml/latn_qwertz_sk.xml +++ b/res/xml/latn_qwertz_sk.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<keyboard script="latin"> +<keyboard name="QWERTZ (Slovak)" script="latin"> <row> <key key0="q" key1="1" key4="esc"/> <key key0="w" key1="2"/> diff --git a/sync_translations.py b/sync_translations.py index 97c0ecc..afc7237 100644 --- a/sync_translations.py +++ b/sync_translations.py @@ -1,5 +1,4 @@ import xml.etree.ElementTree as ET -from xml.sax import saxutils import glob # Edit every strings.xml files: |
