Hi Merlijn,
I've seen it during discussion with Nikerabbit on tw.net (look at the first LQ-threat according pywikipedia) and I am working on a pythonic version of the plural-gettext.txt. I am using lambda function for that like this one (for mk-wiki): plural = lambda n: 0 if (n == 1 or n%10 == 1) else 1 I think this is the easiest way. But we have a remaining problem found on table2wiki. Now we have 3 messages. One message is used if we have no warning, and we have two messages either for one or a lot of warnings. I guess we could keep the first "table2wiki-no-warning" message and merge the two messages "table2wiki-one-warning" and "table2wiki-warnings" using {{Plural:}} tag. It is also possible to use the first message every time and append the warning message if needed.
Greetings
----- Original Nachricht ---- Von: Merlijn van Deen valhallasw@arctus.nl An: pywikipedia-l@lists.wikimedia.org Datum: 25.08.2011 19:46 Betreff: Re: [Pywikipedia-l] [Pywikipedia-svn] SVN: [9448] trunk/pywikipedia/pywikibot/i18n.py
Hello xqt,
On 21 August 2011 15:49, xqt@svn.wikimedia.org wrote:
- value. At the moment, we have only one plural_func = x: x!= 1 yet.
Multiple
- PLURAL tags are not supported (yet).
Good to see you're working on plural support. Have you seen http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Translate/data/pl ural-gettext.txt?view=markup , which lists the plural possibilities for each language. Unfortunately, python does not support the a ? b : c notation, so it's not possible to copy the code 1-on-1.
Alternatively, there is http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Translate/data/pl ural-cldr.yaml?view=markup , but that is fairly unreadable IMO.
Good luck!
Best, Merlijn
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Arcor empfiehlt: Mal über die Karriere nachdenken! Wissenswertes und Nützliches finden Sie hierzu unter http://www.arcor.de/content/finanzen_job/job_karriere/bewerbung_karriere/rat...