From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.57.77.220.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: gettext for Ada Date: Tue, 21 Nov 2017 20:22:43 +0100 Organization: JSA Research & Innovation Message-ID: <87ine3zbb0.fsf@jacob-sparre.dk> References: <2c5d0dff-bc12-4b37-b8e1-ac176c3e675f@googlegroups.com> <87r2sszr4f.fsf@jacob-sparre.dk> <0d02d48a-112f-4817-ab29-6dded00eb81f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="109.57.77.220.mobile.3.dk:109.57.77.220"; logging-data="1753"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:uMHG1K3qPbPnY9u9FksszOy1WB0= Xref: feeder.eternal-september.org comp.lang.ada:49040 Date: 2017-11-21T20:22:43+01:00 List-Id: Shark8 writes: > It's also illustrative of why an actual structured approach to > messaging would be much better: simple string-formatting of "You have > %d meats." with 1 (one) yields "You have 1 meats." and thereby > violates subject-verb agreement (of [non-]plurality). -- The > structured approach would take things like this into account, as well > as things like plural-forms and casings and construct a sort of > "abstract grammar" [or something] which on rendering would yield the > appropriate and correct forms for the user. -- Again, I haven't heard > of this being used in many projects... but that's probably due to the > complex nature of designing the underlying machinery/framework, > compared to, say, calling "Copied 1 file(s)." a 'good enough' > solution. GNU Gettext happens to have a perfectly good solution to this problem. Would you be able to implement handling of plural forms anywhere nearly as well as GNU Gettext does it? For all the languages you might have users for? Greetings, Jacob -- "[C programming] is like playing tennis on a minefield using hand grenade for a ball." -- Dmitry A. Kazakov