Page MenuHomePhabricator

The number passed to the dialog is not localized
Closed, ResolvedPublic

Description

When you find and replace text using the WikiEditor dialogue the number of matches is not localized. For instance, in Persian you will see a message like 7 جایگزینی انجام شد instead of ۷ جایگزینی انجام شد

The reason is that this line of code passes the number of matches (i.e. match.length) without first localizing it:

.text( mw.msg( 'wikieditor-toolbar-tool-replace-success', match.length ) )

Event Timeline

Change 583520 had a related patch set uploaded (by Happy5214; owner: Happy5214):
[mediawiki/extensions/WikiEditor@master] Localize numbers before passing to mw.msg

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

Change 583520 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Localize numbers before passing to mw.msg

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