https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Web browser: --- Bug ID: 54560 Summary: archivebot.py edit summary i18n improvement Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/patches/561/ Reported by: acstroe Created on: 2012-08-16 07:18:55 Subject: archivebot.py edit summary i18n improvement Original description: The edit summary of archivebot explains how old archived messages are, by using the configuration string, e.g. 45d or 24h. On request from some users on ro.wp, I have added a function that interprets these strings in accordance with the local wiki settings. It uses the MediaWiki:Hours and MediaWiki:Days messages to obtain the local language string. Since all wikis I tries use the PLURAL parser function and parser functions are not interpreted in the wiki edit summary, I parsed the PLURAL function to obtain the actual string. If the PLURAL function is not supported, then the exact text of the MediaWiki:Hours and MediaWiki:Days is used (after replacing $1 with the actual number). If the MediaWiki:Hours or MediaWiki:Days messages are not found, then the initial configuration string is used.
See also https://ro.wikipedia.org/wiki/Wikipedia:Sarcini%5C_pentru%5C_robo%C8%9Bi%5C#...
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Revised implementation, using API suggested by xqt
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I attached a new patch, one that uses the API you suggested. Is it usable?
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- That plural implementation does not work for a lot of languages including ro-wiki. See the current plural_rules at plural.py.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/patches/561
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de
--- Comment #4 from xqt info@gno.de --- (In reply to comment #3)
That plural implementation does not work for a lot of languages including ro-wiki. See the current plural_rules at plural.py.
Plural rules ar copied from mediawiki plural rules. If a language is not explicit on plural.py it use the default behaviour which works for the most languages. So could you explain what is wrong with ro-wiki (and others)?
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #5 from xqt info@gno.de --- Ah I see, it's mediawiki's
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal CC| |ladsgroup@gmail.com Version|unspecified |core (2.0) Severity|normal |enhancement
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 150228 had a related patch set uploaded by Whym: archivebot: localized duration (hours, days) in edit summary
https://gerrit.wikimedia.org/r/150228
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
--- Comment #7 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 150228 merged by jenkins-bot: archivebot: localized duration (hours, days) in edit summary
https://gerrit.wikimedia.org/r/150228
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Yusuke Matsubara whym@whym.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Yusuke Matsubara whym@whym.org --- Above patch works for me.
Although I also note that the simple ordering of two elements "<older-than> <duration>", using a space as a separator, might not be ideal for all languages. That may be another bug to fix.
pywikipedia-bugs@lists.wikimedia.org