From 92283f415c17c3952ba36d51b3fed3921028ee86 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Thu, 14 Sep 2023 13:23:07 +0200 Subject: [PATCH] make it compile --- .../{res/raw => assets/dicts}/main_ko.dict | Bin .../inputmethod/event/HangulCombiner.kt | 3 + .../keyboard/internal/KeyboardTextsTable.java | 152 ++++++++---------- 3 files changed, 67 insertions(+), 88 deletions(-) rename app/src/main/{res/raw => assets/dicts}/main_ko.dict (100%) diff --git a/app/src/main/res/raw/main_ko.dict b/app/src/main/assets/dicts/main_ko.dict similarity index 100% rename from app/src/main/res/raw/main_ko.dict rename to app/src/main/assets/dicts/main_ko.dict diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/event/HangulCombiner.kt b/app/src/main/java/org/dslul/openboard/inputmethod/event/HangulCombiner.kt index 510e93c34..db9bf7eb6 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/event/HangulCombiner.kt +++ b/app/src/main/java/org/dslul/openboard/inputmethod/event/HangulCombiner.kt @@ -160,6 +160,9 @@ class HangulCombiner : Combiner { history += currentSyllable.copy(final = jamo) } } + // compiler bug? when it's not added, compiler complains that it's missing + // but when added, linter (correctly) states it's unreachable anyway + is HangulJamo.NonHangul -> Unit } } } diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java index e868898dd..4adfe2dd9 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -19,31 +19,6 @@ package org.dslul.openboard.inputmethod.keyboard.internal; import java.util.HashMap; import java.util.Locale; -/** - * !!!!! DO NOT EDIT THIS FILE !!!!! - * - * This file is generated by tools/make-keyboard-text. The base template file is -/* - * Copyright (C) 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. - */ - -package org.dslul.openboard.inputmethod.keyboard.internal; - -import java.util.HashMap; -import java.util.Locale; - /** * !!!!! DO NOT EDIT THIS FILE !!!!! * @@ -826,9 +801,9 @@ public final class KeyboardTextsTable { null, null, null, null, /* ~ morekeys_u */ // Label for "switch to alphabetic" key. - // U+0995: "ক" BENGALI LETTER KA - // U+0996: "খ" BENGALI LETTER KHA - // U+0997: "গ" BENGALI LETTER GA + // U+0995: "क" BENGALI LETTER KA + // U+0996: "ख" BENGALI LETTER KHA + // U+0997: "ग" BENGALI LETTER GA /* keylabel_to_alpha */ "\u0995\u0996\u0997", /* morekeys_i ~ */ null, null, null, null, null, null, @@ -2024,6 +1999,65 @@ public final class KeyboardTextsTable { /* morekeys_c */ "\u00E7,\u0107,\u010D", }; + /* Locale he: Hebrew */ + private static final String[] TEXTS_he = { + /* morekeys_a ~ */ + null, null, null, null, + /* ~ morekeys_u */ + // Label for "switch to alphabetic" key. + // U+05D0: "א" HEBREW LETTER ALEF + // U+05D1: "ב" HEBREW LETTER BET + // U+05D2: "ג" HEBREW LETTER GIMEL + /* keylabel_to_alpha */ "\u05D0\u05D1\u05D2", + /* morekeys_i ~ */ + null, null, null, + /* ~ morekeys_c */ + /* double_quotes */ "!text/double_rqm_9qm", + /* morekeys_s */ null, + /* single_quotes */ "!text/single_rqm_9qm", + // U+20AA: "₪" NEW SHEQEL SIGN + /* keyspec_currency */ "\u20AA", + /* morekeys_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, + /* ~ keyspec_tablet_comma */ + // U+2605: "★" BLACK STAR + /* morekeys_star */ "\u2605", + // The all letters need to be mirrored are found at + // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt + // U+2264: "≤" LESS-THAN OR EQUAL TO + // U+2265: "≥" GREATER-THAN EQUAL TO + // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK + // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + /* keyspec_left_parenthesis */ "(|)", + /* keyspec_right_parenthesis */ ")|(", + /* keyspec_left_square_bracket */ "[|]", + /* keyspec_right_square_bracket */ "]|[", + /* keyspec_left_curly_bracket */ "{|}", + /* keyspec_right_curly_bracket */ "}|{", + /* keyspec_less_than */ "<|>", + /* keyspec_greater_than */ ">|<", + /* keyspec_less_than_equal */ "\u2264|\u2265", + /* keyspec_greater_than_equal */ "\u2265|\u2264", + /* keyspec_left_double_angle_quote */ "\u00AB|\u00BB", + /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", + /* keyspec_left_single_angle_quote */ "\u2039|\u203A", + /* keyspec_right_single_angle_quote */ "\u203A|\u2039", + /* keyspec_comma ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, + /* ~ morekeys_currency_dollar */ + // U+00B1: "±" PLUS-MINUS SIGN + // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN + /* morekeys_plus */ "\u00B1,\uFB29", + }; + /* Locale hi: Hindi */ private static final String[] TEXTS_hi = { /* morekeys_a ~ */ @@ -2366,65 +2400,6 @@ public final class KeyboardTextsTable { /* morekeys_swiss_row2_11 */ "\u00E0", }; - /* Locale iw: Hebrew */ - private static final String[] TEXTS_iw = { - /* morekeys_a ~ */ - null, null, null, null, - /* ~ morekeys_u */ - // Label for "switch to alphabetic" key. - // U+05D0: "א" HEBREW LETTER ALEF - // U+05D1: "ב" HEBREW LETTER BET - // U+05D2: "ג" HEBREW LETTER GIMEL - /* keylabel_to_alpha */ "\u05D0\u05D1\u05D2", - /* morekeys_i ~ */ - null, null, null, - /* ~ morekeys_c */ - /* double_quotes */ "!text/double_rqm_9qm", - /* morekeys_s */ null, - /* single_quotes */ "!text/single_rqm_9qm", - // U+20AA: "₪" NEW SHEQEL SIGN - /* keyspec_currency */ "\u20AA", - /* morekeys_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, - /* ~ keyspec_tablet_comma */ - // U+2605: "★" BLACK STAR - /* morekeys_star */ "\u2605", - // The all letters need to be mirrored are found at - // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt - // U+2264: "≤" LESS-THAN OR EQUAL TO - // U+2265: "≥" GREATER-THAN EQUAL TO - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - /* keyspec_left_parenthesis */ "(|)", - /* keyspec_right_parenthesis */ ")|(", - /* keyspec_left_square_bracket */ "[|]", - /* keyspec_right_square_bracket */ "]|[", - /* keyspec_left_curly_bracket */ "{|}", - /* keyspec_right_curly_bracket */ "}|{", - /* keyspec_less_than */ "<|>", - /* keyspec_greater_than */ ">|<", - /* keyspec_less_than_equal */ "\u2264|\u2265", - /* keyspec_greater_than_equal */ "\u2265|\u2264", - /* keyspec_left_double_angle_quote */ "\u00AB|\u00BB", - /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", - /* keyspec_left_single_angle_quote */ "\u2039|\u203A", - /* keyspec_right_single_angle_quote */ "\u203A|\u2039", - /* keyspec_comma ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, - /* ~ morekeys_currency_dollar */ - // U+00B1: "±" PLUS-MINUS SIGN - // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN - /* morekeys_plus */ "\u00B1,\uFB29", - }; - /* Locale ka: Georgian */ private static final String[] TEXTS_ka = { /* morekeys_a ~ */ @@ -2544,6 +2519,7 @@ public final class KeyboardTextsTable { /* keyspec_currency */ "\u20B9", }; + // todo: properly add it, should not be done manually /* Locale ko: Korean */ private static final String[] TEXTS_ko = { /* morekeys_a ~ */ @@ -4329,6 +4305,7 @@ public final class KeyboardTextsTable { "fi" , TEXTS_fi, /* 10/ 58 Finnish */ "fr" , TEXTS_fr, /* 13/ 64 French */ "gl" , TEXTS_gl, /* 7/ 8 Galician */ + "iw" , TEXTS_he, /* 20/131 Hebrew */ "hi" , TEXTS_hi, /* 27/ 57 Hindi */ "hi_ZZ" , TEXTS_hi_ZZ, /* 9/118 Hindi (Unknown Region) */ "hr" , TEXTS_hr, /* 9/ 20 Croatian */ @@ -4336,7 +4313,6 @@ public final class KeyboardTextsTable { "hy" , TEXTS_hy, /* 9/134 Armenian */ "is" , TEXTS_is, /* 10/ 16 Icelandic */ "it" , TEXTS_it, /* 11/ 64 Italian */ - "iw" , TEXTS_iw, /* 20/131 Hebrew */ "ka" , TEXTS_ka, /* 3/ 11 Georgian */ "kk" , TEXTS_kk, /* 15/129 Kazakh */ "km" , TEXTS_km, /* 2/130 Khmer */