From kde-i18n-doc Fri Aug 12 07:14:36 2005 From: Krzysztof Lichota Date: Fri, 12 Aug 2005 07:14:36 +0000 To: kde-i18n-doc Subject: Re: KGeography needs your help Message-Id: <42FC4C5C.9050609 () lichota ! net> X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=112383092023807 Chusslove Illich wrote: > Now, if you have those forms of same word scattered over several PO files, > and you (properly) wan't to solve it in one place, the catch is that the > app wouldn't take your special PO file. But this is not a problem :) > > As you said, from the input you would *generate* the PO file, but there is > no reason to do so. Remeber, whenever PO file is loaded, scripting system > looks if there is corresponding script file (like kdelibs.po and > kdelibs.scm) and loads it if present. That .scm file can in turn load > other .scm files. Now, one of those other files can be the one with forms > that you automatically generate. You could generate a file like this: > > (forms-of Greece genitive Greecee dative Greecei ...) > (forms-of Italy genitive Italye dative Italyi ...) > (forms-of Spain genitive Spaine dative Spaini ...) > ... > > You could call it forms.scm and install it under > $KDEDIR/share/locale/ru/LC_SCRIPTS/kdelibs/forms.scm. Then, to use it in > eg. KGeography, in $KDEDIR/share/locale/ru/LC_SCRIPTS/kgeography.scm you > would just add one line: > > (load "kdelibs/forms.scm") > > Now in kgeography.po you can use, just as before, "The capital of > $[genitive %1]:", but you don't have to do any scripting for messages > "Greece", "Italy", "Spain", etc. I think it should rather be solved on level of PO files, instead of loading scripts. I.e. there should be common file "countries.po" with names of all countries with all forms. This file would be loaded by all applications which need country names (for example KGeography, kcontrol, etc.) and proper form would be chosen. This would save duplication of work if any other application needs this kind of information. The same approach should be used for names of colors, months, etc. Regards Krzysztof Lichota (Polish team)