aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-09-26 02:28:21 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-09-26 16:01:34 +0900
commit8108a3e1cdceb1874804f74ec24d824a7df1b669 (patch)
tree06559a6aebed62cd907328606ad65858c48a28cc /java/res
parent1c70a8e147cebd045ab4963751bbcb7b9bbc1962 (diff)
downloadlatinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.tar.gz
latinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.tar.xz
latinime-8108a3e1cdceb1874804f74ec24d824a7df1b669.zip
Add Serbian Latin keyboard
Bug: 9687668 Change-Id: I0631ab04cf33e3d454c965e98a756c31666537bf
Diffstat (limited to 'java/res')
-rw-r--r--java/res/values/donottranslate.xml2
-rw-r--r--java/res/values/strings.xml14
-rw-r--r--java/res/xml-sw600dp/rows_serbian_qwertz.xml43
-rw-r--r--java/res/xml/kbd_serbian_qwertz.xml23
-rw-r--r--java/res/xml/keyboard_layout_set_serbian_qwertz.xml42
-rw-r--r--java/res/xml/method.xml20
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz1.xml25
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz2.xml27
-rw-r--r--java/res/xml/rowkeys_serbian_qwertz3.xml27
-rw-r--r--java/res/xml/rows_serbian_qwertz.xml39
10 files changed, 241 insertions, 21 deletions
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 74988f90f..959fe833b 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -31,11 +31,13 @@
<item>en_GB</item>
<item>es_US</item>
<item>hi_ZZ</item>
+ <item>sr_ZZ</item>
</string-array>
<!-- Subtype locale whose name should be displayed in Locale.ROOT. -->
<string-array name="subtype_locale_displayed_in_root_locale">
<item>hi_ZZ</item>
+ <item>sr_ZZ</item>
</string-array>
<!-- Generic subtype label -->
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index d64444e01..76da5ce3d 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -207,6 +207,10 @@
<string name="subtype_es_US">Spanish (US)</string>
<!-- Description for Hinglish (https://en.wikipedia.org/wiki/Hinglish) keyboard subtype [CHAR LIMIT=25] -->
<string name="subtype_hi_ZZ">Hinglish</string>
+ <!-- Description for Serbian (Latin) keyboard subtype [CHAR LIMIT=25]
+ (Latin) can be an abbreviation to fit in the CHAR LIMIT.
+ Note for Serbian translator: this should be translated with Latin script and (Latin) should be omitted. -->
+ <string name="subtype_sr_ZZ">Serbian (Latin)</string>
<!-- Description for English (UK) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
(UK) should be an abbreviation of United Kingdom to fit in the CHAR LIMIT.
This should be identical to subtype_en_GB aside from the trailing (%s). -->
@@ -222,6 +226,10 @@
<!-- Description for Hinglish (https://en.wikipedia.org/wiki/Hinglish) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
This should be identical to subtype_hi_ZZ aside from the trailing (%s). -->
<string name="subtype_with_layout_hi_ZZ">Hinglish (<xliff:g id="KEYBOARD_LAYOUT" example="QWERTY">%s</xliff:g>)</string>
+ <!-- Description for Serbian (Latin) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
+ This should be identical to subtype_sr_ZZ aside from the trailing (%s).
+ Note for Serbian translator: this should be translated with Latin script. -->
+ <string name="subtype_with_layout_sr_ZZ">Serbian (<xliff:g id="KEYBOARD_LAYOUT" example="QWERTY">%s</xliff:g>)</string>
<!-- Description for "LANGUAGE_NAME" (Traditional) keyboard subtype [CHAR LIMIT=25]
(Traditional) can be an abbreviation to fit in the CHAR LIMIT. -->
<string name="subtype_generic_traditional"><xliff:g id="LANGUAGE_NAME" example="Nepali">%s</xliff:g> (Traditional)</string>
@@ -229,12 +237,6 @@
(Compact) can be an abbreviation to fit in the CHAR LIMIT.
TODO: Remove translatable=false once we are settled down with the naming. -->
<string name="subtype_generic_compact" translatable="false"><xliff:g id="LANGUAGE_NAME" example="Hindi">%s</xliff:g> (Compact)</string>
- <!-- Description for "LANGUAGE_NAME" (Cyrillic) keyboard subtype [CHAR LIMIT=25]
- (Cyrillic) can be an abbreviation to fit in the CHAR LIMIT. -->
- <string name="subtype_generic_cyrillic"><xliff:g id="LANGUAGE_NAME" example="Serbian">%s</xliff:g> (Cyrillic)</string>
- <!-- Description for "LANGUAGE_NAME" (Latin) keyboard subtype [CHAR LIMIT=25]
- (Latin) can be an abbreviation to fit in the CHAR LIMIT. -->
- <string name="subtype_generic_latin"><xliff:g id="LANGUAGE_NAME" example="Serbian">%s</xliff:g> (Latin)</string>
<!-- This string is displayed in a language list that allows to choose a language for
suggestions in a software keyboard. This setting won't give suggestions in any particular
language, hence "No language".
diff --git a/java/res/xml-sw600dp/rows_serbian_qwertz.xml b/java/res/xml-sw600dp/rows_serbian_qwertz.xml
new file mode 100644
index 000000000..a3fb62523
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_serbian_qwertz.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/key_styles_common" />
+ <Row latin:keyWidth="8.182%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row latin:keyWidth="8.182%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row latin:keyWidth="8.182%p" >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz3" />
+ <include latin:keyboardLayout="@xml/keys_exclamation_question" />
+ </Row>
+ <include latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_serbian_qwertz.xml b/java/res/xml/kbd_serbian_qwertz.xml
new file mode 100644
index 000000000..4f763b861
--- /dev/null
+++ b/java/res/xml/kbd_serbian_qwertz.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/rows_serbian_qwertz" />
+</Keyboard> \ No newline at end of file
diff --git a/java/res/xml/keyboard_layout_set_serbian_qwertz.xml b/java/res/xml/keyboard_layout_set_serbian_qwertz.xml
new file mode 100644
index 000000000..2c7e28b50
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_serbian_qwertz.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<KeyboardLayoutSet xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <Element
+ latin:allowRedundantMoreKeys="false"
+ latin:elementKeyboard="@xml/kbd_serbian_qwertz"
+ latin:elementName="alphabet"
+ latin:enableProximityCharsCorrection="true" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_symbols"
+ latin:elementName="symbols" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_symbols_shift"
+ latin:elementName="symbolsShifted" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_phone"
+ latin:elementName="phone" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_phone_symbols"
+ latin:elementName="phoneSymbols" />
+ <Element
+ latin:elementKeyboard="@xml/kbd_number"
+ latin:elementName="number" />
+</KeyboardLayoutSet> \ No newline at end of file
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 74ac79f59..270f90cb8 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -89,7 +89,7 @@
sk: Slovak/qwerty
sl: Slovenian/qwerty
sr: Serbian/south_slavic
- (sr-Latn: Serbian/qwerty) # not yet implemented.
+ (sr_ZZ: Serbian (Latin)/serbian_qwertz) # This is a preliminary keyboard layout.
sv: Swedish/nordic
sw: Swahili/qwerty
ta_IN: Tamil (India)/tamil
@@ -661,24 +661,14 @@
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
android:isAsciiCapable="false"
/>
- <!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
<subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_serbian_cyrillic"
- android:subtypeId="0xXXXXXXXX"
- android:imeSubtypeLocale="sr"
- android:imeSubtypeMode="keyboard"
- android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
- android:isAsciiCapable="false"
- />
- <subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_serbian_latin"
- android:subtypeId="0xXXXXXXXX"
- android:imeSubtypeLocale="sr-Latn"
+ android:label="@string/subtype_sr_ZZ"
+ android:subtypeId="0xf4a5569c"
+ android:imeSubtypeLocale="sr_ZZ"
android:imeSubtypeMode="keyboard"
- android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:imeSubtypeExtraValue="KeyboardLayoutSet=serbian_qwertz,AsciiCapable,EmojiCapable"
android:isAsciiCapable="true"
/>
- -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x48b4ff43"
diff --git a/java/res/xml/rowkeys_serbian_qwertz1.xml b/java/res/xml/rowkeys_serbian_qwertz1.xml
new file mode 100644
index 000000000..1615701d3
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz1.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/rowkeys_qwertz1" />
+ <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON -->
+ <Key latin:keySpec="&#x0161;" />
+</merge> \ No newline at end of file
diff --git a/java/res/xml/rowkeys_serbian_qwertz2.xml b/java/res/xml/rowkeys_serbian_qwertz2.xml
new file mode 100644
index 000000000..83ec92d29
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz2.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/rowkeys_qwerty2" />
+ <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON -->
+ <Key latin:keySpec="&#x010D;" />
+ <!-- U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE -->
+ <Key latin:keySpec="&#x0107;" />
+</merge>
diff --git a/java/res/xml/rowkeys_serbian_qwertz3.xml b/java/res/xml/rowkeys_serbian_qwertz3.xml
new file mode 100644
index 000000000..30ba7afa2
--- /dev/null
+++ b/java/res/xml/rowkeys_serbian_qwertz3.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/rowkeys_qwertz3" />
+ <!-- U+0111: "đ" LATIN SMALL LETTER D WITH STROKE -->
+ <Key latin:keySpec="&#x0111;" />
+ <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON -->
+ <Key latin:keySpec="&#x017E;" />
+</merge>
diff --git a/java/res/xml/rows_serbian_qwertz.xml b/java/res/xml/rows_serbian_qwertz.xml
new file mode 100644
index 000000000..4be2abf1a
--- /dev/null
+++ b/java/res/xml/rows_serbian_qwertz.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
+ <include latin:keyboardLayout="@xml/key_styles_common" />
+ <Row latin:keyWidth="9.091%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz1" />
+ </Row>
+ <Row latin:keyWidth="9.091%p" >
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz2" />
+ </Row>
+ <Row latin:keyWidth="8.711%p" >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.8%p" />
+ <include latin:keyboardLayout="@xml/rowkeys_serbian_qwertz3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include latin:keyboardLayout="@xml/row_qwerty4" />
+</merge> \ No newline at end of file