[Mediawiki-i18n] Pseudolocalization

Neil Kandalgaonkar neilk at wikimedia.org
Wed Sep 22 21:59:05 UTC 2010

On 9/22/10 12:54 PM, Niklas Laxström wrote:
> On 22 September 2010 20:51, Neil Kandalgaonkar<neilk at wikimedia.org>  wrote:
>> The idea is that you can test for three things even before the
>> translators get to it:
>>    - which parts of the system aren't internationalized yet (they are
>> noticeable since they don't get this pseudolocalization)
> Such code wouldn't likely survive in the code review.

But the idea is that the *developer* should catch it themselves, before 

>>    - text swell (150%-200% is a good ratio)
> Web layout are usually very liquid, and thus we shouldn't have that
> much of a problem

And yet, we had such a problem today with the release of Article Feedback.

The layout worked fine when it said "2 ratings" but not when it was "2 
Einschätzungen". The layout is still readable, but it doesn't flow the 
way they expected.

>>    - any transformations that don't preserve unicode
> Such as?

Hard to say. Currently PHP doesn't have a lot of gotchas like that, but 
I know they exist for other languages. Possibly they could still arise 
if someone interacted with extensions which involved non-PHP components.

>  For what it's worth, double html-escaping or not escaping at
> all is far more common problem.

Agreed, but I'm addressing a different issue.

(Also, I don't know how to solve that one in code. Do we even have a 
consistent policy on where escaping is supposed to happen? It seems to 
be all over the place.)

>> Does MediaWiki or interwiki do anything like this? Would you like it if
>> we did?
> It is probably impossible to do this, for the same reason we cannot do
> 'click this interface message to translate it on sight'. There is too
> much configuration stuff and other things abusing messages that break
> MediaWiki if the input is unexpected.

Maybe I'm not being clear about what I would like to do. Something like 

The idea is to allow a developer to quickly see how their page might 
look in another language -- without learning that language, waiting for 
a translation, or otherwise involving anyone else.

A typical example is a monolingual English developer. They can flip 
their language prefs into xx-pseudo to see if their layout is fully 
localized, and works with text swell.

How we do this: in MediaWiki, we reserve the language xx-pseudo to mean 
pseudolocalization. If it is selected, instead of looking up the string 
in the appropriate message file, we look up the string in English and 
then apply a fast transform to swap certain characters and add padding. 
The only complicated part is making sure we don't affect embedded markup 
like {{PLURAL}}. It could be done in real time, without any stored 
message file.

We could even have other pseudos to mimic Chinese or Arabic.

This does privilege the English-speaking developer, but they are 
typically the biggest problem. ;)

Neil Kandalgaonkar ( ) <neilk at wikimedia.org>

More information about the Mediawiki-i18n mailing list