diff --git a/AndroidManifest.xml b/AndroidManifest.xml index af0cdad9d..493839923 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ed2c0487..487e26857 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,16 +133,32 @@ and other extra keys to show. The list of language tags (generally two letters) and locales (generally of the form `xx_XX`) -can be found in this stackoverflow answer: https://stackoverflow.com/a/7989085 +can be found in this [stackoverflow answer](https://stackoverflow.com/a/7989085) -### Translations +### Updating translations -Translations are always welcome ! +The text used in the app is written in `res/values-/strings.xml`. -See for example: 1723288 (Latvian), baf867a (French). -The app can be translated by writing `res/values-/strings.xml` -(for example `values-fr`, `values-lv`), based on the default: -`res/values/strings.xml` (English). +The list of language tags can be found in this +[stackoverflow answer](https://stackoverflow.com/a/7989085) + +The first part before the `_` is used, for example, +`res/values-fr/strings.xml` for French, +`res/values-lv/strings.xml` for Latvian. + +Commented-out lines indicate missing translations: + +```xml + +``` + +Remove the `` parts and change the text. + +### Adding a translation + +The `res/values-/strings.xml` file must be created by copying the +default translation in `res/values/strings.xml`, which contain the structure of +the file and the English strings. To check that `strings.xml` is formatted correctly, run `python sync_translations.py`. This will modify your files. @@ -152,7 +168,7 @@ The store description is found in `metadata/android//`, The short description must not exceed 80 characters. Translating changelogs is not useful. -The app name might be partially translated, the "unexpected" word should remain +The app name might be partially translated, the "Unexpected" word should remain untranslated. As translations need to be updated regularly, you can subscribe to this issue diff --git a/README.md b/README.md index add9c05aa..6e9e8fc09 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ Now perfect for everyday use. This application contains no ads, doesn't make any network requests and is Open Source. +## Similar apps +* [Calculator++](https://github.com/Bubu/android-calculatorpp) - Calculator with a similar UX, swipe to corners for advanced math symbols and operators. Works up to Android 13 but maybe unmaintained. + ## Contributing For instructions on building the application, see diff --git a/check_layout.output b/check_layout.output index 8dd12f9ae..b4a63fc0c 100644 --- a/check_layout.output +++ b/check_layout.output @@ -1,44 +1,48 @@ # res/xml/arab_alt.xml Layout includes some ASCII punctuation but not all, missing: !, ", ', +, -, /, :, ;, <, =, >, ?, [, \, ], _, |, ~ +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +2 warnings +# res/xml/arab_pc.xml +Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, | 1 warnings # res/xml/arab_pc_ckb.xml Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ., :, ;, <, =, >, ?, `, |, ~ 1 warnings # res/xml/arab_pc_ir.xml -Layout includes some ASCII punctuation but not all, missing: ", $, %, ', *, ,, /, ;, <, =, >, ?, [, \, ], ^, _, `, {, |, }, ~ -1 warnings -# res/xml/arab_pc.xml -Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, | -1 warnings +Duplicate keys: (, ) +Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], `, {, |, } +2 warnings # res/xml/beng_national.xml Layout includes some ASCII punctuation but not all, missing: $ +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder Layout doesn't specify a script. -2 warnings +3 warnings # res/xml/beng_provat.xml Layout includes some ASCII punctuation but not all, missing: $, &, *, ., /, <, >, [, \, ], `, {, |, } +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder Layout doesn't specify a script. -2 warnings -Not a layout file: res/xml/bottom_row.xml +3 warnings # res/xml/cyrl_jcuken_ru.xml 0 warnings # res/xml/cyrl_jcuken_uk.xml 0 warnings +# res/xml/cyrl_ueishsht.xml +0 warnings # res/xml/cyrl_yaverti.xml Layout includes some ASCII punctuation but not all, missing: ~ 1 warnings # res/xml/deva_alt.xml Layout includes some ASCII punctuation but not all, missing: #, $, %, &, ', (, ), *, +, ., /, :, <, =, >, @, [, \, ], ^, _, `, {, |, }, ~ -1 warnings +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +2 warnings # res/xml/deva_inscript.xml +Duplicate keys: , । Layout includes some ASCII punctuation but not all, missing: ", $, ', ^, _, `, | -1 warnings -# res/xml/greekmath.xml -Layout includes some ASCII punctuation but not all, missing: !, ", #, $, %, &, ', (, ), *, +, ,, -, /, :, ;, <, >, ?, @, [, \, ], _, `, {, |, }, ~ -Layout redefines the bottom row but some important keys are missing, missing: change_method, config, ctrl, switch_emoji, switch_second -Layout doesn't specify a script. +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder 3 warnings # res/xml/grek_qwerty.xml -0 warnings +Duplicate keys: ; +1 warnings # res/xml/hang_dubeolsik_kr.xml 0 warnings # res/xml/hebr_1_il.xml @@ -49,17 +53,26 @@ Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], { 1 warnings # res/xml/latn_azerty_fr.xml 0 warnings +# res/xml/latn_bepo_fr.xml +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +1 warnings # res/xml/latn_bone.xml Layout includes some ASCII punctuation but not all, missing: $ -1 warnings +Layout redefines the bottom row but some important keys are missing, missing: switch_backward +2 warnings # res/xml/latn_colemak.xml 0 warnings # res/xml/latn_dvorak.xml 0 warnings # res/xml/latn_neo2.xml -0 warnings +Duplicate keys: - +Layout redefines the bottom row but some important keys are missing, missing: switch_forward +2 warnings # res/xml/latn_qwerty_br.xml 0 warnings +# res/xml/latn_qwerty_cz.xml +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +1 warnings # res/xml/latn_qwerty_es.xml 0 warnings # res/xml/latn_qwerty_hu.xml @@ -73,44 +86,37 @@ Layout includes some ASCII punctuation but not all, missing: $ # res/xml/latn_qwerty_ro.xml 0 warnings # res/xml/latn_qwerty_se.xml -0 warnings +Duplicate keys: !, ', ,, -, ., ? +1 warnings # res/xml/latn_qwerty_tr.xml -0 warnings +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +1 warnings # res/xml/latn_qwerty_us.xml 0 warnings # res/xml/latn_qwerty_vi.xml Layout includes some ASCII punctuation but not all, missing: \ 1 warnings +# res/xml/latn_qwertz.xml +0 warnings +# res/xml/latn_qwertz_cz.xml +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +1 warnings # res/xml/latn_qwertz_cz_multifunctional.xml Layout includes some ASCII punctuation but not all, missing: ` -1 warnings -# res/xml/latn_qwertz_cz.xml -0 warnings +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +2 warnings # res/xml/latn_qwertz_de.xml 0 warnings +# res/xml/latn_qwertz_fr_ch.xml +0 warnings # res/xml/latn_qwertz_hu.xml 0 warnings # res/xml/latn_qwertz_sk.xml Layout includes some ASCII punctuation but not all, missing: \, ` -1 warnings -# res/xml/latn_qwertz.xml -0 warnings -Not a layout file: res/xml/method.xml -Not a layout file: res/xml/number_row.xml -# res/xml/numeric.xml -Layout includes some ASCII punctuation but not all, missing: &, ?, @, ` -Layout redefines the bottom row but some important keys are missing, missing: change_method, config, switch_emoji, switch_numeric, switch_second -Layout doesn't specify a script. -3 warnings -# res/xml/numpad.xml -Layout includes some ASCII punctuation but not all, missing: !, ", #, $, %, &, ', (, ), ,, :, ;, <, >, ?, @, [, \, ], ^, _, `, {, |, }, ~ -Layout doesn't define some important keys, missing: backspace, delete -Layout redefines the bottom row but some important keys are missing, missing: action, change_method, config, ctrl, down, enter, fn, left, right, space, switch_emoji, switch_numeric, switch_second, up -Layout doesn't specify a script. -4 warnings -# res/xml/pin.xml -Layout includes some ASCII punctuation but not all, missing: !, ", $, %, &, ', ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, ~ -Layout redefines the bottom row but some important keys are missing, missing: change_method, config, ctrl, fn, switch_emoji, switch_second -Layout doesn't specify a script. +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder +2 warnings +# res/xml/urdu_phonetic_ur.xml +Duplicate keys: +Layout includes some ASCII punctuation but not all, missing: <, >, ?, `, |, ~ +Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder 3 warnings -Not a layout file: res/xml/settings.xml diff --git a/check_layout.py b/check_layout.py index f0c1a3424..66b6bbe7f 100644 --- a/check_layout.py +++ b/check_layout.py @@ -3,6 +3,12 @@ warning_count = 0 +KNOWN_NOT_LAYOUT = set([ + "res/xml/number_row.xml", "res/xml/numpad.xml", "res/xml/pin.xml", + "res/xml/bottom_row.xml", "res/xml/settings.xml", "res/xml/method.xml", + "res/xml/greekmath.xml", "res/xml/numeric.xml", + "res/xml/emoji_bottom_row.xml" ]) + def warn(msg): global warning_count print(msg) @@ -31,27 +37,41 @@ def unexpected_keys(keys, symbols, msg): def parse_layout(fname): keys = set() + dup = set() root = ET.parse(fname).getroot() if root.tag != "keyboard": return None for row in root: for key in row: for attr in key.keys(): - keys.add(key.get(attr).removeprefix("\\")) - return root, keys + if attr.startswith("key"): + k = key.get(attr).removeprefix("\\") + if k in keys: dup.add(k) + keys.add(k) + return root, keys, dup def check_layout(layout): - root, keys = layout + root, keys, dup = layout + if len(dup) > 0: warn("Duplicate keys: " + key_list_str(dup)) missing_some_of(keys, "~!@#$%^&*(){}`[]=\\-_;:/.,?<>'\"+|", "ASCII punctuation") missing_some_of(keys, "0123456789", "digits") - missing_some_of(keys, ["f11_placeholder", "f12_placeholder"]) - missing_some_of(keys, ["esc", "tab"]) - missing_required(keys, ["backspace", "delete"], "Layout doesn't define some important keys") + missing_required(keys, + ["esc", "tab", "backspace", "delete", + "f11_placeholder", "f12_placeholder"], + "Layout doesn't define some important keys") + unexpected_keys(keys, + ["copy", "paste", "cut", "selectAll", "shareText", + "pasteAsPlainText", "undo", "redo" ], + "Layout contains editing keys") + unexpected_keys(keys, + [ "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", + "f10", "f11", "f12" ], + "Layout contains function keys") bottom_row_keys = [ "ctrl", "fn", "switch_numeric", "change_method", "switch_emoji", - "config", "switch_second", "enter", "action", "left", "up", "right", - "down", "space" + "config", "switch_forward", "switch_backward", "enter", "action", + "left", "up", "right", "down", "space" ] if root.get("bottom_row") == "false": @@ -64,7 +84,9 @@ def check_layout(layout): if root.get("script") == None: warn("Layout doesn't specify a script.") -for fname in sys.argv[1:]: +for fname in sorted(sys.argv[1:]): + if fname in KNOWN_NOT_LAYOUT: + continue layout = parse_layout(fname) if layout == None: print("Not a layout file: %s" % fname) diff --git a/gen_layouts.py b/gen_layouts.py index a8f13c86c..c2e6e8d87 100644 --- a/gen_layouts.py +++ b/gen_layouts.py @@ -54,10 +54,10 @@ def mk_array(tag, name, strings_items): item.text = s elem.append(item) return elem - none_item = [ ("none", "None") ] + system_item = [ ("system", "@string/pref_layout_e_system") ] custom_item = [ ("custom", "@string/pref_layout_e_custom") ] - values_items, entries_items = zip(*(none_item + layouts + custom_item)) # unzip - ids_items = map(lambda s: "@xml/%s" % s if s not in ["none", "custom"] else "-1", values_items) + values_items, entries_items = zip(*(system_item + layouts + custom_item)) # unzip + ids_items = map(lambda s: "@xml/%s" % s if s not in ["system", "custom"] else "-1", values_items) root = XML.Element("resources") root.append(XML.Comment(text="DO NOT EDIT. This file is generated, see gen_layouts.py.")) root.append(mk_array("string-array", "pref_layout_values", values_items)) diff --git a/metadata/android/en-US/changelogs/36.txt b/metadata/android/en-US/changelogs/36.txt new file mode 100644 index 000000000..dae552065 --- /dev/null +++ b/metadata/android/en-US/changelogs/36.txt @@ -0,0 +1,9 @@ +Allow selecting any number of standard and custom layouts. +Allow adding custom keys to the keyboard. +Changed behavior of auto-added keys (often dead-keys). +New layouts. +Improved layouts and language support. +Improved the space bar slider, and many more. +Updated translations. + +Thanks to the contributors: @ChasmSolacer, @ElucGeek, @GoRaN909, @RZHSSNZDH, @Shareef101, @Validbit, @eandersons, @nitsvga, @polyctena, @sdrapha, @syskill diff --git a/metadata/android/es-ES/full_description.txt b/metadata/android/es-ES/full_description.txt new file mode 100644 index 000000000..f3eec1f30 --- /dev/null +++ b/metadata/android/es-ES/full_description.txt @@ -0,0 +1,6 @@ +La característica principal es que hay acceso a más caractéres deslizando hacia las esquinas de las teclas. + +Esta aplicación fue originalmente diseñada para programadores que usaran Termux. +Ahora es perfecta para uso cotidiano. + +La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y es de Fuente Abierta. diff --git a/metadata/android/es-ES/short_description.txt b/metadata/android/es-ES/short_description.txt index 98969d19e..e9765d3ea 100644 --- a/metadata/android/es-ES/short_description.txt +++ b/metadata/android/es-ES/short_description.txt @@ -1 +1 @@ -Un teclado virtual ligero para desarrolladores. +Un teclado virtual ligero para Android consciente de su privacidad. diff --git a/metadata/android/tr-TR/full_description.txt b/metadata/android/tr-TR/full_description.txt new file mode 100644 index 000000000..1a5e700ca --- /dev/null +++ b/metadata/android/tr-TR/full_description.txt @@ -0,0 +1,6 @@ +Bu uygulama özünde tuşların kenarlarından kaydırarak daha fazla karakter yazabilmek amacıyla geliştirildi. + +Bu uygulama aslında Termux kullanıcıları için geliştirildi. +Artık gündelik kullanım için de uygun. + +Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz. diff --git a/metadata/android/tr-TR/short_description.txt b/metadata/android/tr-TR/short_description.txt new file mode 100644 index 000000000..8d2d53042 --- /dev/null +++ b/metadata/android/tr-TR/short_description.txt @@ -0,0 +1 @@ +Android için hafif ve güvenlik odaklı bir sanal klavye uygulaması. diff --git a/res/layout/dialog_edit_text.xml b/res/layout/dialog_edit_text.xml new file mode 100644 index 000000000..ad07947af --- /dev/null +++ b/res/layout/dialog_edit_text.xml @@ -0,0 +1,4 @@ + + + + diff --git a/res/layout/emoji_pane.xml b/res/layout/emoji_pane.xml index bdce8e088..6d53f8655 100644 --- a/res/layout/emoji_pane.xml +++ b/res/layout/emoji_pane.xml @@ -3,9 +3,6 @@ - - - - + diff --git a/res/layout/extra_keys_preference.xml b/res/layout/extra_keys_preference.xml deleted file mode 100644 index 40bbfbe69..000000000 --- a/res/layout/extra_keys_preference.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml index dbd6b33dd..52064058f 100644 --- a/res/layout/launcher_activity.xml +++ b/res/layout/launcher_activity.xml @@ -2,7 +2,8 @@