jayvdb created this task. jayvdb added subscribers: jayvdb, Xqt. jayvdb added projects: pywikibot-core, Pywikibot-i18n, MediaWiki-extensions-Translate. Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION plural.py in #pywikibot-compat was derived by @xqt from `plural-gettext.txt` in commit a3078ff34a ; and was copied to #pywikibot-core in bfb857199 (minor fix minutes later 5664c76) , with no substantive changes since August 2011. one source of this is #mediawiki-extensions-Translate https://github.com/wikimedia/mediawiki-extensions-Translate/blob/master/data/plural-gettext.txt That was last updated in August 2011 from http://translate.sourceforge.net/wiki/l10n/pluralforms (rETRA56bf77b78d) That project is now at http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html and is now hosted at https://github.com/translate/l10n-guide/blob/master/docs/l10n/pluralforms.rst and the raw data is in https://github.com/translate/translate/blob/master/translate/lang/data.py#L25 . The history shows many plural fixes since 2011. The 'proper' source now is CLDR http://cldr.unicode.org/index/cldr-spec/plural-rules http://unicode.org/repos/cldr/trunk/common/supplemental/pluralRanges.xml http://unicode.org/repos/cldr/trunk/common/supplemental/plurals.xml With regards to #mediawiki-extensions-Translate , it is only `GettextFFS` which uses the `plural-gettext.txt` data file - MediaWiki itself now uses `languages/data/plurals.xml` and `languages/data/plurals-mediawiki.xml` which are CLDR based, and I guess the majority of the Translate extension uses this also. (`scripts/plural-comparison.php` also uses the `plural-gettext.txt` data file, but only to compare the various plural data ) However I expect that `plural-gettext.txt` distributed by #mediawiki-extensions-Translate should be updated. For #pywikibot-core, a dev dependency on https://pypi.python.org/pypi/translate-toolkit would allow a maintenance script to load the plural data from the `translate` project, and generate `plural.py`. ``` >>> from translate.lang import data >>> data.languages['gu'] ('Gujarati', 2, '(n != 1)') ``` TASK DETAIL https://phabricator.wikimedia.org/T114978 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: jayvdb Cc: Aklapper, pywikibot-bugs-list, Xqt, jayvdb, KartikMistry _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
