[Mediawiki-i18n] Trying to locate messages in various places - which order?

Brianna Laugher brianna.laugher at gmail.com
Wed Mar 26 12:11:05 UTC 2008


OK, these are the relevant bugs I found.

1495 Undefined messages in user language don't fall back to MediaWiki:
customizations
If a message is defined in MessagesEn.php but not MessagesXX.php, and
MediaWiki:Somemessage exists, but MediaWiki:Somemessage/XX doesn't,
when the message is requested in language XX, instead of getting
MediaWiki:Somemessage, you get the message from MessagesEn.php. (But
interestingly if it doesn't exist in Messagesen.php ie is a totally
custom message, then you WILL get the MediaWiki:Somemessage as
expected.)

8821 When using another language, messages of "-" that are not exist
in the DB are shown as "<message>"
I don't totally understand when this bug shows itself.

8188 Display changed content-language messages in preference to
default interface-language messages
I think this is the main bug about it.
Rotem Liss describes the following algorithm that is supposed to
represent current behaviour: ("content language" = "wiki default
language")

1. Check for a page in MediaWiki namespace and use it as a message:
1a. If the interface language ("uselang" page parameter or from preferences) is
not the content language, use the page "MediaWiki:Message/lang".
1b. If the interface language is the same as the content language, use the page
"MediaWiki:Message".
2. If the message is still not received, check in the extension messages
(irrelevant, as uploadtext and the others are not extension messages).
3. If the message is still not received, check for it in the localised language
file. Fallback message from the language file may be used if not exist, and
English message from the language file may be used if not exist.
4. If the message is still not received and the key contains the key '/', use
the message from the appropriate messages file (probably irrelevant, as such
calls to messages are used in either explicit {{int:message/lang}} calls, or the
view of pages from the MediaWiki namespace, not in Special:Upload or
everything).
5. If the message is still not received (which means it was not in any language
file, even the English one, and not an extension message - which means a custom
message, which is probably not the case here), try to use the default English
message in the DB. Useful for links like the Village Pump in the sidebar, but
probably irrelevant for this.

Step 4 confused me...

On 26/03/2008, Jon Harald Søby <jhsoby at gmail.com> wrote:
> So we have the following cases:
>
> en: the global fallback language
>  xx: any fallback language. All languages can have one, except for English.
> AA: the language of a wiki
> BB: a language set in a user's settings
> CC: a language set by ?uselang=
>
[...]
> Case 3: If a different language is set by ?uselang=
>
> CC
> CC-xx
> en

So, based on Rotem's description above

CC - MediaWiki: subpage
CC -  MessagesCC.php
CC-xx - MessagesCC-xx.php
en - MessagesEn.php
en - MediaWiki: page (according to Brion from bug 1495, but you only
get to here for real custom messages, made up)

> For MediaWiki:message/yy, I believe that is the same, but I have not tested
> it. Also, I believe there is a bug about this, for cases 2 and 3, that it
> should fall back to AA instead of en. I don't know its number though.

I agree it should probably try AA before en, but I just searched and
could not find a bug for this. Maybe someone else could also search?
If someone else also can't find it then I will be happy to open a new
one...

thanks
Brianna

-- 
They've just been waiting in a mountain for the right moment:
http://modernthings.org/



More information about the Mediawiki-i18n mailing list