Page MenuHomePhabricator

i18n messages aren't available with Pywikibot package from pypi
Closed, ResolvedPublic

Description

i18n messages are placed in scripts folder as submodule. They are not available with the pypi package and can fail therefore. There are those places with i18n usage in the pywkibot framework:
https://codesearch.wmcloud.org/pywikibot/?q=(pywikibot%7Ccosmetic_changes)-&i=nope&files=pywikibot&excludeFiles=&repos=

  • bot.py: fallback can be used for input statement
  • fixes.py: replace.py script is required to use fixes which is not available with pypi package
  • page.touch(): usually this method does not write and the summary could be hardcoded but i18n was introduced due to T199042
  • page.save(): appends cosmetic_changes message if enabled
  • pagegenerators.py: fallback messages are used here

See https://lists.wikimedia.org/pipermail/pywikibot/2021-February/010073.html

Event Timeline

Xqt triaged this task as Medium priority.Feb 28 2021, 6:57 AM
Xqt raised the priority of this task from Medium to High.Feb 28 2021, 7:07 AM
Xqt updated the task description. (Show Details)

Change 667372 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] use hardcoded messages if i18n system is not available

https://gerrit.wikimedia.org/r/667372

Xqt claimed this task.

Change 667372 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] use hardcoded messages if i18n system is not available

https://gerrit.wikimedia.org/r/667372

Change 667385 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [fix] Safely restore cosmetic_changes_mylang_only setting

https://gerrit.wikimedia.org/r/667385

Change 667385 merged by jenkins-bot:
[pywikibot/core@master] [fix] Safely restore cosmetic_changes_mylang_only setting

https://gerrit.wikimedia.org/r/667385

Reopened. i18n can be added to the Pywikibot framework

Change 750457 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [i18n] Make pywikibot messages available with site package.

https://gerrit.wikimedia.org/r/750457

Change 750457 merged by jenkins-bot:

[pywikibot/core@master] [i18n] Make pywikibot messages available with site package.

https://gerrit.wikimedia.org/r/750457