Last modified: 2011-09-19 21:18:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32977, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30977 - File namespace name in Special:FilePath may be shown with incorrect directionality
File namespace name in Special:FilePath may be shown with incorrect direction...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks: 28708
  Show dependency treegraph
 
Reported: 2011-09-18 19:58 UTC by Amir E. Aharoni
Modified: 2011-09-19 21:18 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Amir E. Aharoni 2011-09-18 19:58:02 UTC
Special:FilePath says "{{ns:file}}:". If you're using an RTL wiki with uselang=en, the ':' will be displayed at the wrong end of the word, so its direction must be set explicitly according to the wiki's language.

I tried solving it by adding a magic word that returns the wiki's directionality, but there was objection to it, saying that it's too complicated (see Bug 30919). I gave it a thought and i agree with Niklas' comment: too much markup in a message makes it hard to read and translate, so it should be avoided.

Since the code part of the message would be the same in all the languages - <span dir="XXX">{{ns:file}}:</span>, it can be written right in the PHP code and passed to the message as a parameter. However, this message is called from SpecialPage->outputHeader and i couldn't find an easy way to pass parameters to it without overriding the function. But then i'm not not yet very experienced with the message functions. Assistance would be appreciated.
Comment 1 Bawolff (Brian Wolff) 2011-09-18 20:22:24 UTC
To me, it looks like overriding SpecialPage::outputHeader would be the right thing to do in this case.
Comment 2 Brion Vibber 2011-09-19 18:14:19 UTC
Well, what you want here isn't to tell the directionality of the content language, but to tell the inherent directionality of the File namespace's default name in the current content language, I think?

You don't necessarily know whether it's going to be localized (as it is in Hebrew) or an English fallback name.

And honestly since it's written in an English context here, it looks reasonably ok to have the colon appear after, as in English.


The best fix would actually be to just get rid of the message entirely and make sure that Special:Filepath takes input with or without the namespace name -- it's simply a totally unnecessary requirement and there's no reason to bother the user with the demand in the first place.
Comment 3 Brion Vibber 2011-09-19 18:20:36 UTC
Ok, looks like the 'without the namespace' limitation was a regression in r43471 -- prior to that, Special:Filepath handled input using Title::newFromText($file, NS_IMAGE) which would work both with and without the namespace.
Comment 4 Brion Vibber 2011-09-19 18:27:04 UTC
Any objection to reverting r43471 and removing the extra line from filepath-summary?
Comment 5 Brion Vibber 2011-09-19 21:16:12 UTC
Done in r97558 on trunk.
Comment 6 Brion Vibber 2011-09-19 21:18:29 UTC
Merged to 1.18 as r97559.

Note that translated messages will still need updating -- should happen as normal through translatewiki.net.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links