diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml index 892c72aec..b97d4d7d4 100644 --- a/java/res/values/donottranslate.xml +++ b/java/res/values/donottranslate.xml @@ -152,6 +152,8 @@ %s (QWERTZ) %s (AZERTY) + + %s (Dvorak) com.google.android.inputmethod.latin.dictionarypack diff --git a/java/res/xml-sw600dp/key_question_exclamation.xml b/java/res/xml-sw600dp/key_question_exclamation.xml new file mode 100644 index 000000000..f1495de49 --- /dev/null +++ b/java/res/xml-sw600dp/key_question_exclamation.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + diff --git a/java/res/xml-sw600dp/keys_dvorak_123.xml b/java/res/xml-sw600dp/keys_dvorak_123.xml new file mode 100644 index 000000000..635ea0476 --- /dev/null +++ b/java/res/xml-sw600dp/keys_dvorak_123.xml @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/java/res/xml-sw600dp/row_dvorak4.xml b/java/res/xml-sw600dp/row_dvorak4.xml new file mode 100644 index 000000000..7d365883a --- /dev/null +++ b/java/res/xml-sw600dp/row_dvorak4.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + diff --git a/java/res/xml-sw600dp/rowkeys_dvorak3.xml b/java/res/xml-sw600dp/rowkeys_dvorak3.xml new file mode 100644 index 000000000..2148bb2c7 --- /dev/null +++ b/java/res/xml-sw600dp/rowkeys_dvorak3.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + diff --git a/java/res/xml-sw600dp/rows_dvorak.xml b/java/res/xml-sw600dp/rows_dvorak.xml new file mode 100644 index 000000000..aec4a5cf5 --- /dev/null +++ b/java/res/xml-sw600dp/rows_dvorak.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/java/res/xml-sw768dp/row_dvorak4.xml b/java/res/xml-sw768dp/row_dvorak4.xml new file mode 100644 index 000000000..b98ce8490 --- /dev/null +++ b/java/res/xml-sw768dp/row_dvorak4.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + diff --git a/java/res/xml-sw768dp/rows_dvorak.xml b/java/res/xml-sw768dp/rows_dvorak.xml new file mode 100644 index 000000000..91d0f1bce --- /dev/null +++ b/java/res/xml-sw768dp/rows_dvorak.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/res/xml/kbd_dvorak.xml b/java/res/xml/kbd_dvorak.xml new file mode 100644 index 000000000..27c6a5084 --- /dev/null +++ b/java/res/xml/kbd_dvorak.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/java/res/xml/keyboard_layout_set_dvorak.xml b/java/res/xml/keyboard_layout_set_dvorak.xml new file mode 100644 index 000000000..eb8e0c539 --- /dev/null +++ b/java/res/xml/keyboard_layout_set_dvorak.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + diff --git a/java/res/xml/keys_dvorak_123.xml b/java/res/xml/keys_dvorak_123.xml new file mode 100644 index 000000000..0de2dd628 --- /dev/null +++ b/java/res/xml/keys_dvorak_123.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + diff --git a/java/res/xml/row_dvorak4.xml b/java/res/xml/row_dvorak4.xml new file mode 100644 index 000000000..7b9a59cde --- /dev/null +++ b/java/res/xml/row_dvorak4.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/res/xml/rowkeys_dvorak1.xml b/java/res/xml/rowkeys_dvorak1.xml new file mode 100644 index 000000000..7e0eb6e71 --- /dev/null +++ b/java/res/xml/rowkeys_dvorak1.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + diff --git a/java/res/xml/rowkeys_dvorak2.xml b/java/res/xml/rowkeys_dvorak2.xml new file mode 100644 index 000000000..943e3f549 --- /dev/null +++ b/java/res/xml/rowkeys_dvorak2.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + diff --git a/java/res/xml/rowkeys_dvorak3.xml b/java/res/xml/rowkeys_dvorak3.xml new file mode 100644 index 000000000..b035f41cd --- /dev/null +++ b/java/res/xml/rowkeys_dvorak3.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/java/res/xml/rows_dvorak.xml b/java/res/xml/rows_dvorak.xml new file mode 100644 index 000000000..8e3d071b0 --- /dev/null +++ b/java/res/xml/rows_dvorak.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + diff --git a/java/src/com/android/inputmethod/latin/AdditionalSubtype.java b/java/src/com/android/inputmethod/latin/AdditionalSubtype.java index 28cec56e6..1e405f9a2 100644 --- a/java/src/com/android/inputmethod/latin/AdditionalSubtype.java +++ b/java/src/com/android/inputmethod/latin/AdditionalSubtype.java @@ -28,10 +28,12 @@ public class AdditionalSubtype { public static final String QWERTY = "qwerty"; public static final String QWERTZ = "qwertz"; public static final String AZERTY = "azerty"; + public static final String DVORAK = "dvorak"; public static final String[] PREDEFINED_KEYBOARD_LAYOUT_SET = { QWERTY, QWERTZ, - AZERTY + AZERTY, + DVORAK }; // Keyboard layout to subtype name resource id map. @@ -42,6 +44,7 @@ public class AdditionalSubtype { sKeyboardLayoutToNameIdsMap.put(QWERTY, R.string.subtype_generic_qwerty); sKeyboardLayoutToNameIdsMap.put(QWERTZ, R.string.subtype_generic_qwertz); sKeyboardLayoutToNameIdsMap.put(AZERTY, R.string.subtype_generic_azerty); + sKeyboardLayoutToNameIdsMap.put(DVORAK, R.string.subtype_generic_dvorak); } private AdditionalSubtype() { diff --git a/java/src/com/android/inputmethod/latin/SubtypeLocale.java b/java/src/com/android/inputmethod/latin/SubtypeLocale.java index fc6193287..d291d1a2e 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeLocale.java +++ b/java/src/com/android/inputmethod/latin/SubtypeLocale.java @@ -115,7 +115,12 @@ public class SubtypeLocale { } public static String getKeyboardLayoutSetDisplayName(InputMethodSubtype subtype) { - return getKeyboardLayoutSetName(subtype).toUpperCase(); + final String layoutName = getKeyboardLayoutSetName(subtype); + // TODO: This hack should be removed. + if (layoutName.equals(AdditionalSubtype.DVORAK)) { + return StringUtils.toTitleCase(layoutName, Locale.US); + } + return layoutName.toUpperCase(); } public static String getKeyboardLayoutSetName(InputMethodSubtype subtype) {