From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rahguzar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66470: 29.1; Provide Urdu input method Date: Sat, 21 Oct 2023 20:59:10 +0200 Message-ID: <87zg0bye19.fsf@zohomail.eu> References: <87pm1lm23l.fsf@zohomail.eu> <87lec9m12g.fsf@zohomail.eu> <837cnpshz2.fsf@gnu.org> <877cnp1ojf.fsf@zohomail.eu> <83zg0lqxtq.fsf@gnu.org> <8734yd1mfm.fsf@zohomail.eu> <83sf6dqt33.fsf@gnu.org> Reply-To: Rahguzar Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1534"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.7; emacs 29.1 Cc: 66470@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 21 21:25:51 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1quHba-0000Bs-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Oct 2023 21:25:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quHbO-0004XT-V4; Sat, 21 Oct 2023 15:25:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quHbL-0004WR-2Q for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 15:25:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quHbJ-00089x-To for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 15:25:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quHbl-0001BL-OA for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 15:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rahguzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2023 19:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66470 X-GNU-PR-Package: emacs Original-Received: via spool by 66470-submit@debbugs.gnu.org id=B66470.16979163184471 (code B ref 66470); Sat, 21 Oct 2023 19:26:01 +0000 Original-Received: (at 66470) by debbugs.gnu.org; 21 Oct 2023 19:25:18 +0000 Original-Received: from localhost ([127.0.0.1]:45092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quHb2-0001A2-UX for submit@debbugs.gnu.org; Sat, 21 Oct 2023 15:25:18 -0400 Original-Received: from sender11-pp-o91.zoho.eu ([31.186.226.249]:25156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quHb0-00019r-Ci for 66470@debbugs.gnu.org; Sat, 21 Oct 2023 15:25:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1697916277; cv=none; d=zohomail.eu; s=zohoarc; b=k6G56V86h+Kw1UrVXSaUB2cSOqDQOc5vCxU1e+lCDqmP3Uk/tXD2Z+pjEj7QOVszNvMU0En4Kj9x+nRi5565Jd93hlImUKNCUEkrgMj0nyGmXCLttYZZqvK/Ev3XSxUShtEgomGaGZQEBIiJW0M8K7NfkX7CZ2ZSZtV60IDktes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1697916277; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=uZy2PCe/MLRVgM6BLEPj0fWfEyLCSHbNEiooi6Qtrfk=; b=AFj4IRwzIpgK+HcqK3imic4Lk4zUITazkMgTvfG9S6yN47IYJqVVS5sqm6danUAbst0Q5TnMw7CEJ2OQW6fE3Svs6GP6CpeSt4Xl5/IiO0RxgIRTvhMnuStk4nN9ZwZcaN0qAPOlUlqtJ3zMa+qNG/ZAfHwvuYPi4PbDC9nypOw= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1697916277; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=uZy2PCe/MLRVgM6BLEPj0fWfEyLCSHbNEiooi6Qtrfk=; b=JpShOBJCNWP4YI4m3DemBsDEOOhIxRuzOaxm/OlWF3WprHi0iBwhq2ng7Iy1MqHe jlgHgNYnt6qMAuIrAU2nq6quM4PK+lGVc4Mq1eHVvYbKvQ8W61vKYQox+c650n9QlgY /8PESgrnFHd8WhIH/h5npqem4/J1NGyvKpKO582g= Original-Received: from localhost (78-73-246-128-no600.tbcn.telia.com [78.73.246.128]) by mx.zoho.eu with SMTPS id 1697916276147771.4511975355786; Sat, 21 Oct 2023 21:24:36 +0200 (CEST) In-reply-to: <83sf6dqt33.fsf@gnu.org> X-Zoho-Virus-Status: 1 X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272935 Archived-At: --=-=-= Content-Type: text/plain Hi Eli, I have attached a new patch with this email containing 5 input methods. 3 of them for Urdu and 1 each for Pashto and Sindhi. Two of Urdu input methods correspond to the two keyboards at https://www.branah.com/urdu and the Pashto and Sindhi input methods follow keyboard layouts from the same page. The remaining input method roughly corresponds to the one I sent before. The changes are: 1) Translations are customizable. 2) Numerals can be Arabic or Roman depending on a customizable variable. This is because both are routinely used in Urdu text. 3) There are a bunch of prefixes which are customizable. Some of these prefixes are for inputting characters from Balochi, Brahui, Hindko, Pashto, Saraiki and Sindhi. After including Punjabi which can be inputted using the same characters as Urdu (along with maybe one character from Saraiki) this covers all characters from all languages spoken by more than 1% of people in Pakistan according to Wikipedia https://en.wikipedia.org/wiki/Languages_of_Pakistan . In (not too distant) future I would also like to add keyboard layouts for Balochi and Saraiki. I cannot speak these languages but I can find some keyboard layouts on internet, e.g. https://keymanweb.com/#skr-arab,Keyboard_saraiki https://keymanweb.com/#bal,Keyboard_balochi_phonetic Are there any copyright issues to be aware of in using the layouts from web? Another question: For the customize types, I have opted for character as the type of a translation. I think it is the most convenient choice for someone wanting to customize. However it is not most general type quail allows. Is there any opinion on what the type should be? Lastly customizing these variables has the potential to shadow some translations. For this I would like to add a check to the setter functions that checks for that and raises a warning if such a shadowing occurs. Is there a standard customize way of raising such a warning? Please let me know of any changes to be made. Thanks, Rahguzar --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Input-methods-for-Urdu-Pashto-and-Sindhi.patch Content-Transfer-Encoding: quoted-printable >From f65a94261c15eb004a522827656e157b8f9fd944 Mon Sep 17 00:00:00 2001 From: Rahguzar Date: Sat, 21 Oct 2023 20:57:21 +0200 Subject: [PATCH] Input methods for Urdu, Pashto and Sindhi --- lisp/leim/quail/pakistan.el | 700 ++++++++++++++++++++++++++++++++++++ 1 file changed, 700 insertions(+) create mode 100644 lisp/leim/quail/pakistan.el diff --git a/lisp/leim/quail/pakistan.el b/lisp/leim/quail/pakistan.el new file mode 100644 index 00000000000..9f969ba6719 --- /dev/null +++ b/lisp/leim/quail/pakistan.el @@ -0,0 +1,700 @@ +;;; pakistan.el --- Input methods for some languages from Pakistan -*- lex= ical-binding: t; -*- +;; +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; Author: Rahguzar +;; Keywords: convenience, multilingual, input method, Urdu, Balochi, Pasht= o, Sindhi, Hindko, Brahui +;; +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs 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 General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . +;; +;;; Commentary: +;; Provides a semi-phonetic input method for Urdu +;; +;;; Code: +(require 'quail) + +;;;; Urdu Input Methods +;;;;; Keyboard +;; Layout taken from https://www.branah.com/urdu +(quail-define-package + "urdu-keyboard" "Urdu" "=D8=A7=D8=B1=D8=AF=D9=88 =D8=AA=D8=AE=D8=AA=DB=8C= " t + "Input method for Urdu. +Uses keyboard layout from https://www.branah.com/urdu" + nil t t t t nil nil nil nil nil t) + +(quail-define-rules + ("q" ?=D8=B7) + ("w" ?=D8=B5) + ("e" ?=DA=BE) + ("r" ?=D8=AF) + ("t" ?=D9=B9) + ("y" ?=D9=BE) + ("u" ?=D8=AA) + ("i" ?=D8=A8) + ("o" ?=D8=AC) + ("p" ?=D8=AD) + ("a" ?=D9=85) + ("s" ?=D9=88) + ("d" ?=D8=B1) + ("f" ?=D9=86) + ("g" ?=D9=84) + ("h" ?=DB=81) + ("j" ?=D8=A7) + ("k" ?=DA=A9) + ("l" ?=DB=8C) + ("z" ?=D9=82) + ("x" ?=D9=81) + ("c" ?=DB=92) + ("v" ?=D8=B3) + ("b" ?=D8=B4) + ("n" ?=D8=BA) + ("m" ?=D8=B9) + ("Q" ?=D8=B8) + ("W" ?=D8=B6) + ("E" ?=D8=B0) + ("R" ?=DA=88) + ("T" ?=D8=AB) + ("Y" ?=D9=91) + ("U" ?=DB=83) + ("I" ?=D9=80) + ("O" ?=DA=86) + ("P" ?=D8=AE) + ("A" ?=DA=98) + ("S" ?=D8=B2) + ("D" ?=DA=91) + ("F" ?=DA=BA) + ("G" ?=DB=82) + ("H" ?=D8=A1) + ("J" ?=D8=A2) + ("K" ?=DA=AF) + ("L" ?=D9=8A) + ("C" ?=DB=93) + ("B" ?=D8=A4) + ("N" ?=D8=A6) + ("[" ?\]) + ("]" ?\[) + ("{" ?}) + ("}" ?{) + (";" ?=D8=9B) + ("." ?=DB=94) + ("," ?=D8=8C) + ("?" ?=D8=9F)) + +;;;;; Phonetic Keyboard +(quail-define-package + "urdu-phonetic-keyboard" "Urdu" "=D8=A7=D8=B1=D8=AF=D9=88 =D8=B5=D9=88=D8= =AA=DB=8C" t + "Input method for Urdu. +Uses phonetic keyboard layout from https://www.branah.com/urdu" + nil t t t t nil nil nil nil nil t) + +(quail-define-rules + ("q" ?=D9=82) + ("w" ?=D9=88) + ("e" ?=D8=B9) + ("r" ?=D8=B1) + ("t" ?=D8=AA) + ("y" ?=DB=92) + ("u" ?=D8=A1) + ("i" ?=DB=8C) + ("o" ?=DB=81) + ("p" ?=D9=BE) + ("a" ?=D8=A7) + ("s" ?=D8=B3) + ("d" ?=D8=AF) + ("f" ?=D9=81) + ("g" ?=DA=AF) + ("h" ?=D8=AD) + ("j" ?=D8=AC) + ("k" ?=DA=A9) + ("l" ?=D9=84) + ("z" ?=D8=B2) + ("x" ?=D8=B4) + ("c" ?=DA=86) + ("v" ?=D8=B7) + ("b" ?=D8=A8) + ("n" ?=D9=86) + ("m" ?=D9=85) + ("Q" ?=D9=92) + ("W" ?=D9=94) + ("E" ?=D9=B0) + ("R" ?=DA=91) + ("T" ?=D9=B9) + ("Y" ?=D9=8E) + ("U" ?=D8=A6) + ("I" ?=D9=90) + ("O" ?=DB=83) + ("P" ?=D9=8F) + ("A" ?=D8=A2) + ("S" ?=D8=B5) + ("D" ?=DA=88) + ("F" ?=D8=A3) + ("G" ?=D8=BA) + ("H" ?=DA=BE) + ("J" ?=D8=B6) + ("K" ?=D8=AE) + ("L" ?=D9=96) + ("Z" ?=D8=B0) + ("X" ?=DA=98) + ("C" ?=D8=AB) + ("V" ?=D8=B8) + ("B" ?=D9=8B) + ("N" ?=DA=BA) + ("M" ?=D9=91) + ("1" ?=DB=B1) + ("2" ?=DB=B2) + ("3" ?=DB=B3) + ("4" ?=DB=B4) + ("5" ?=DB=B5) + ("6" ?=D9=A6) + ("7" ?=DB=B7) + ("8" ?=DB=B8) + ("9" ?=DB=B9) + ("0" ?=DB=B0) + ("`" ?=D8=8F) + ("#" ?=D8=94) + ("$" ?=D8=92) + ("%" ?=D9=AA) + ("^" ?=D8=93) + ("&" ?=D8=91) + ("*" ?=D8=90) + ("(" ?\)) + (")" ?\() + ("=3D" ?+) + (";" ?=D8=9B) + ("\\" ?=C3=B7) + ("|" ?x) + ("," ?=D8=8C) + ("." ?=DB=94) + ("<" ?=D9=97) + (">" ?.) + ("?" ?=D8=9F) + ("[" ?=EF=B7=BD) + ("]" ?=EF=B7=B2) + ("{" ?=EF=B7=BA)) + +;;;;; Customizable Input Method +;;;;;; Helper functions +(defun pakistan--define-quail-rules (rules &optional prefix package) + "Define the rules for an input method. +PACKAGE determines the input method and defaults to `urdu-custom'. +RULES is the list of rules to define, see `quail-define-rules' for details= . If +non-nil PREFIX is a string that is added to prefix to each string in RULES. +PREFIX can be a symbol in which case it is looked up in `pakistan-urdu-pre= fixes' +to obtain the string." + (setq package (or package "urdu-custom")) + (when (and prefix (symbolp prefix)) + (setq prefix (car (alist-get prefix pakistan-urdu-prefixes)))) + (dolist (rule rules) + (quail-defrule (concat prefix (car rule)) (cadr rule) package))) + +(defun pakistan--make-setter (&optional prefix package) + "Retrun the setter function. +The function add rules to PACKAGE with PREFIX." + (lambda (var val) + (set-default-toplevel-value var val) + (pakistan--define-quail-rules val prefix package) + (when (equal current-input-method (quail-name)) + (activate-input-method current-input-method)))) + +(defun pakistan--regenerate-translations () + "Regenerate the translations for urdu-custom input method." + (quail-install-map '(nil) "urdu-custom") + (pakistan--define-quail-rules pakistan-urdu-translations) + (pakistan--define-quail-rules + pakistan-urdu-diacritics-and-other-symbols 'diacritics) + (pakistan--define-quail-rules pakistan-urdu-poetic-symbols 'poetic) + (pakistan--define-quail-rules pakistan-urdu-religious-symbols 'religious) + (pakistan--define-quail-rules pakistan-extra-balochi-translations 'baloc= hi-brahui) + (pakistan--define-quail-rules pakistan-extra-pashto-translations 'pashto) + (pakistan--define-quail-rules pakistan-extra-saraiki-translations 'sarai= ki-hindko) + (pakistan--define-quail-rules pakistan-extra-sindhi-translations 'sindhi= )) + +(defun pakistan--set-prefixes (var val) + "Setter function for `pakistan-urdu-prefixes'. +VAR should be `pakistan-urdu-prefixes' and VAL is value to be set." + (set-default-toplevel-value var val) + (when (boundp 'pakistan-urdu-translations) + (pakistan--regenerate-translations))) + +(defun pakistan--set-numeral-translations (var val) + "Add translations for digits. +VAR should be `pakistan-urdu-use-roman-digits' and VAL its value." + (set-default-toplevel-value var val) + (if val + (pakistan--regenerate-translations) + (pakistan--define-quail-rules + '(("0" ?=DB=B0) + ("1" ?=DB=B1) + ("2" ?=DB=B2) + ("3" ?=DB=B3) + ("4" ?=DB=B4) + ("5" ?=DB=B5) + ("6" ?=DB=B6) + ("7" ?=DB=B7) + ("8" ?=DB=B8) + ("9" ?=DB=B9) + ("%" ?=D9=AA))))) + +;;;;;; Package definition +(quail-define-package + "urdu-custom" "Urdu" "=D8=A7=D8=B1=D8=AF=D9=88 =D8=A7=D9=86=D9=81=D8=B1= =DB=B1=D8=AF=DB=8C" t + "Intuitive and customizable transl input method for Urdu. +By default this input method doesn't try to follow the common romanization= of Urdu +very closely. The reason for this is allow to for input efficiency. It wo= rks as +follows: + +1) All lower case letters on QWERTY keyboard are translated to an urdu +character. When more than one Urdu letter corresponds to the same Roman l= etter, +the most common Urdu letter has been chosen. The frequency analysis was d= one +on the basis of Urdu word list at +https://github.com/urduhack/urdu-words/blob/master/words.txt +As a result some of the translations are: +h =E2=86=92 =DB=81 +s =E2=86=92 =D8=B3 , c =E2=86=92 =D8=B5 +z =E2=86=92 =D8=B2 + +2) For the next common letter the uppercase English letter is used, e.g. +r =E2=86=92 =D8=B1 , R =E2=86=92 =DA=91 +n =E2=86=92 =D9=86 , N =E2=86=92 =DA=BA + +3) The letter x is used for postfix completions. There are two subcases: +3a) When more than two urdu letter map to the same roman letter, +e.g. +t =E2=86=92 =D8=AA, T =E2=86=92 =D9=B9 , tx =E2=86=92 =D8=B7 , Tx =E2=86= =92 =DB=83 +h =E2=86=92 =DB=81 , H =E2=86=92 =DA=BE , hx =E2=86=92 =D8=AD , Hx =E2=86= =92 =DB=82 +s =E2=86=92 =D8=B3 , c =E2=86=92 =D8=B5 , sx =E2=86=92 =D8=B4 , S =E2=86= =92 =D8=AB , cx =E2=86=92 =DA=86 +z =E2=86=92 =D8=B2 , Z =E2=86=92 =D8=B6, zx =E2=86=92 =D8=B0 , Zx =E2=86= =92 =D8=B8 +3b) The urdu letters that are commonly romanized by a English letter + h +can be obtained by the same English letter + x i.e. +gx =E2=86=92 =D8=BA , cx =E2=86=92 =DA=86, kx =E2=86=92 =D8=AE , sx =E2=86= =92 =D8=B4 + +4) Y =E2=86=92 =DA=98 is somewhat of an abberation. All four of z, Z, zx = and Zx which are +used by more common letters. Y is used for =DA=98 because it is sometimes= pronounced +close to Y for some European languages. + +These translations can be changed by customizing `pakistan-urdu-translatio= ns'. + +5) o is used for prefix completion of diacrtics or =D8=A7=D8=B9=D8=B1=DB= =B1=D8=A8 as well as some +poetic and religious symbols. The most common three diacritics are mapped= to +oa =E2=86=92 zabr (a for above) +ob =E2=86=92 zer (b for below) +oo =E2=86=92 pesh (o for the circle in pesh) + +6) The poetic symbols are also available under G (for =D8=BA=D8=B2=D9=84),= while religious +symbols are also available under M (for =D9=85=D8=B2=DB=81=D8=A8). + +7) Characters from Balochi, Brahui Pashto, Saraiki and Sindhi which are not +part of Urdu alphabet can also be input. Each set of these sets correspon= d to a +different prefixes. See `pakistan-urdu-prefixes' for the prefixes. + +The translations and the prefixes described above can be customized. Vario= us +customization options can be found under the customization group +`pakistan-urdu-input'." + nil t t t t nil nil nil nil nil t) + +;;;;;; Customizations +(defgroup pakistan-urdu-input nil + "Customization group for Urdu input methods." + :group 'quail) + +(defcustom pakistan-urdu-prefixes + '((diacritics "o") + (poetic "G") + (religious "M") + (balochi-brahui "B") + (pashto "P") + (sindhi "C") + (saraiki-hindko "X")) + "Prefixes for `urdu-custom' input method." + :set #'pakistan--set-prefixes + :type '(repeat (list symbol string)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-urdu-translations + '(("a" ?=D8=A7) + ("y" ?=DB=8C) + ("r" ?=D8=B1) + ("n" ?=D9=86) + ("v" ?=D9=88) + ("m" ?=D9=85) + ("t" ?=D8=AA) + ("l" ?=D9=84) + ("k" ?=DA=A9) + ("b" ?=D8=A8) + ("d" ?=D8=AF) + ("h" ?=DB=81) + ("s" ?=D8=B3) + ("H" ?=DA=BE) + ("p" ?=D9=BE) + ("N" ?=DA=BA) + ("g" ?=DA=AF) + ("sx" ?=D8=B4) + ("j" ?=D8=AC) + ("T" ?=D9=B9) + ("f" ?=D9=81) + ("cx" ?=DA=86) + ("z" ?=D8=B2) + ("u" ?=D8=B9) + ("q" ?=D9=82) + ("kx" ?=D8=AE) + ("e" ?=DB=92) + ("E" ?=DB=93) + ("hx" ?=D8=AD) + ("i" ?=D8=A6) + ("R" ?=DA=91) + ("tx" ?=D8=B7) + ("c" ?=D8=B5) + ("D" ?=DA=88) + ("gx" ?=D8=BA) + ("A" ?=D8=A2) + ("Z" ?=D8=B6) + ("V" ?=D8=A4) + ("zx" ?=D8=B0) + ("S" ?=D8=AB) + ("Zx" ?=D8=B8) + ("Hx" ?=DB=82) + ("ix" ?=D8=A1) + ("Tx" ?=DB=83) + ("Y" ?=DA=98) + ("ax" ?=D8=A3) + ("." ?=DB=94) + ("," ?=D8=8C) + (";" ?=D8=9B) + ("?" ?=D8=9F)) + "Translations for Urdu characters, digits and common punctuations." + :set (pakistan--make-setter) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-urdu-diacritics-and-other-symbols + '(("a" ?=D9=8E) ;; zabar =D8=B2=D8=A8=D8=B1 + ("b" ?=D9=90) ;; zer =D8=B2=D9=8A=D8=B1 + ("o" ?=D9=8F) ;; pesh =D9=BE=D9=8A=D8=B4 + ("j" ?=D9=92) ;; jazam =D8=AC=D8=B2=D9=85 + ("S" ?=D9=91) ;; tashdid =D8=AA=D8=B4=D8=AF=DB=8C=D8=AF + ("k" ?=D9=B0) ;; khari zabar =DA=A9=DA=BE=DA=91=DB=8C =D8=B2=D8=A8=D8= =B1 + ("u" ?=D9=98) ;; ulti jazm =D8=A7=D9=84=D9=B9=DB=8C =D8=AC=D8=B2=D9=85 + ("s" ?=D8=8E) + ("m" ?=D8=8F) + ("t" ?=D8=94) + ("c" ?=D8=90) + ("r" ?=D8=92) + ("R" ?=D8=93) + ("A" ?=D8=91)) + "Translations to input Urdu diacrtics. +These are available under the prefix specified in `pakistan-urdu-prefixes'= ." + :set (pakistan--make-setter 'diacritics) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-urdu-poetic-symbols + '(("s" ?=D8=8E) + ("m" ?=D8=8F) + ("t" ?=D8=94)) + "Translation to input Urdu peotic symbols. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'poetic) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-urdu-religious-symbols + '(("s" ?=D8=90) + ("r" ?=D8=92) + ("R" ?=D8=93) + ("a" ?=D8=91) + ("A" ?=EF=B7=B2) + ("S" ?=EF=B7=BA)) + "Translation to input Urdu peotic symbols. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'religious) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +;; I don't understand how many of these letters are pronounced. +;; So better translations are welcome. +(defcustom pakistan-extra-balochi-brahui-translations + '(("v" ?=DB=8F) + ("y" ?=DD=94) +;; Brahui + ("l" ?=DA=B7)) + "Translations to input Balochi and Brahui letters not found in Urdu. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'balochi-brahui) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-extra-pashto-translations + '(("t" ?=D9=BC) + ("d" ?=DA=89) + ("r" ?=DA=93) + ("n" ?=DA=BC) + ("s" ?=DA=9A) + ("R" ?=DA=96) + ("h" ?=DA=85) + ("H" ?=DA=81)) + "Translations to input Pashto letters not found in Urdu. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'pashto) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-extra-sindhi-translations + '(("k" ?=DA=AA) + ("j" ?=DA=84) + ("t" ?=D9=BA) + ("T" ?=D9=BD) + ("tx" ?=D9=BF) + ("b" ?=D9=BB) + ("B" ?=DA=80) + ("r" ?=DA=99) + ("d" ?=DA=8C) + ("D" ?=DA=8F) + ("dx" ?=DA=8A) + ("Dx" ?=DA=8D) + ("h" ?=DA=83) + ("c" ?=DA=87) + ("p" ?=DA=A6) + ("n" ?=DA=BB) + ("g" ?=DA=B3) + ("G" ?=DA=B1)) + "Translations to input Sindhi letters not found in Urdu. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'sindhi) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-extra-saraiki-hindko-translations + '(("b" ?=D9=BB) + ("h" ?=DA=84) + ("g" ?=DA=B3) + ("d" ?=DD=99) + ("n" ?=DD=A8) +;; Hindko + ("r" ?=DD=AC) + ("v" ?=DA=A8) + ("N" ?=DD=A9) + ("V" ?=D9=B7)) +"Translations to input Saraiki letters not found in Urdu. +These are available under the prefix specified in `pakistan-urdu-prefixes'" + :set (pakistan--make-setter 'saraiki-hindko) + :type '(repeat (list string character)) + :group 'pakistan-urdu-input) + +(defcustom pakistan-urdu-use-roman-digits + nil + "Whether urdu-custom input method should use roman digits." + :set #'pakistan--set-numeral-translations + :type 'boolean + :group 'pakistan-urdu-input) + +;;;; Sindhi Input Methods +;;;;; Keyboard +;; Layout taken from https://www.branah.com/sindhi +(quail-define-package + "sindhi-keyboard" "Sindhi" "=D8=B3=D9=90=D9=86=DA=8C=D9=90=D9=8A" t + "Input method for Sindhi. +Uses keyboard layout from https://www.branah.com/sindhi" + nil t t t t nil nil nil nil nil t) + +(quail-define-rules + ("q" ?=D9=82) + ("w" ?=D8=B5) + ("e" ?=D9=8A) + ("r" ?=D8=B1) + ("t" ?=D8=AA) + ("y" ?=D9=BF) + ("u" ?=D8=B9) + ("i" ?=DA=B3) + ("o" ?=D9=88) + ("p" ?=D9=BE) + ("a" ?=D8=A7) + ("s" ?=D8=B3) + ("d" ?=D8=AF) + ("f" ?=D9=81) + ("g" ?=DA=AF) + ("h" ?=D9=87) + ("j" ?=D8=AC) + ("k" ?=DA=AA) + ("l" ?=D9=84) + ("z" ?=D8=B2) + ("x" ?=D8=AE) + ("c" ?=D8=B7) + ("v" ?=DA=80) + ("b" ?=D8=A8) + ("n" ?=D9=86) + ("m" ?=D9=85) + ("Q" ?=D9=8E) + ("W" ?=D8=B6) + ("E" ?=D9=90) + ("R" ?=DA=99) + ("T" ?=D9=BD) + ("Y" ?=D8=AB) + ("U" ?=D8=BA) + ("I" ?=DA=BE) + ("O" ?=D9=8F) + ("P" ?=DA=A6) + ("A" ?=D8=A2) + ("S" ?=D8=B4) + ("D" ?=DA=8A) + ("F" ?=DA=A6) + ("G" ?=D9=8B) + ("H" ?=D8=AD) + ("J" ?=D9=8D) + ("K" ?=DB=A1) + ("L" ?:) + ("Z" ?=D8=B0) + ("X" ?=D9=91) + ("C" ?=D8=B8) + ("V" ?=D8=A1) + ("B" ?=D9=BB) + ("N" ?=DA=BB) + ("M" ?=DB=BE) + ("1" ?=DB=B1) + ("2" ?=DB=B2) + ("3" ?=DB=B3) + ("4" ?=DB=B4) + ("5" ?=DB=B5) + ("6" ?=D9=A6) + ("7" ?=DB=B7) + ("8" ?=DB=B8) + ("9" ?=DB=B9) + ("0" ?=DB=B0) + ("`" ?=E2=80=99) + ("-" ?=DA=8F) + ("=3D" ?=DA=8C) + ("~" ?=E2=80=98) + ("@" ?=D9=89) + ("#" ?=D8=94) + ("$" ?=D8=92) + ("%" ?=D9=AA) + ("^" ?=D8=93) + ("&" ?=DB=BD) + ("*" ?=D8=A4) + ("(" ?\)) + (")" ?\() + ("[" ?=DA=87) + ("]" ?=DA=86) + ("{" ?=DA=83) + ("}" ?=DA=84) + (";" ?=DA=A9) + ("'" ?=DA=B1) + ("\\" ?=DA=8D) + (":" ?=D8=9B) + ("|" ?=D9=BA) + ("," ?=D8=8C) + ("/" ?=D8=A6) + ("<" ?=E2=80=9C) + (">" ?=E2=80=9D) + ("?" ?=D8=9F)) + + +;;;; Pashto Input Methods +;;;;; Keyboard +(quail-define-package + "pashto-keyboard" "Pashto" "=D9=BE=DA=9A=D8=AA=D9=88" t + "Input method for Pashto. +Uses keyboard layout from https://www.branah.com/pashto" + nil t t t t nil nil nil nil nil t) + +(quail-define-rules + ("q" ?=D8=B6) + ("w" ?=D8=B5) + ("e" ?=D8=AB) + ("r" ?=D9=82) + ("t" ?=D9=81) + ("y" ?=D8=BA) + ("u" ?=D8=B9) + ("i" ?=D9=87) + ("o" ?=D8=AE) + ("p" ?=D8=AD) + ("a" ?=D8=B4) + ("s" ?=D8=B3) + ("d" ?=DB=8C) + ("f" ?=D8=A8) + ("g" ?=D9=84) + ("h" ?=D8=A7) + ("j" ?=D8=AA) + ("k" ?=D9=86) + ("l" ?=D9=85) + ("z" ?=DB=8D) + ("x" ?=DB=90) + ("c" ?=D8=B2) + ("v" ?=D8=B1) + ("b" ?=D8=B0) + ("n" ?=D8=AF) + ("m" ?=DA=93) + ("Q" ?=D9=92) + ("W" ?=D9=8C) + ("E" ?=D9=8D) + ("R" ?=D9=8B) + ("T" ?=D9=8F) + ("Y" ?=D9=90) + ("U" ?=D9=8E) + ("I" ?=D9=91) + ("O" ?=DA=85) + ("P" ?=DA=81) + ("A" ?=DA=9A) + ("S" ?=EF=BA=89) + ("D" ?=D9=8A) + ("F" ?=D9=BE) + ("G" ?=D8=A3) + ("H" ?=D8=A2) + ("J" ?=D9=BC) + ("K" ?=DA=BC) + ("L" ?=D8=A9) + ("Z" ?=D8=B8) + ("X" ?=D8=B7) + ("C" ?=DA=98) + ("V" ?=D8=A1) + ("B" ?=E2=80=8C) + ("N" ?=DA=89) + ("M" ?=D8=A4) + ("1" ?=DB=B1) + ("2" ?=DB=B2) + ("3" ?=DB=B3) + ("4" ?=DB=B4) + ("5" ?=DB=B5) + ("6" ?=DB=B6) + ("7" ?=DB=B7) + ("8" ?=DB=B8) + ("9" ?=DB=B9) + ("0" ?=DB=B0) + ("`" ?=E2=80=8D) + ("~" ?=C3=B7) + ("@" ?=D9=AC) + ("#" ?=D9=AB) + ("%" ?=D9=AA) + ("^" ?=C3=97) + ("&" ?=C2=AB) + ("*" ?=C2=BB) + ("_" ?=D9=80) + ("[" ?=D8=AC) + ("]" ?=DA=86) + ("{" ?\[) + ("}" ?\]) + (";" ?=DA=A9) + ("'" ?=DA=AB) + ("\"" ?=D8=9B) + ("|" ?=D9=AD) + ("," ?=D9=88) + ("." ?=DA=96) + ("<" ?=D8=8C) + (">" ?.) + ("?" ?=D8=9F)) + +;;; End Matter +(provide 'pakistan) +;;; pakistan.el ends here --=20 2.42.0 --=-=-=--