diff --git a/bn-national-jatiya.mim b/bn-national-jatiya.mim new file mode 100644 index 0000000..6b961d0 --- /dev/null +++ b/bn-national-jatiya.mim @@ -0,0 +1,403 @@ +;; bn-national-jatiya.mim -- Bengali input method National Jatiya layout +;; Copyright (c) 2022 Red Hat, Inc. All Rights Reserved. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU Lesser General Public License as published by +;; the Free Software Foundation; either version 2.1 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. + +;; You should have received a copy of the GNU Lesser General Public +;; License along with the m17n library; if not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. +;; +;; Author: Mike FABIAN + +(input-method bn national-jatiya (version "1.0.0")) + +(description "Bengali input method for National Jatiya layout. + +https://en.wikipedia.org/wiki/Bengali_input_methods#Bangla_Jatiyo + +Layout taken from + +https://github.com/OpenBangla/OpenBangla-Keyboard/blob/master/data/National_Jatiya.json + +and ported to m17n-db, merging in differences /usr/share/X11/xkb/symbols/bd as far +as possible, giving priority to National_Jatiya.json in case of a conflict. + +One of the conflicts is that National_Jatiya.json has ZWNJ on ` and +AltGr+` and ZWJ on ~ and AltGr+~ whereas /usr/share/X11/xkb/symbols/bd +produces the ASCII characters ` and ~ on these keys. + +See also: + +https://en.wikipedia.org/wiki/Bengali_input_methods#/media/File:KB-Bengali-Jatiyo.svg + +The layout picture from Wikipedia shows a few characters on AltGr which do exist +neither in National_Jatiya.json nor /usr/share/X11/xkb/symbols/bd. + +On top of implementing the plain “National Jatiya” keyboard +layout, this input method also does “automatic vowel forming”, +i.e. if a diacritical form of a vowel like + +া U+09BE BENGALI VOWEL SIGN AA + +is typed after a consonant, it is inserted like that but if it is typed +anywhere else, not following a consonant, it is inserted as + +আ U+0986 BENGALI LETTER AA + +See also: + +https://github.com/lifeparticle/Bengali-Alphabet/blob/master/vowel_diacritics.md +http://unicode.org/charts/nameslist/n_0980.html + +") + +(title "ক") + +(variable + (use-automatic-vowel-forming + (_"If this variable is 1 (the default), automatic vowel forming is used. +For example, a dependent vowel like া is automatically converted to +the independent form আ if it is not typed after a consonant.") + 1 0 1)) ; ((NAME [DESCRIPTION DEFAULT-VALUE VALID-VALUE ...]) + +(map + (independent-vowels + ("H" "অ") ; U+0985 BENGALI LETTER A + ((G-h) "আ") ; U+0986 BENGALI LETTER AA + ((G-d) "ই") ; U+0987 BENGALI LETTER I + ((G-D) "ঈ") ; U+0988 BENGALI LETTER II + ((G-s) "উ") ; U+0989 BENGALI LETTER U + ((G-S) "ঊ") ; U+098A BENGALI LETTER UU + ((G-a) "ঋ") ; U+098B BENGALI LETTER VOCALIC R + ((G-l) "ঌ") ; U+098C BENGALI LETTER VOCALIC L + ((G-c) "এ") ; U+098F BENGALI LETTER E + ((G-C) "ঐ") ; U+0990 BENGALI LETTER AI + ((G-x) "ও") ; U+0993 BENGALI LETTER O + ((G-X) "ঔ") ; U+0994 BENGALI LETTER AU + ) + + (additional-independent-vowels-for-sanskrit + ((G-A) "ৠ") ; U+09E0 BENGALI LETTER VOCALIC RR + ((G-L) "ৡ") ; U+09E1 BENGALI LETTER VOCALIC LL + ) + + (dependent-vowel-signs + ("h" (cond ((= consonant-flag 0) "আ") ; U+0986 BENGALI LETTER AA + ((= consonant-flag 1) "া"))) ; U+09BE BENGALI VOWEL SIGN AA + ("d" (cond ((= consonant-flag 0) "ই") ; U+0987 BENGALI LETTER I + ((= consonant-flag 1) "ি"))) ; U+09BF BENGALI VOWEL SIGN I + ("D" (cond ((= consonant-flag 0) "ঈ") ; U+0988 BENGALI LETTER II + ((= consonant-flag 1) "ী"))) ; U+09C0 BENGALI VOWEL SIGN II + ("s" (cond ((= consonant-flag 0) "উ") ; U+0989 BENGALI LETTER U + ((= consonant-flag 1) "ু"))) ; U+09C1 BENGALI VOWEL SIGN U + ("S" (cond ((= consonant-flag 0) "ঊ") ; U+098A BENGALI LETTER UU + ((= consonant-flag 1) "ূ"))) ; U+09C2 BENGALI VOWEL SIGN UU + ("a" (cond ((= consonant-flag 0) "ঋ") ; U+098B BENGALI LETTER VOCALIC R + ((= consonant-flag 1) "ৃ"))) ; U+09C3 BENGALI VOWEL SIGN VOCALIC R + ((G-e) (cond ((= consonant-flag 0) "ৠ") ; U+09E0 BENGALI LETTER VOCALIC RR + ((= consonant-flag 1) "ৄ"))) ; U+09C4 BENGALI VOWEL SIGN VOCALIC RR + ("c" (cond ((= consonant-flag 0) "এ") ; U+098F BENGALI LETTER E + ((= consonant-flag 1) "ে"))) ; U+09C7 BENGALI VOWEL SIGN E + ("C" (cond ((= consonant-flag 0) "ঐ") ; U+0990 BENGALI LETTER AI + ((= consonant-flag 1) "ৈ"))) ; U+09C8 BENGALI VOWEL SIGN AI + ("x" (cond ((= consonant-flag 0) "ও") ; U+0993 BENGALI LETTER O + ((= consonant-flag 1) "ো"))) ; U+09CB BENGALI VOWEL SIGN O + ("X" (cond ((= consonant-flag 0) "ঔ") ; U+0994 BENGALI LETTER AU + ((= consonant-flag 1) "ৌ"))) ; U+09CC BENGALI VOWEL SIGN AU + ) + + (additional-dependent-vowel-signs-for-sanskrit + ((G-q) (cond ((= consonant-flag 0) "ঌ") ; U+098C BENGALI LETTER VOCALIC L + ((= consonant-flag 1) "ৢ"))) ; U+09E2 BENGALI VOWEL SIGN VOCALIC L + ((G-Q) (cond ((= consonant-flag 0) "ৡ") ; U+09E1 BENGALI LETTER VOCALIC LL + ((= consonant-flag 1) "ৣ"))) ; U+09E3 BENGALI VOWEL SIGN VOCALIC LL + ) + + (consonants + ("j" "ক") ; U+0995 BENGALI LETTER KA + ("J" "খ") ; U+0996 BENGALI LETTER KHA + ("o" "গ") ; U+0997 BENGALI LETTER GA + ("O" "ঘ") ; U+0998 BENGALI LETTER GHA + ("q" "ঙ") ; U+0999 BENGALI LETTER NGA + ("y" "চ") ; U+099A BENGALI LETTER CA + ("Y" "ছ") ; U+099B BENGALI LETTER CHA + ("u" "জ") ; U+099C BENGALI LETTER JA + ("U" "ঝ") ; U+099D BENGALI LETTER JHA + ("I" "ঞ") ; U+099E BENGALI LETTER NYA + ("t" "ট") ; U+099F BENGALI LETTER TTA + ("T" "ঠ") ; U+09A0 BENGALI LETTER TTHA + ("e" "ড") ; U+09A1 BENGALI LETTER DDA + ("E" "ঢ") ; U+09A2 BENGALI LETTER DDHA + ("B" "ণ") ; U+09A3 BENGALI LETTER NNA + ("k" "ত") ; U+09A4 BENGALI LETTER TA + ("K" "থ") ; U+09A5 BENGALI LETTER THA + ("l" "দ") ; U+09A6 BENGALI LETTER DA + ("L" "ধ") ; U+09A7 BENGALI LETTER DHA + ("b" "ন") ; U+09A8 BENGALI LETTER NA + ("r" "প") ; U+09AA BENGALI LETTER PA + ("R" "ফ") ; U+09AB BENGALI LETTER PHA + ("f" "ব") ; U+09AC BENGALI LETTER BA + ("F" "ভ") ; U+09AD BENGALI LETTER BHA + ("m" "ম") ; U+09AE BENGALI LETTER MA + ("w" "য") ; U+09AF BENGALI LETTER YA + ("v" "র") ; U+09B0 BENGALI LETTER RA + ("V" "ল") ; U+09B2 BENGALI LETTER LA + ("M" "শ") ; U+09B6 BENGALI LETTER SHA + ("N" "ষ") ; U+09B7 BENGALI LETTER SSA + ("n" "স") ; U+09B8 BENGALI LETTER SA + ("i" "হ") ; U+09B9 BENGALI LETTER HA + ) + + (additional-consonant + ;; a dead consonant form of ta, without implicit vowel, used in some sequences: + ((G-^) "ৎ") ; U+09CE BENGALI LETTER KHANDA TA + ) + + (additional-consonants + ;; These three consonants with nuktas are listed in + ;; CompositionExclusions.txt. That means that they do not recompose + ;; during normalization. The NFC form is the same as the decomposed + ;; sequence: + ("p" "ড়") ; U+09DC BENGALI LETTER RRA ≡ 09A1 ড 09BC ◌় + ("P" "ঢ়") ; U+09DD BENGALI LETTER RHA ≡ 09A2 ঢ 09BC ◌় + ("W" "য়") ; U+09DF BENGALI LETTER YYA ≡ 09AF য 09BC ◌় + ) + + (various-signs + ("A" "ৗ") ; U+09D7 BENGALI AU LENGTH MARK + ("z" "ঁ") ; U+0981 BENGALI SIGN CANDRABINDU + ("Q" "ং") ; U+0982 BENGALI SIGN ANUSVARA + ("Z" "ঃ") ; U+0983 BENGALI SIGN VISARGA + ((G-.) "়") ; U+09BC BENGALI SIGN NUKTA (for extending the alphabet to new letters, only in /usr/share/X11/xkb/symbols/bn) + ((G-i) "ঽ") ; U+09BD BENGALI SIGN AVAGRAHA + ((G-z) "৺") ; U+09FA BENGALI ISSHAR = ishvar (represents the name of a deity) = svargiya (written before the name of a deceased person) + ) + + (additions-for-assamese + ((G-f) "ৰ") ; U+09F0 BENGALI LETTER RA WITH MIDDLE DIAGONAL = Assamese letter ra + ((G-F) "ৱ") ; U+09F1 BENGALI LETTER RA WITH LOWER DIAGONAL = Assamese letter wa + ) + + (currency-symbols + ((G-$) "৲") ; U+09F2 BENGALI RUPEE MARK = taka • historic currency sign + ((G-4) "৳") ; U+09F3 BENGALI RUPEE SIGN = Bangladeshi taka + ) + + (historic-symbols-for-fractional-values + ((G-1) "৴") ; U+09F4 BENGALI CURRENCY NUMERATOR ONE + ((G-2) "৵") ; U+09F5 BENGALI CURRENCY NUMERATOR TWO + ((G-3) "৶") ; U+09F6 BENGALI CURRENCY NUMERATOR THREE + ((G-5) "৷") ; U+09F7 BENGALI CURRENCY NUMERATOR FOUR + ((G-6) "৸") ; U+09F8 BENGALI CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR + ((G-0) "৹") ; U+09F9 BENGALI CURRENCY DENOMINATOR SIXTEEN + ) + + (other + ((G-7) "ं") ; U+0902 DEVANAGARI SIGN ANUSVARA (Only in /usr/share/X11/xkb/symbols/bn) + ("G" "।") ; U+0964 DEVANAGARI DANDA + ((G-g) "॥") ; U+0965 DEVANAGARI DOUBLE DANDA + ((G-j) "঻") ; U+09BB script bengali, not assigned (Only in /usr/share/X11/xkb/symbols/bn) + ((G-k) "ৎ") ; U+09CE BENGALI LETTER KHANDA TA (Only in /usr/share/X11/xkb/symbols/bn) + ) + + (joiner + ((G--) "‌") ; U+200C ZERO WIDTH NON-JOINER (Only in /usr/share/X11/xkb/symbols/bn) + ("~" "‍") ; U+200D ZERO WIDTH JOINER (Only in OpenBangla National_Jatiya.json) + ((G-~) "‍") ; U+200D ZERO WIDTH JOINER (Only in OpenBangla National_Jatiya.json) + ("`" "‌") ; U+200C ZERO WIDTH NON-JOINER (Only in OpenBangla National_Jatiya.json) + ((G-`) "‌") ; U+200C ZERO WIDTH NON-JOINER (Only in OpenBangla National_Jatiya.json) + ((G-=) "‍") ; U+200D ZERO WIDTH JOINER (Only in /usr/share/X11/xkb/symbols/bn) + ) + + (nothing + ((G-8) "") ; Nothing + ((G-9) "") ; Nothing + ((G-&) "") ; Nothing + ((G-') "") ; Nothing + ((G-*) "") ; Nothing + ((G-@) "") ; Nothing + ((G-B) "") ; Nothing + ((G-\\) "") ; Nothing + ((G-|) "") ; Nothing + ((G-{) "") ; Nothing + ((G-}) "") ; Nothing + ((G-[) "") ; Nothing + ((G-]) "") ; Nothing + ((G-:) "") ; Nothing + ((G-,) "") ; Nothing + ((G-E) "") ; Nothing + ((G-!) "") ; Nothing + ((G-G) "") ; Nothing + ((G->) "") ; Nothing + ((G-H) "") ; Nothing + ((G-#) "") ; Nothing + ((G-I) "") ; Nothing + ((G-J) "") ; Nothing + ((G-K) "") ; Nothing + ((G-<) "") ; Nothing + ((G-M) "") ; Nothing + ((G-N) "") ; Nothing + ((G-O) "") ; Nothing + ((G-P) "") ; Nothing + ((G-\() "") ; Nothing + ((G-\)) "") ; Nothing + ((G-%) "") ; Nothing + ((G-+) "") ; Nothing + ((G-?) "") ; Nothing + ((G-\") "") ; Nothing + ((G-R) "") ; Nothing + ((G-;) "") ; Nothing + ((G-/) "") ; Nothing + ((G-T) "") ; Nothing + ((G-U) "") ; Nothing + ((G-_) "") ; Nothing + ((G-V) "") ; Nothing + ((G-W) "") ; Nothing + ((G-Y) "") ; Nothing + ((G-Z) "") ; Nothing + ((G-b) "") ; Nothing + ((G-m) "") ; Nothing + ((G-n) "") ; Nothing + ((G-o) "") ; Nothing + ((G-p) "") ; Nothing + ((G-r) "") ; Nothing + ((G-t) "") ; Nothing + ((G-u) "") ; Nothing + ((G-v) "") ; Nothing + ((G-w) "") ; Nothing + ((G-t) "") ; Nothing + ((G-u) "") ; Nothing + ((G-v) "") ; Nothing + ((G-w) "") ; Nothing + ((G-y) "") ; Nothing + ) + + (digits + ("0" "০") ; U+09E6 BENGALI DIGIT ZERO + ("1" "১") ; U+09E7 BENGALI DIGIT ONE + ("2" "২") ; U+09E8 BENGALI DIGIT TWO + ("3" "৩") ; U+09E9 BENGALI DIGIT THREE + ("4" "৪") ; U+09EA BENGALI DIGIT FOUR + ("5" "৫") ; U+09EB BENGALI DIGIT FIVE + ("6" "৬") ; U+09EC BENGALI DIGIT SIX + ("7" "৭") ; U+09ED BENGALI DIGIT SEVEN + ("8" "৮") ; U+09EE BENGALI DIGIT EIGHT + ("9" "৯") ; U+09EF BENGALI DIGIT NINE + ) + + (numpad + ((KP_0) "০") ; U+09E6 BENGALI DIGIT ZERO + ((KP_1) "১") ; U+09E7 BENGALI DIGIT ONE + ((KP_2) "২") ; U+09E8 BENGALI DIGIT TWO + ((KP_3) "৩") ; U+09E9 BENGALI DIGIT THREE + ((KP_4) "৪") ; U+09EA BENGALI DIGIT FOUR + ((KP_5) "৫") ; U+09EB BENGALI DIGIT FIVE + ((KP_6) "৬") ; U+09EC BENGALI DIGIT SIX + ((KP_7) "৭") ; U+09ED BENGALI DIGIT SEVEN + ((KP_8) "৮") ; U+09EE BENGALI DIGIT EIGHT + ((KP_9) "৯") ; U+09EF BENGALI DIGIT NINE + ((KP_Add) "+") ; U+002B PLUS SIGN + ((KP_Decimal) ".") ; U+002E FULL STOP + ((KP_Divide) "/") ; U+002F SOLIDUS + ((KP_Multiply) "*") ; U+002A ASTERISK + ((KP_Subtract) "-") ; U+002D HYPHEN-MINUS + ) + + (special + ("." ".") ; U+002E FULL STOP + ("&" "&") ; U+0026 AMPERSAND + ("'" "'") ; U+0027 APOSTROPHE + ("*" "*") ; U+002A ASTERISK + ("@" "@") ; U+0040 COMMERCIAL AT + ("\\" "\\") ; U+005C REVERSE SOLIDUS + ("|" "|") ; U+007C VERTICAL LINE + ("{" "{") ; U+007B LEFT CURLY BRACKET + ("}" "}") ; U+007D RIGHT CURLY BRACKET + ("[" "[") ; U+005B LEFT SQUARE BRACKET + ("]" "]") ; U+005D RIGHT SQUARE BRACKET + ("^" "^") ; U+005E CIRCUMFLEX ACCENT + (":" ":") ; U+003A COLON + ("," ",") ; U+002C COMMA + ("$" "$") ; U+0024 DOLLAR SIGN + ("=" "=") ; U+003D EQUALS SIGN + ("!" "!") ; U+0021 EXCLAMATION MARK + (">" ">") ; U+003E GREATER-THAN SIGN + ("#" "#") ; U+0023 NUMBER SIGN + ("<" "<") ; U+003C LESS-THAN SIGN + ("-" "-") ; U+002D HYPHEN-MINUS + ("(" "(") ; U+0028 LEFT PARENTHESIS + (")" ")") ; U+0029 RIGHT PARENTHESIS + ("%" "%") ; U+0025 PERCENT SIGN + ("+" "+") ; U+002B PLUS SIGN + ("?" "?") ; U+003F QUESTION MARK + ("\"" "\"") ; U+0022 QUOTATION MARK + (";" ";") ; U+003B SEMICOLON + ("/" "/") ; U+002F SOLIDUS + ("_" "_") ; U+005F LOW LINE + ) + + (deadkey + ("g" "্") ; U+09CD BENGALI SIGN VIRAMA + ) + + (dead-key-completions + ("h" (delete @-) "আ") ; + া U+09BE BENGALI VOWEL SIGN AA = আ U+0986 BENGALI LETTER AA + ("d" (delete @-) "ই") ; + ি U+09BF BENGALI VOWEL SIGN I = ই U+0987 BENGALI LETTER I + ("D" (delete @-) "ঈ") ; + ী U+09C0 BENGALI VOWEL SIGN II = ঈ U+0988 BENGALI LETTER II + ("s" (delete @-) "উ") ; + ু U+09C1 BENGALI VOWEL SIGN U = উ U+0989 BENGALI LETTER U + ("S" (delete @-) "ঊ") ; + ূ U+09C2 BENGALI VOWEL SIGN UU = ঊ U+098A BENGALI LETTER UU + ("a" (delete @-) "ঋ") ; + ৃ U+09C3 BENGALI VOWEL SIGN VOCALIC R = ঋ U+098B BENGALI LETTER VOCALIC R + ("c" (delete @-) "এ") ; + ে U+09C7 BENGALI VOWEL SIGN E = এ U+098F BENGALI LETTER E + ("C" (delete @-) "ঐ") ; + ৈ U+09C8 BENGALI VOWEL SIGN AI = ঐ U+0990 BENGALI LETTER AI + ("x" (delete @-) "ও") ; + ো U+09CB BENGALI VOWEL SIGN O = ও U+0993 BENGALI LETTER O + ("X" (delete @-) "ঔ") ; + ৌ U+09CC BENGALI VOWEL SIGN AU = ঔ U+0994 BENGALI LETTER AU + ("G" (delete @-) "॥") ; + । U+0964 DEVANAGARI DANDA = ॥ U+0965 DEVANAGARI DOUBLE DANDA + )) + +(state + (init + (t (cond + ((= use-automatic-vowel-forming 1) (set consonant-flag 0)) + (1 (set consonant-flag 1)))) + (independent-vowels) + (additional-independent-vowels-for-sanskrit) + (dependent-vowel-signs) + (additional-dependent-vowel-signs-for-sanskrit) + (consonants (set consonant-flag 1) (shift after-consonant)) + (additional-consonant) + (additional-consonants (set consonant-flag 1) (shift after-consonant)) + (various-signs) + (additions-for-assamese) + (currency-symbols) + (historic-symbols-for-fractional-values) + (other) + (joiner) + (nothing) + (digits) + (numpad) + (special) + (deadkey (shift virama))) + + (after-consonant + (dependent-vowel-signs (shift init)) + (additional-dependent-vowel-signs-for-sanskrit (shift init)) + (nil (shift init)) + ) + + (virama + (dead-key-completions (shift init)) + (nil (shift init)))) + +;; Local Variables: +;; coding: utf-8 +;; mode: emacs-lisp +;; End: diff --git a/bn-national-jatiya.png b/bn-national-jatiya.png new file mode 100644 index 0000000..7030f10 Binary files /dev/null and b/bn-national-jatiya.png differ diff --git a/m17n-db.spec b/m17n-db.spec index 55047b0..c1be575 100644 --- a/m17n-db.spec +++ b/m17n-db.spec @@ -1,7 +1,7 @@ Name: m17n-db Summary: Multilingualization datafiles for m17n-lib Version: 1.8.0 -Release: 21%{?dist} +Release: 25%{?dist} License: LGPLv2+ URL: http://www.nongnu.org/m17n @@ -11,6 +11,13 @@ Source1: https://releases.pagure.org/inscript2/inscript2-20210820.tar.gz # Following is awaiting for upstream commit Source2: https://raw.githubusercontent.com/gnuman/m17n-inglish-mims/master/minglish/minglish.mim Source3: https://github.com/mike-fabian/m17n-db-sayura/archive/1.0.0.tar.gz#/m17n-db-sayura-1.0.0.tar.gz +Source4: https://raw.githubusercontent.com/shantanuo/gamabhana/main/usr/share/m17n/mr-gamabhana.mim +Source5: https://github.com/shantanuo/gamabhana/blob/main/usr/share/m17n/icons/mr-gamabhana.png +Source6: https://raw.githubusercontent.com/mike-fabian/m17n-db-bn-national-jatiya/main/bn-national-jatiya.mim +Source7: https://raw.githubusercontent.com/mike-fabian/m17n-db-bn-national-jatiya/main/icons/bn-national-jatiya.png +# Improved unicode.mim, see: +# https://lists.nongnu.org/archive/html/m17n-list/2022-06/msg00009.html +Source8: unicode.mim BuildArch: noarch BuildRequires: make @@ -73,10 +80,6 @@ sed -i 's/ ("ld" "སྡ")/ ("ld" "ལྡ")/g' MIM/bo-ewts.mim %install %{make_install} -# don't ship unijoy map for now -rm %{buildroot}%{_datadir}/m17n/bn-unijoy.mim -rm %{buildroot}%{_datadir}/m17n/icons/bn-unijoy.png - #removing ispell.mim for rh#587927 rm %{buildroot}%{_datadir}/m17n/ispell.mim @@ -91,6 +94,17 @@ cp -p inscript2/icons/* %{buildroot}%{_datadir}/m17n/icons cp -p m17n-db-sayura-1.0.0/si-sayura.mim %{buildroot}%{_datadir}/m17n cp -p m17n-db-sayura-1.0.0/icons/si-sayura.png %{buildroot}%{_datadir}/m17n/icons +# install mr-gamabhana +/usr/bin/install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/m17n +/usr/bin/install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/m17n/icons + +# install bn-national-jatiya +/usr/bin/install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/m17n +/usr/bin/install -m 644 %{SOURCE7} %{buildroot}%{_datadir}/m17n/icons + +# install improved unicode.mim +/usr/bin/install -m 644 %{SOURCE8} %{buildroot}%{_datadir}/m17n + # For installing the translation files %find_lang %name @@ -147,6 +161,21 @@ cp -p m17n-db-sayura-1.0.0/icons/si-sayura.png %{buildroot}%{_datadir}/m17n/icon %{_datadir}/pkgconfig/m17n-db.pc %changelog +* Fri Aug 19 2022 Mike FABIAN - 1.8.0-25 +- Add bn-national-jatiya.{mim,png} +- Add improved unicode.mim + +* Tue Jul 12 2022 Mike FABIAN - 1.8.0-24 +- Add mr-gamabhana.png icon for mr-gamabhana.mim input method + +* Mon Jul 11 2022 Mike FABIAN - 1.8.0-23 +- Ship the bn-unijoy.mim as well, it seems to work, maybe there + was some problem in the past. But at the moment I see no reason + to omit it. + +* Fri Feb 25 2022 Mike FABIAN - 1.8.0-22 +- Add mr-gamabhana.mim input method + * Fri Aug 20 2021 Parag Nemade - 1.8.0-21 - Update inscript2 keymaps to new upstream release 20210820 diff --git a/mr-gamabhana.mim b/mr-gamabhana.mim new file mode 100644 index 0000000..c5bf7ff --- /dev/null +++ b/mr-gamabhana.mim @@ -0,0 +1,333 @@ +;; mr-gamabhana.mim -- Marathi input method with GaMaBhaNa +;; This file is part of the m17n database; a sub-part of the m17n +;; library. + +;; The m17n library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 2.1 of +;; the License, or (at your option) any later version. + +;; The m17n library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. + +;; You should have received a copy of the GNU Lesser General Public +;; License along with the m17n library; if not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +(input-method mr gamabhana) + +(description "Based on Hindi input method by ITRANS and Harvard-Kyoto +transliteration systems. +You can use all the standard ITRANS key sequences plus key +sequences such as the below. + + nk->ङ्क्, nkh->ङ्ख्, ng->ङ्ग्, ngh->ङ्घ् + nch->ञ्च्, nCh->ञ्छ्, nc->ञ्च्, nC->ञ्छ्, nchh->ञ्छ्, + nj->ञ्ज्, njh->ञ्झ्, nT->ण्ट्, nTh->ण्ठ्, nD->ण्ड्, nDh->ण्ढ् + c->च्, C->छ्, z->श्, S->ष्, jn->ज्ञ्, R->ऋ + +In addition, for convenience, when a consonant + halant sequence +is followed by non Devanagari letter, the last halant is removed. +For instance, 'k SPC'->'क ', 'k..'->'क।'. + +The motivation behind additions made to the basic ITRANS scheme +is described in http://sanskritnlp.appspot.com/optitrans.html, +along with a tabulated comparison with several other +transliteration schemes. + +Also, see: http://en.wikipedia.org/wiki/Devanagari_transliteration.") + +(title "क") + +(variable + (trim-last-halant + (_"If this variable is 1 (the default), the last Halant in a syllable +is removed if it is followed by non Devanagari letter. For instance, +typing \"har..\" produces \"हर।\", not \"हर्।\".") + 1 0 1)) + +(map + (starter + (".") ("~") ("#") ("$") ("*") ("]") ((S-\ )) ((C-@)) + ("0") ("1") ("2") ("3") ("4") ("5") ("6") ("7") ("8") ("9") + ("A") ("C") ("D") ("E") ("G") ("H") ("I") ("J") ("K") ("L") + ("M") ("N") ("O") ("R") ("S") ("T") ("U") ("Y") + ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i") + ("j") ("k") ("l") ("m") ("n") ("o") ("p") ("q") ("r") + ("s") ("t") ("u") ("v") ("w") ("x") ("y") ("z") + ((KP_1)) ((KP_2)) ((KP_3)) ((KP_4)) ((KP_5)) + ((KP_6)) ((KP_7)) ((KP_8)) ((KP_9)) ((KP_0))) + + (consonant + ("k" "क्") + ("kh" "ख्") + ("K" "ख्") + ("g" "ग्") + ("gh" "घ्") + ("G" "घ्") + (".k" "क़् ") + ("q" "क़्") + (".kh" "ख़्") + (".K" "ख़्") + (".g" "ग़्") + ("nk" "ङ्क्") + ("nx" "ङ्क्ष्") + ("nkh" "ङ्ख्") + ("nK" "ङ्ख्") + ("ng" "ङ्ग्") + ("ngh" "ङ्घ्") + ("nG" "ङ्घ्") + ("~N" "ङ्") + ("N^" "ङ्") + ("NG" "ङ्") + ("ch" "च्") + ("Ch" "छ्") ; not in ITRANS Devenagari table + ("c" "च्") + ("C" "छ्") ; not in ITRANS Devenagari table + ("chh" "छ्") + ("j" "ज्") + ("jh" "झ्") + ("J" "झ्") + ("nch" "ञ्च्") + ("nCh" "ञ्छ्") ; not in ITRANS Devenagari table + ("nc" "ञ्च्") + ("nC" "ञ्छ्") ; not in ITRANS Devenagari table + ("nchh" "ञ्छ्") + ("nj" "ञ्ज्") + ("njh" "ञ्झ्") + ("nJ" "ञ्झ्") + ("~n" "ञ्") + ("JN" "ञ्") + ("NY" "ञ्") + ("T" "ट्") + ("Th" "ठ्") + ("D" "ड्") + ("Dh" "ढ्") + (".D" "ड़्") + (".Dh" "ढ़्") + ("nT" "ण्ट्") + ("nTh" "ण्ठ्") + ("nD" "ण्ड्") + ("nDh" "ण्ढ्") + ("N" "ण्") + ("t" "त्") + ("th" "थ्") + ("d" "द्") + ("dh" "ध्") + ("n" "न्") + (":n" "ऩ्") ; not in ITRANS Devenagari table + ("p" "प्") + ("ph" "फ्") + ("P" "फ्") + (".ph" "फ़्") + ("f" "फ्") + ("b" "ब्") + ("bh" "भ्") + ("B" "भ्") + ("m" "म्") + ("y" "य्") + ("Y" "य़्") ; not in ITRANS Devanagari table + ("yh" "य़्") ; not in ITRANS Devanagari table + (".y" "य़्") + ("r" "र्") + ("l" "ल्") + ("L" "ळ्") + ("ld" "ळ्") + ("v" "व्") + ("w" "व्") + ("sh" "श्") + ("z" "ज़्") + (".j" "ज़्") +; ("z" "श्") + ("S" "ष्") + ("Sh" "ष्") + ("shh" "ष्") + ("s" "स्") + ("h" "ह्") + ("jn" "ज्ञ्") + ("j~n" "ज्ञ्") + ("jn" "ज्ञ्") + ("GY" "ज्ञ्") + ("Gy" "ज्ञ्") + ("dny" "ज्ञ्") ; not in ITRANS Devanagari table + ("x" "क्ष्") + ("ks" "क्स्") + ("ksh" "क्ष्") + ("gH" ॻ्) + ("jH" ॼ्) + ("DH" "ॾ्") + ("Ry" "ऱ्य्") + ("Rh" "ऱ्ह्") + ("dhd" "द्ध्") + ("vd" "द्व्") + ("kn" "क्न्") + ("gn" "ग्‍न्") + ("ghn" "घ्‍न्") + ("tn" "त्‍न्") + ("dn" "द्‍न्") + ("nn" "न्‍न्") + ("pn" "प्‍न्") + ("mn" "म्‍न्") + ("sn" "स्‍न्") + ("shn" "श्‍न्") + ("bH" "ॿ्")) + + (independent + ("a" "अ") + ("aa" "आ") + ("A" "आ") + ("i" "इ") + ("ii" "ई") + ("I" "ई") + ("u" "उ") + ("uu" "ऊ") + ("U" "ऊ") + ("RU" "ऋ") + ("Ri" "ऋ") + ("RI" "ॠ") + ("O" "ऑ") + ("E" "ॲ") + ("RRi" "ऋ") + ("R^i" "ऋ") + ("LLi" "ऌ") ; not in ITRANS Devanagari table + ("L^i" "ऌ") ; not in ITRANS Devanagari table + (".c" "ऍ") ; not in ITRANS Devanagari table + ("ea" "ऍ") ; not in ITRANS Devanagari table + ("ee" (set CANDRA-E-O 0) "ई") ; not in ITRANS Devanagari table + ("e" (set CANDRA-E-O ?ऍ) "ए") + ("ai" "ऐ") + ("oo" (set CANDRA-E-O 0) "ऊ") + ("o" (set CANDRA-E-O ?ऑ) "ओ") + ("oa" "ऑ") + ("au" "औ") + ("ou" "औ") + ("RRI" "ॠ") ; not in ITRANS Devanagari table + ("RR" "ॠ") ; not in ITRANS Devanagari table + ("R^I" "ॠ") ; not in ITRANS Devanagari table + ("LLI" "ॡ") ; not in ITRANS Devanagari table + ("L^I" "ॡ") ; not in ITRANS Devanagari table + (".N" "ँ") + (".n" "ं") + ("M" "ं") + ("H" "ः") + ("kH" "ᳵ") + ("pH" "ᳶ") + (".a" "ऽ") + (".h" "्") + ("AUM" "ॐ") + ("OM" "ॐ") + ("$" "र्") ; not in ITRANS Devanagari table + ((S-\ ) "‌") ; not in ITRANS Devanagari table + ((C-@) "‍")) ; not in ITRANS Devanagari table + + (digit + ("0" "०") + ("1" "१") + ("2" "२") + ("3" "३") + ("4" "४") + ("5" "५") + ("6" "६") + ("7" "७") + ("8" "८") + ("9" "९") + ((KP_0) "०") + ((KP_1) "१") + ((KP_2) "२") + ((KP_3) "३") + ((KP_4) "४") + ((KP_5) "५") + ((KP_6) "६") + ((KP_7) "७") + ((KP_8) "८") + ((KP_9) "९")) + + (dependent + ("O" (delete @-) "ॉ") + ("E" (delete @-) "ॅ") + ("a" (delete @-) "") + ("aa" (delete @-) "ा") + ("A" (delete @-) "ा") + ("i" (delete @-) "ि") + ("ii" (delete @-) "ी") + ("I" (delete @-) "ी") + ("u" (delete @-) "ु") + ("uu" (delete @-) "ू") + ("U" (delete @-) "ू") + ("R" (delete @-) "ृ") + ("RRi" (delete @-) "ृ") + ("R^i" (delete @-) "ृ") + ("LLi" (delete @-) "ॢ") ; not in ITRANS Devanagari table + ("L^i" (delete @-) "ॢ") ; not in ITRANS Devanagari table + (".c" (delete @-) "ॅ") ; not in ITRANS Devanagari table + ("ea" (delete @-) "ॅ") ; not in ITRANS Devanagari table + ("ee" (delete @-) (set CANDRA-E-O 0) "ी") ; not in ITRANS Devanagari table + ("e" (delete @-) (set CANDRA-E-O ?ॅ) "े") + ("ai" (delete @-) "ै") + ("oo" (delete @-) (set CANDRA-E-O 0) "ू") + ("o" (delete @-) (set CANDRA-E-O ?ॉ) "ो") + ("oa" "ॉ") + ("au" (delete @-) "ौ") + ("ou" (delete @-) "ौ") + ("RR" (delete @-) "ॄ") ; not in ITRANS Devanagari table + ("RRI" (delete @-) "ॄ") ; not in ITRANS Devanagari table + ("R^I" (delete @-) "ॄ") ; not in ITRANS Devanagari table + ("LLI" (delete @-) "ॣ") ; not in ITRANS Devanagari table + ("L^I" (delete @-) "ॣ")) ; not in ITRANS Devanagari table + + (dot + ("." (set DOT 1) ".")) + + (eo-dot-c + (".c" (delete @-) (insert CANDRA-E-O))) + + (commit-key + ((S-C-Return))) + + (backspace + ((BackSpace) (undo)))) + +(state + (init + (starter (pushback 1) (shift intermediate))) + + (intermediate + ;; CANDRA-E-O is set to the character CANDRA E or CANDRA O when "e" + ;; or "o" is typed, and in that case, if ".c" is typed, the + ;; character set to CANDRA-E-O is inserted. + (t (set CANDRA-E-O 0)) + ;; LAST-HALANT-POS is set to the position after a consonat + HALANT + ;; sequence. If the following key is for non-letter, that HALANT + ;; character is removed. + (consonant (mark LAST-HALANT-POS) (shift second)) + (independent (cond (CANDRA-E-O (shift after-eo)) (1 (shift init)))) + (digit (shift init)) + (backspace) + (commit-key (shift init))) + + (second + ;; CANDRA-E-O is set to the character CANDRA E or CANDRA O when "e" + ;; or "o" is typed, and in that case, if ".c" is typed, the + ;; character set to CANDRA-E-O is inserted. + (t (set CANDRA-E-O 0)) + (consonant (mark LAST-HALANT-POS)) + (dependent (cond (CANDRA-E-O (shift after-eo)) (1 (shift init)))) + (backspace) + (commit-key (shift init)) + (nil (cond (trim-last-halant (move LAST-HALANT-POS) (delete @-) (move @>))) + (shift init))) + + (after-eo + (t (set DOT 0)) + (dot) + (eo-dot-c (shift init)) + (commit-key (shift init)) + (nil (cond (DOT (delete @-) (pushback 1))) (shift init)))) + +;; Local Variables: +;; coding: utf-8 +;; mode: emacs-lisp +;; End: diff --git a/mr-gamabhana.png b/mr-gamabhana.png new file mode 100644 index 0000000..4b6b99c Binary files /dev/null and b/mr-gamabhana.png differ diff --git a/unicode.mim b/unicode.mim new file mode 100644 index 0000000..fb374b7 --- /dev/null +++ b/unicode.mim @@ -0,0 +1,78 @@ +;; unicode.mim -- Input method for Unicode characters by typing character code +;; Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H15PRO112 + +;; This file is part of the m17n database; a sub-part of the m17n +;; library. + +;; The m17n library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 2.1 of +;; the License, or (at your option) any later version. + +;; The m17n library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. + +;; You should have received a copy of the GNU Lesser General Public +;; License along with the m17n library; if not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +(input-method t unicode) + +(description (_"Input method for Unicode characters using hexadigits. +Type C-u followed by hexadecimal numbers [0-9A-Fa-f] +of a Unicode character code. +To finish and insert the resulting character, type a space. + +If you type more than 5 hex digits and finish with space, +the result is empty and nothing at all is inserted. +")) + +(title "UNICODE") + +(variable + (prompt (_"Preedit prompt +Prompt string shown in the preedit area while typing hexadecimal numbers.") + "U+")) +(command + (start (_"Start Unicode +Start typing hexadecimal numbers of Unicode character.") + (C-U))) + +(map + (starter + (start prompt)) + + (hex + (" " " ") ; The space key is used to commit + ("0" "0") ("1" "1") ("2" "2") ("3" "3") ("4" "4") + ("5" "5") ("6" "6") ("7" "7") ("8" "8") ("9" "9") + ("A" "A") ("B" "B") ("C" "C") ("D" "D") ("E" "E") ("F" "F") + ("a" "A") ("b" "B") ("c" "C") ("d" "D") ("e" "E") ("f" "F")) + + (backspace + ((BackSpace)))) + +(state + (init + (starter (set code 0) (set count 0) (shift uni-hex))) + + (uni-hex + (hex (set this @-1) + (cond ((< @-1 ?A) (sub this 48)) + (1 (sub this 55))) + (cond ((= @-1 0x0020) (set code code)) + ((> count 4) (set code 0)) + (1 (set code (+ (* code 16) this)))) + (set count (+ count 1)) + (cond ((= @-1 0x0020) + (delete @<) (insert code) (shift init)))) + (backspace (undo)))) + +;; Local Variables: +;; mode: lisp +;; End: