Page MenuHomePhabricator

Underscores in magic words of RTL languages are not treated the same as spaces
Open, HighPublic

Description

Magic words such as ifexper in Hebrew have spaces, and Translate auto replace spaces to _.
Again, such changes go live on Wikimedia wikis and many pages are broken. (see bug:46613 - once happend on March, and again today).
Translate must never replace _ with spaces, and there should be a unitest to validate it.


See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46613 / T48613: the hebrew translation for #ifexpr is borked, breaking tons of templates

Details

Reference
bz59165

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:39 AM
bzimport set Reference to bz59165.
bzimport added a subscriber: Unknown Object (MLST).

I've reworded the summary. I think we should take care of this in the parser.

There is a similar issue, that I know exists, but do not know the details of, that requires us to have an NS_MAIN definition for RTL languages. We should fix both issues.

Krinkle removed a project: Future-Release.
Krinkle set Security to None.
Krinkle removed a subscriber: Unknown Object (MLST).

Hi, I am a newbie. If no problem can i know about this bug properly. I have found some '_' should i actually remove them

Hi, I am a newbie. If no problem can i know about this bug properly. I have found some '_' should i actually remove them

No. In files, such as ParserFunctions.i18n.magic.php (in ParserFunctions), some messages include space, and some messages include '_' - if you change space to _ or vise versa, any use of this message will be break.

To fix the bug, we should change the parser, so even if you use space instead of _ (or vise versa) it will work with no need to change the i18n.

Can I know more about this parser, and can any one help me If i am capable of fixing this bug.

@Dheerajmalisetty: If you have specific questions about MediaWiki architecture or specific code places (which ones?) of the MediaWiki parser code base, feel free to ask them. This task is not an good first task task to fix, and to know more you'll have to investigate the code base.