From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Chusslove Illich Newsgroups: gmane.comp.gnu.gettext.bugs,gmane.emacs.devel Subject: Re: Emacs i18n Date: Fri, 22 Mar 2019 21:50:31 +0100 Message-ID: <201903222150.32192.caslav.ilic@gmx.net> References: <25076895.mA2g9mTHSI@omega> <87h8bx5ijn.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12331256.q2B2cp0rfs"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="225830"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: KMail/1.13.7 (Linux/4.19.0-2-amd64; KDE/4.14.38; x86_64; ; ) Cc: emacs-devel-mXXj517/zsQ@public.gmane.org, Juri Linkov To: bug-gettext-mXXj517/zsQ@public.gmane.org, rms-mXXj517/zsQ@public.gmane.org Original-X-From: bug-gettext-bounces+gcggb-bug-gettext=m.gmane.org-mXXj517/zsQ@public.gmane.org Fri Mar 22 22:23:46 2019 Return-path: Envelope-to: gcggb-bug-gettext@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7Rdi-000wdF-Kc for gcggb-bug-gettext@m.gmane.org; Fri, 22 Mar 2019 22:23:46 +0100 Original-Received: from localhost ([127.0.0.1]:34815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Rdh-0001Lv-Iy for gcggb-bug-gettext@m.gmane.org; Fri, 22 Mar 2019 17:23:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7RcP-0008Gj-Cz for bug-gettext-mXXj517/zsQ@public.gmane.org; Fri, 22 Mar 2019 17:22:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7RNh-0007jn-37 for bug-gettext-mXXj517/zsQ@public.gmane.org; Fri, 22 Mar 2019 17:07:15 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:48103) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7RNK-00076F-8F; Fri, 22 Mar 2019 17:07:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1553288803; bh=RV2dVrK4cKmpghh6EJ3iNB9JsQOSqhplldfmSIUswmg=; h=X-UI-Sender-Class:From:To:Subject:Date:Cc:References:In-Reply-To; b=WPxi5+nTRK8Gu2jb00CC7ts635HvncKpdWPEaIUSccUCU8za4/itXs46dbMpakmmL fMiInJ/BOMNCxUuZ5a98nNTwT1btIrHflESVtBEdJp9pTTkCujcY/8frXxk+fRM86x GJAVpCyoLcIwkyZ7lVvZGWjabLIMUp5Zfd3sTQW8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from kourou.localnet ([77.10.142.160]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MMT1y-1h4hM645HC-008M3x; Fri, 22 Mar 2019 21:54:01 +0100 In-Reply-To: X-Provags-ID: V03:K1:zS9sk1zVKe5Bcs705LE1r4Jr4+bQRskKr1ZBG5bJX12G55w1ZZN KdbEEVb56r8EPbUIByzDkkBPAZf9tCxvtHsQ4n3rA7PwiS3M5X57+h8XxDYt16md6dgsbcf BabIu08S2Ifb4Ef4SOrdTOmbBcQVQ5B9exP2IuxIxfSJBzYqWvEwZ4SXi4Jx55gM8Vnsw7x 2bRd970fd9c85dXXwXdbg== X-UI-Out-Filterresults: notjunk:1;V03:K0:jZLfBkD1Zr8=:j79c3JtkFyOUg6038MZWVn J4QQl9Sncbove58p5YOUpQSeVJysASbOYgoD/w7uKkft8l/wc6DbvlngFkfBiXpgVaKUorGJ5 +3yme7hDP6vWIWcWSQyG5oNFl6Ke8Ud+r/fbsa9d1wbsaXMoFt8yuKG0V9ObaveoECDFabOzE XFaL5OjgiT85a+Bp8sAnBTS0JVFWt1hoYxClANad0fCxhl/L0c9uKtcEhhAjv/+5iv1rvlUix Jjs51+3gngwCTMv4Ivj6NW7NIUoBvHuotANaPWlNn26xQsuqF7QcAhyOczdm3nuB3VKxq5S3U 2c3uVTPREpZ/bP0daRzxAw3hOJYw1yfvyMKyqFQfhxFRfC5pFesvsyLyySmD5Wkhu3SiOwTlt kBESDd3Jn7+xdmEgHnIdA4rfzn+EBWJ1qddWNGNz5e9pyY0nE5EApVMUElLokUv59qnoFUgIx 5OGz3xXwTVjToiggZ7K4IrXLJcVgQ9EV98msVFJoKPt5evGan/TknPxNwQicBhUPq8SgxrYJ5 TVU59yo8FyaX29/gYhNaFWmmiow3jkWolkh0XI9BCznEyM3PUGfvv2Y1YW88zlIZAq2pTENEx E4C9a01YJ9Z8eRJbB5gybT5nrUCXLMYUoPujz1idEBMmdFHszgts1Dn+8GbbIuVwTcjL+GPrO g9HCbshj+G3Q6JHDQZL/C4TVRrgB0+cHjj7p2z5t8g3IFOPf3BHPWvVHpdSypkL0Zd15TzmR+ uW99PCSyjx5MQRfRes2xu698XZUX/Fun4wT9BtsCFX55mZvMIsYtbjceGUDGoixXgh3cYxkU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 X-BeenThere: bug-gettext-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for GNU gettext List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gettext-bounces+gcggb-bug-gettext=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: "bug-gettext" Xref: news.gmane.org gmane.comp.gnu.gettext.bugs:1970 gmane.emacs.devel:234626 Archived-At: --nextPart12331256.q2B2cp0rfs Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable >> [: Juri Linkov :] >> Indeed, a complete implementation of all Russian morphological rules >> takes ~1600 lines of dense Perl code: >> >> http://www.linkov.net/files/nlp/Lingua-RU-Inflect.pm >> >> I can't imagine how to include all these rules to gettext. > > [: Richard Stallman :] > I agree with you about that. What I propose is something else. > > 1. I do not propose implementing them all. Only some -- whichever ones > we think are worth while. > > 2. I do not propose putting any of this in gettext. What I propose > would be Emacs code that operates on the strings that come from > gettext. I'd like to mention that a system of this kind, the Ki18n, is in operation within the KDE ecosystem for more than a decade now. The system is in fact invisible to programmers (for the most part), and it is also invisible for translators, unless they know about it and want to use it. At the last count, 10 language teams do make use of it. Translators have at their disposal a generic scripting system, so that any kind of algorithmic adaptation of translation is possible; and some interesting uses have come up. Programmer's perspective is given here: http://api.kde.org/frameworks/ki18n/html/prg_guide.html . There is in fact almost no mention of the system, which is as intended; only the subsections "Dynamic Contexts" and "Placing and Installing Scripting Modules" provide a clue that it exists. Translator's perspective is given here: http://techbase.kde.org/Localization/Concepts/Transcript . It includes some real-life example at the end. The variety of basic functions defined by translators can be seen in the system's source tarball http://download.kde.org/stable/frameworks/5.56/ki18n-5.56.0.tar.xz in po/*/scripts directories. Regarding specifically plural handling, this is in normal use left to Gettext standard functionality, since it was already there for a long time. However, there are two cases where the system does get used for plurals. One is the typical failure case where a programmer knows that the substituted number will always be greater than and therefore thinks a ngettext call is not needed; when this error is seen during a pre- release message freeze, a scripted translation can be used to work around until fix for next release. The other case is when a language needs also plural handling for float-type arguments (e.g. gd in the tarball above). Each programming environment (programming language plus foundation libraries) can implement its own version of a similar system, as proposed here for Emacs. However, I think a unified Gettext solution would be preferable. Based on the experience with Ki18n, some years ago I made such a clean design for Gettext, but never got time to work on it. It is described at http://nedohodnik.net/gettextbis/ . Section 6 describes the scripting system itself, with sections 2 and 3 detailing the necessary support for it. =2D-=20 Chusslove Illich (=D0=A7=D0=B0=D1=81=D0=BB=D0=B0=D0=B2 =D0=98=D0=BB=D0=B8= =D1=9B) --nextPart12331256.q2B2cp0rfs Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSAKukHv4SIt1WVNsgxIZeCKAavcQUCXJVKmAAKCRAxIZeCKAav cfKtAJ9XZZifYY+lOMQMr/lrSbP4hZkXdwCdEpogURJflyjMVjiDg8bgyhqV3fc= =RgmD -----END PGP SIGNATURE----- --nextPart12331256.q2B2cp0rfs--