Xqt has submitted this change and it was merged.
Change subject: Bugfix for python 2.5: "plural_rules" is the valid function
......................................................................
Bugfix for python 2.5: "plural_rules" is the valid function
Change-Id: Iaafa4ba2a8500eefad5277114c399470ee47358f
---
M pywikibot/i18n.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index d180604..9fb7ec1 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -25,7 +25,7 @@
@param code The language code
@type code string
@return a list of strings as language codes
-
+
If no translation is available to a specified language, translate() will
try each of the specified fallback languages, in order, until it finds
one with a translation, with 'en' and '_default' as a last resort.
@@ -387,7 +387,7 @@
Support is implemented like in MediaWiki extension. If the tw message
contains a plural tag inside which looks like
{{PLURAL:<number>|<variant1>|<variant2>[|<variantn>]}}
- it takes that variant calculated by the plural_func depending on the number
+ it takes that variant calculated by the plural_rules depending on the
number
value.
Examples:
@@ -455,7 +455,7 @@
# Compatibility check for old python releases which are unable
# to use plural.py - use _default rules for all
if sys.version_info < (2, 5):
- plural_func = lambda n: (n != 1)
+ plural_rules = lambda n: (n != 1)
index = plural_rules(num)
else:
from plural import plural_rules
--
To view, visit https://gerrit.wikimedia.org/r/91414
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaafa4ba2a8500eefad5277114c399470ee47358f
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits