Last modified: 2014-08-02 01:31:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56560, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54560 - archivebot.py edit summary i18n improvement
archivebot.py edit summary i18n improvement
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
archivebot.py (Other open bugs)
core-(2.0)
All All
: Normal enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 22:32 UTC by Kunal Mehta (Legoktm)
Modified: 2014-08-02 01:31 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-09-24 22:32:08 UTC
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\_pentru\_robo%C8%9Bi\#Arhivare\_automat.C4.83\_a\_paginilor\_de\_discu.C8.9Bii
Comment 1 Kunal Mehta (Legoktm) 2013-09-24 22:32:10 UTC
Revised implementation, using API suggested by xqt
Comment 2 Kunal Mehta (Legoktm) 2013-09-24 22:32:12 UTC
I attached a new patch, one that uses the API you suggested. Is it usable?
Comment 3 Kunal Mehta (Legoktm) 2013-09-24 22:32:14 UTC
That plural implementation does not work for a lot of languages including ro-wiki.  See the current plural\_rules at plural.py.
Comment 4 xqt 2013-09-25 06:35:38 UTC
(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)?
Comment 5 xqt 2013-09-25 06:44:53 UTC
Ah I see, it's mediawiki's
Comment 6 Gerrit Notification Bot 2014-07-29 15:21:41 UTC
Change 150228 had a related patch set uploaded by Whym:
archivebot: localized duration (hours, days) in edit summary

https://gerrit.wikimedia.org/r/150228
Comment 7 Gerrit Notification Bot 2014-07-30 04:39:28 UTC
Change 150228 merged by jenkins-bot:
archivebot: localized duration (hours, days) in edit summary

https://gerrit.wikimedia.org/r/150228
Comment 8 Yusuke Matsubara 2014-08-02 01:31:10 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links