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: Sun, 29 Oct 2023 17:27:38 +0100 Message-ID: <87v8apqtff.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> <87zg0bye19.fsf@zohomail.eu> <83leblbq9e.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="11912"; 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 Sun Oct 29 17:34:50 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 1qx8kU-0002t1-1j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Oct 2023 17:34:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qx8kB-0004oK-AX; Sun, 29 Oct 2023 12:34:31 -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 1qx8k9-0004oB-Rd for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 12:34:29 -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 1qx8k9-0003qq-JO for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 12:34:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qx8kg-0007ie-6Y for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 12:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rahguzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2023 16:35:02 +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.169859730029661 (code B ref 66470); Sun, 29 Oct 2023 16:35:02 +0000 Original-Received: (at 66470) by debbugs.gnu.org; 29 Oct 2023 16:35:00 +0000 Original-Received: from localhost ([127.0.0.1]:43223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx8kd-0007iJ-2l for submit@debbugs.gnu.org; Sun, 29 Oct 2023 12:35:00 -0400 Original-Received: from sender11-pp-o91.zoho.eu ([31.186.226.249]:25169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx8kZ-0007i7-Ha for 66470@debbugs.gnu.org; Sun, 29 Oct 2023 12:34:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1698597255; cv=none; d=zohomail.eu; s=zohoarc; b=TGgeqSqvVtiK/DDCgbF960KJJIS23ZfLdnW6C9y2jbp2idC0Mxlu7+tgXgL9F+BZrvPP4+fMO5fgXrVx975oe0egR6WBC5r01p5zkbyVVYr4mpVLYxfOqP9u0d1ITfuWXUo3Q07iH8Zk4y0VFHCwNOUdeiaiYULSRDSCAK5umDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1698597255; 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=BkMgRtIisIAQalr6QTgbHeCCTh9+F5kuz4elQuIc6Lg=; b=IYMzA1EM79hVYKK70DYcqwKJ/czKWHsf6Syd8UzLiUykiZhBGhpgf/cf4SF8eq3TGGzLXGk5pFxdEZi16ExbHZX6x3c8m/lR1ac2pGlborTqjcuEb1uoMbxpiibuFOyvF/lEf+WKK5iHj3pxCPmaJ8dZFa2KOpOyRwdbDICV/NY= 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=1698597255; 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=BkMgRtIisIAQalr6QTgbHeCCTh9+F5kuz4elQuIc6Lg=; b=PNRjOnGWVvYrKYn4KGzf6csIcNaqQqcH1cskCxv0XXS3aVROJHoyLgnBWxWMz9Lj Hjvutml/oZ121qmMdbeKa95Egwk4Jn3ljE+o9r9o6A4dtl7W3wN5Xe93RCK4zEfSGnS +URFTKcK4Ws+G5PHazpRpZVe8CPLtE5kBLUa7uCo= Original-Received: from localhost (78-73-246-128-no600.tbcn.telia.com [78.73.246.128]) by mx.zoho.eu with SMTPS id 1698597253657328.0527959139778; Sun, 29 Oct 2023 17:34:13 +0100 (CET) In-reply-to: <83leblbq9e.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:273516 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Eli, Thanks for the review. I have made the changes you asked for, please let me know of other changes need. Eli Zaretskii writes: > Thanks. This lacks a ChangeLog-style commit log message (see > CONTRIBUTE and "git log" for how we write those). I have added the commit message with some help from magit. Please let me know if changes to it are needed. > Can you come up with a shorter mode-line indicator for this and other > input methods? We usually use just 1 or 2 letters for it; you used > something much longer. Done now, all of them are now 1 or 2 letters. >> +(defun pakistan--define-quail-rules (rules &optional prefix package) >> + "Define the rules for an input method. > > Our style is to have the first sentence of a doc string be a summary > of what the function does and also mention all the mandatory > arguments. I would suggest something like > > Define rules for a Pakistan input method as determined by RULES. Done, with a slight rewording. >> +(defun pakistan--make-setter (&optional prefix package) >> + "Retrun the setter function. > ^^^^^^ > Typo. Thanks, fixed now. >> +The function add rules to PACKAGE with PREFIX." > ^^^ > "adds". > >> +(defun pakistan--set-numeral-translations (var val) >> + "Add translations for digits. > > This should mention the arguments. It does now but awkwardly. Maybe instead of defining this function, the setter should be lambda? >> +(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 romanizat= ion of Urdu >> +very closely. The reason for this is allow to for input efficiency. It= works as >> +follows: > > Please try not to use lines longer than 79 characters in doc strings. I have filled the lines in the doc string with a fill column of 78. > Thanks. Thanks for the review, 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 e2a5f5ce78f3fe0b0f8256f6f2b61412f137200f Mon Sep 17 00:00:00 2001 From: Rahguzar Date: Sun, 29 Oct 2023 17:14:02 +0100 Subject: [PATCH] Input methods for Urdu, Pashto and Sindhi * lisp/leim/quail/pakistan.el (quail): ("urdu-keyboard"): new input method ("urdu-phonetic-keyboard"): new input method ("urdu-custom"): new input method ("sindhi-keyboard"): new input method ("pashto-keyboard"): new input method ; (pakistan--define-quail-rules): helper function ; (pakistan--make-setter): helper function ; (pakistan--regenerate-translations): helper function ; (pakistan--set-prefixes): helper function ; (pakistan--set-numeral-translations): (pakistan-urdu-input): new customization group (pakistan-urdu-prefixes): new custom variable (pakistan-urdu-translations): new custom variable (pakistan-urdu-diacritics-and-other-symbols): new custom var (pakistan-urdu-poetic-symbols): new custom var (pakistan-urdu-religious-symbols): new custom var (pakistan-extra-balochi-brahui-translations): new custom var (pakistan-extra-pashto-translations): new custom var (pakistan-extra-sindhi-translations): new custom var (pakistan-extra-saraiki-hindko-translations): new custom var (pakistan-urdu-use-roman-digits): new custom var (pakistan): new package --- 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..25c1c7a08b8 --- /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=AA" 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=B5" 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 translations for `urdu-custom' input method as determined by RUL= ES. +PACKAGE determines the input method and defaults to `urdu-custom'. RULES = is +the list of rules to define, see `quail-defrule' for details. If non-nil +PREFIX is a string that is prefixed to each string in RULES. PREFIX can b= e a +symbol in which case it is looked up in `pakistan-urdu-prefixes' 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) + "Return the setter function. +The function adds 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) + "VAR should be `pakistan-urdu-use-roman-digits' and VAL its value. +This is a setter function for the custom-variable." + (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=A7" 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 +works 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 +letter, the most common Urdu letter has been chosen. The frequency analys= is +was done on the basis of Urdu word list at +https://github.com/urduhack/urdu-words/blob/master/words.txt As a result s= ome +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 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" 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" 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 --=-=-=--