jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[i18n] prepare i18n package change of cosmetic_changes-append

cosmetic_changes-append is used by the framework itself but not by
the cosmetic_changes script. pywikibot translation packages will be
supported by the site-package too. Support both for a while.

Change-Id: I36cb993bd55a294b28291101b72c09d09f132795
---
M pywikibot/page/__init__.py
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index 0552e50..346698d 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -1246,10 +1246,14 @@
cc_toolkit = CosmeticChangesToolkit(self, ignore=CANCEL.MATCH)
self.text = cc_toolkit.change(old)

+ # i18n package changed in Pywikibot 7.0.0
+ old_i18n = i18n.twtranslate(self.site, 'cosmetic_changes-append',
+ fallback_prompt='; cosmetic changes')
if summary and old.strip().replace(
'\r\n', '\n') != self.text.strip().replace('\r\n', '\n'):
- summary += i18n.twtranslate(self.site, 'cosmetic_changes-append',
- fallback_prompt='; cosmetic changes')
+ summary += i18n.twtranslate(self.site,
+ 'pywikibot-cosmetic-changes',
+ fallback_prompt=old_i18n)
return summary

def put(self, newtext, summary=None, watch=None, minor=True, botflag=None,

To view, visit change 750467. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I36cb993bd55a294b28291101b72c09d09f132795
Gerrit-Change-Number: 750467
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged