Page MenuHomePhabricator

Message name appearing instead of message in dialogue presented when leaving edit window
Closed, ResolvedPublic

Description

Screenshot of error showing string name instead of string value

  1. Go to any page on mediawiki.org or en.wikipedia.org.
  2. Open the edit page.
  3. Make some changes to the article.
  4. Try to navigate away without saving.

The message says "If you are logged in, you can disable this warning in the "[prefs-editing]" section of your preferences.", displaying the name of the string prefs-editing rather than its value (see attached screenshot).


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-02-17_at_19.33.48.png (312×540 px, 54 KB)

Details

Reference
bz61472

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:01 AM
bzimport set Reference to bz61472.

This behaviour occurs in both Chrome and Safari on my computer (Mac OS X 10.9).

This doesn't occur in Firefox, but that's to be expected as Firefox overrides these custom messages with its own messages.

Localisation cache. This happens sometimes.

(In reply to MZMcBride from comment #2)

Localisation cache. This happens sometimes.

I think it'd be more likely that Resource loader is caching a temporarily bad response from the localization cache rather then localization cache itself (This is idle speculation, I have no evidence)

Actually given timing, 64886d140e6ab3152 was recently merged (Jan 28). Since the message is going to JS, perhaps whatever magic parses messages on the js side simply doesn't support int:

Change 113902 had a related patch set uploaded by Brian Wolff:
Revert "Transclude translation for preference edit section to ensure consistency of translation"

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

I suppose it would help if I fully read the bug report or glanced at the code before commenting. :-)

(In reply to Bawolff (Brian Wolff) from comment #4)

Actually given timing, 64886d140e6ab3152 was recently merged (Jan 28). Since
the message is going to JS, perhaps whatever magic parses messages on the js
side simply doesn't support int:

Yeah, I think you're right.

From resources/mediawiki.action/mediawiki.action.edit.editWarning.js:


retval = mw.msg( 'editwarning-warning' )

From resources/mediawiki/mediawiki.js:


  • If jqueryMsg is loaded, {{-transformation is done where supported
  • (such as {{plural:}}, {{gender:}}, {{int:}}). ---

Bug 47840 mentions adding support for int: with parameters, but I believe basic int: support already exists... dunno.

  • Bug 61478 has been marked as a duplicate of this bug. ***

Fomafix's patch from bug 61478 appears to fix this. {{int:}} is supposed given that a) mediawiki.jqueryMsg module is loaded (which is not guaranteed now) and b) the message is made available to JavaScript (which it currently isn't).

Change 113918 had a related patch set uploaded by Bartosz Dziewoński:
Parse {{int:...}} in editwarning

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

(The patch above is of course by Fomafix, I only linked it to this bug.)

Given the visibility of the issue (at least two reports in a day), I think this could be backported to current WMF versions?

Change 113918 merged by jenkins-bot:
Parse {{int:...}} in editwarning

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

Change 113902 abandoned by Brian Wolff:
Revert "Transclude translation for preference edit section to ensure consistency of translation"

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