From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Internationalize Emacs's messages (swahili) Date: Mon, 28 Dec 2020 00:28:44 -0500 Message-ID: References: <87o8ivumn5.fsf@telefonica.net> <87v9d3nkxk.fsf@gnus.org> <83sg7xrgr5.fsf@gnu.org> <83h7odrdwy.fsf@gnu.org> <86sg7w39fh.fsf@163.com> <83pn30pku5.fsf@gnu.org> <86wnx8otoj.fsf@163.com> <834kkbp9vr.fsf@gnu.org> <87czyxuxw6.fsf@db48x.net> <87v9cosv0b.fsf@db48x.net> <877dp3skh8.fsf@db48x.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1329"; mail-complaints-to="usenet@ciao.gmane.io" Cc: all_but_last@163.com, bugs@gnu.support, dimech@gmx.com, abrochard@gmx.com, emacs-devel@gnu.org, eliz@gnu.org To: Daniel Brooks Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 28 06:30:01 2020 Return-path: Envelope-to: ged-emacs-devel@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 1ktl6X-000AbW-AG for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Dec 2020 06:30:01 +0100 Original-Received: from localhost ([::1]:46574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktl6W-0003yp-DN for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Dec 2020 00:30:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktl5X-0003Ow-M0 for emacs-devel@gnu.org; Mon, 28 Dec 2020 00:28:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35074) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktl5V-0004Y3-7U; Mon, 28 Dec 2020 00:28:57 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ktl5I-0002UZ-UY; Mon, 28 Dec 2020 00:28:45 -0500 In-Reply-To: <877dp3skh8.fsf@db48x.net> (message from Daniel Brooks on Sun, 27 Dec 2020 00:48:19 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261978 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Is it feasible to write a small Fluent interpreter in C for this > > purpose? > Absolutely, but my personal preference is to write it in Elisp. An implementation in Elisp could be ok for Emacs, but Emacs is just one of hundreds of GNU packages, and one of thousands of packages in the GNU system. To fully adopt Fluent along with gettext as the GNU method of handling this, we need to make it work in C programs. The only simple, clean and general way is to implement it in C. Maintainers will never adopt this if their programs need to link with Emacs or with Rust. > The message catalog files (MO files) just have flat strings with no > notion of substitutions or function calls. This is why my first > inclination was to generate elisp code from a Fluent file. I don't follow how the beginning leads to the conclusion. > The easiest way to mush gettext and fluent together is to put some > syntax into the messages that is post-processed before being returned to > the caller, turning it into an interpreter. That is too terse for me -- I am totally list. Something like this in a PO > file: > msgid "-sync-brand-name" > msgstr "Firefox Account" > msgid "sync-signedout-title" > msgstr "Connect with your {-sync-brand-name}" I see what it says, but can you explain how that relates to "syntax that is post-processed before being returned to the caller"? Terse references such as "the caller" leave me lost because I can't tell what they refer to. The leap is too long for me to follow. > Also, note that the original language wants to have the same > substitution capabilities as the translations. What does "the original language" mean here? -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)