diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 1ae892b..d23fdff 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -87,4 +87,7 @@ Tato aplikace je pouhou virtuální klávesnicí. Přejděte do systémového nastavení, kliknutím na tlačítko níže a aktivujte ji. Toto je volná, open-source aplikace. Její zdrojový kód, či hlášení chyb, naleznete na Githubu. Po aktivaci můžete klávesnici rovnou vyzkoušet zde: + + + diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index e91fe04..525eb00 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -87,4 +87,7 @@ Diese App ist eine virtuelle Tastatur. Tippe auf den Button unten und aktivere Unexpected Keyboard in den Systemeinstellungen. Dies ist eine freie und quelloffene App. Du findest den Quellcode auf Github. Dort können auch Bugs gemeldet werden. Nach Aktivierung kannst du die Tastatur hier ausprobieren: + + + diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 556a816..19a5ce3 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -87,4 +87,7 @@ Esta aplicación es un teclado virtual. Apretar el botón de abajo te facilitará habilitarlo. Esta es una aplicación gratuita, libre y de fuente abierta. EL código fuente se puede encontrar también para reportar errores en Github. Tras habilitar, debajo se puede probar el teclado: + + + diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index 27cc3c8..7a51cac 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -87,4 +87,7 @@ این برنامه یک صفحه کلید مجازی است. با کلیک روی گزینه زیر به تنظیمات سامانه بروید و صفحه کلید غیرمنتظره را فعال کنید. این یک برنامه متن باز و آزاد است. شما می‌توانید کد منبع را در گیتهاب پیدا کرده و نیز باگ‌ها را گزارش کنید. بعد از فعالسازی، صفحه کلید را اینجا امتحان کنید: + + + diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 834317d..f803caa 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -87,4 +87,7 @@ Cette application est un clavier virtuel. Activez-le dans les paramètres système en cliquant sur le bouton ci-dessous. Cette application est libre et open-source. Lisez le source code et reportez des problèmes sur Github. Après l\'avoir activé, vous pouvez l\'essayer ici: + + + diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 1f5bb09..eb1c814 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -87,4 +87,7 @@ + + + diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 0a5803f..b821996 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -87,4 +87,7 @@ + + + diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index d8caee6..31d54b3 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -87,4 +87,7 @@ + + + diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 9ee692b..9c5f25c 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -87,4 +87,7 @@ Ta aplikacja jest klawiaturą ekranową. Naciśnij poniższy przycisk, aby przejść do ustawień systemu i włącz Unexpected-Keyboard. Jest to darmowa aplikacja o otwartym kodzie źródłowym. Możesz zobaczyć kod źródłowy oraz zgłosić błedy na Githubie. Po jej włączeniu, możesz wypróbować klawiaturę tutaj: + + + diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 1480b22..3996b14 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -87,4 +87,7 @@ Este app é um teclado virtual. Vá para as configurações do sistema clicando no botão abaixo e ative o Teclado Unexpected. Este app é gratuito é de código aberto. Você pode consultar o código ou fazer sugestões em Github. Após ativar, experimente aqui: + + + diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index 931eaa1..85d7f99 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -87,4 +87,7 @@ Această aplicație este o tastatură virtuală. Accesați setările sistemului făcând clic pe butonul de mai jos și activați tastatura Unexpected. Aceasta este o aplicație gratuită și open source. Puteți găsi codul sursă sau raporta erori folosind link-ul Github. După activare, puteți să încercați tastatura aici: + + + diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index ef60cc7..05eacb4 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -87,4 +87,7 @@ Данное приложение является виртуальной клавиатурой. Зайдите в настройки, нажав кнопку внизу и активируйте Unexpected-Keyboard. Это бесплатное приложение с открытым исходным кодом. Вы можете изучить код или сообщить об ошибках по ссылке Github. После активации вы можете попробовать клавиатуру прямо здесь: + + + diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 9d651c5..5f7dccf 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -87,4 +87,7 @@ + + + diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index bacb839..291af47 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -89,4 +89,7 @@ + + + diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 150aaee..f80e102 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -87,4 +87,7 @@ 这是一个虚拟键盘软件。点击按钮进入系统设置,然后启用 Unexpected-Keyboard 即可使用。 这是一个免费且开源的软件。你可以在 Github 上找到源代码或者反馈 bug。 启用键盘后,可以在这里测试效果: + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 25c2438..2a164e0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -87,4 +87,7 @@ This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard. This is an free and open source application. You can find the source code or report bugs on Github. After enabling, you can try the keyboard here: + Caps lock + Greek & math symbols + Voice typing diff --git a/srcs/juloo.keyboard2/ExtraKeysPreference.java b/srcs/juloo.keyboard2/ExtraKeysPreference.java index 3af1c95..54cd0a4 100644 --- a/srcs/juloo.keyboard2/ExtraKeysPreference.java +++ b/srcs/juloo.keyboard2/ExtraKeysPreference.java @@ -15,6 +15,7 @@ import java.util.Set; possible extra keys. */ public class ExtraKeysPreference extends PreferenceCategory { + /** Array of the keys that can be selected. */ public static String[] extra_keys = new String[] { "alt", @@ -70,6 +71,21 @@ public class ExtraKeysPreference extends PreferenceCategory } } + /** Text that describe a key. Might be null. */ + static String key_description(Resources res, String name) + { + int id = 0; + switch (name) + { + case "capslock": id = R.string.key_descr_capslock; break; + case "switch_greekmath": id = R.string.key_descr_switch_greekmath; break; + case "voice_typing": id = R.string.key_descr_voice_typing; break; + } + if (id == 0) + return null; + return res.getString(id); + } + /** Get the set of enabled extra keys. */ public static Set get_extra_keys(SharedPreferences prefs) { @@ -111,13 +127,13 @@ public class ExtraKeysPreference extends PreferenceCategory { boolean _key_font; - public ExtraKeyCheckBoxPreference(Context context, String key_name, + public ExtraKeyCheckBoxPreference(Context ctx, String key_name, boolean default_checked) { - super(context); + super(ctx); KeyValue kv = KeyValue.getKeyByName(key_name); String title = kv.getString(); - String descr = KeyValue.getKeyDescription(key_name); + String descr = key_description(ctx.getResources(), key_name); if (descr != null) title += " (" + descr + ")"; setKey(pref_key_of_key_name(key_name)); diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index f20c53e..a394240 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -448,26 +448,6 @@ final class KeyValue } } - static final HashMap keys_descr = new HashMap(); - - /* Some keys have a description attached. Return [null] if otherwise. */ - public static String getKeyDescription(String name) - { - return keys_descr.get(name); - } - - static void addKeyDescr(String name, String descr) - { - keys_descr.put(name, descr); - } - - static { - /* Keys description is shown in the settings. */ - addKeyDescr("capslock", "Caps lock"); - addKeyDescr("switch_greekmath", "Greek & math symbols"); - addKeyDescr("voice_typing", "Voice typing"); - } - // Substitute for [assert], which has no effect on Android. private static void check(boolean b) {