Page MenuHomePhabricator

Editing toolbar inserts incorrect markup when user has a non-default language set
Closed, ResolvedPublic

Description

Author: robchur

Description:
When a user has their preferences set to use a language other than the default
for the wiki, namespace names are translated into their language. However, this
means that the local namespace names for, e.g images, are not used, which causes
problems.

This was reported by a user in IRC:

Enderos-> well it's obvious isn't it, namespaces are translated but the wiki can
have only 1 namespace for it (default english) thus it don't work
Enderos-> like image = afbeelding in dutch
Enderos-> when you press the image button when editing using the dutch
translation, it puts a [[Afbeelding:blaat.gif]] but that doesn't work because
the wiki uses the english [[Image:blaat.gif]] namespace


Version: unspecified
Severity: normal

Details

Reference
bz4504

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:01 PM
bzimport set Reference to bz4504.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Solution to the problem as reported, therefore - tweak the PHP that generates
the JS which produces the editing toolbar so that it always uses the local
wiki's language, not the user's language.

Just use {{ns:Image}} in the message, yes?

Problem is that we used $wgLang instead of $wgContLang for
namespace resolution.

Fixed in HEAD and 1.5, will be in 1.5.6.