brion@svn.wikimedia.org schrieb:
Revision: 25781 Author: brion Date: 2007-09-11 15:22:53 +0000 (Tue, 11 Sep 2007)
Log Message:
Reverting r25772 for now. The local language names as title are a cute feature, but a few problems:
- It only seems to use the values for the content language for this, though UI language would be more appropriate.
- A hojillion wfMsg() calls are made when Names.php is loaded, which feels kind of icky to me. Would trigger message cache initialization early and does a lot of extra calls not needed 99% of the time.
I'd rather only load values when required.
Ok, I see your points.
What do you think about the following method:
1. Define an array per language in /languages/localNames/localNamesXx.php
In a similar way the native language names are definded in Names.php
2. Read this array in /languages/messages/messagesXx.php:
require_once( dirname(__FILE__) . '/languages/localNames/localNamesXx.php' ) ;
Benefits from this method should be:
1. No hojillion wfMsg() calls ;-) 2. localNamesXx.php could be created/updated by a script from a source like http://www.unicode.org/cldr/data/charts/summary/en.html (Idea by Nikerabbit, thanks :)
Raymond.
On 9/12/07, Raimond Spekking raimond.spekking@gmail.com wrote:
Benefits from this method should be:
- No hojillion wfMsg() calls ;-)
- localNamesXx.php could be created/updated by a script from a source
like http://www.unicode.org/cldr/data/charts/summary/en.html (Idea by Nikerabbit, thanks :)
Problems would be that you don't allow them to be locally modifiable. Why don't you just use wfMsg( 'languagename-local-xx' ) where needed, like for all other messages?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Simetrical wrote:
On 9/12/07, Raimond Spekking raimond.spekking@gmail.com wrote:
Benefits from this method should be:
- No hojillion wfMsg() calls ;-)
- localNamesXx.php could be created/updated by a script from a source
like http://www.unicode.org/cldr/data/charts/summary/en.html (Idea by Nikerabbit, thanks :)
Problems would be that you don't allow them to be locally modifiable. Why don't you just use wfMsg( 'languagename-local-xx' ) where needed, like for all other messages?
The problem with using the primary message system would be that where a local name isn't defined, it would fall back to the English name, which is not the desired behavior.
- -- brion vibber (brion @ wikimedia.org)
On 9/13/07, Brion Vibber brion@wikimedia.org wrote:
The problem with using the primary message system would be that where a local name isn't defined, it would fall back to the English name, which is not the desired behavior.
It would fall back to the fallback language's name for the language. Why isn't that desired behavior?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Simetrical wrote:
On 9/13/07, Brion Vibber brion@wikimedia.org wrote:
The problem with using the primary message system would be that where a local name isn't defined, it would fall back to the English name, which is not the desired behavior.
It would fall back to the fallback language's name for the language. Why isn't that desired behavior?
Because in this case, the fallback we'd want is the native language name, rather than yet another, third, unrelated language's name for it.
- -- brion vibber (brion @ wikimedia.org)
On 9/17/07, Brion Vibber brion@wikimedia.org wrote:
Simetrical wrote:
On 9/13/07, Brion Vibber brion@wikimedia.org wrote:
The problem with using the primary message system would be that where a local name isn't defined, it would fall back to the English name, which is not the desired behavior.
It would fall back to the fallback language's name for the language. Why isn't that desired behavior?
Because in this case, the fallback we'd want is the native language name, rather than yet another, third, unrelated language's name for it.
Say I'm using Hebrew, whose fallback is English. It's supposed to produce the word "German" in some appropriate language. Ideally, it should write "גרמנית", which is the Hebrew name for German. But say nobody's translated that. Then surely it should write "German", the English fallback name. Why would I want the fallback to be "Deutsch"? English was selected as the fallback precisely because Hebrew speakers are more liable to understand it than any other non-Hebrew language.
Of course, you could ask why you wouldn't want to display "Deutsch" to start with regardless of user language, as we do for interlanguage links. That's reasonable. But to display "גרמנית" as the first choice and anything but "German" as the second choice doesn't make any sense to me.
wikitech-l@lists.wikimedia.org