Edward Z. Yang wrote:
I did quite a bit of thinking on what you posted here,
and some of it
quite fabulous. I still have a few questions:
- If you had to rename every message in MediaWiki, would you have
enforced a definite naming convention? Namespaced them?
Sure, I would have a naming convention. We've already more or less
standardised on using prefixes for extension messages. Namespaces for core
messages would probably be useful too. My main bugbear with the current
system is punctuation style: Lee used strings of unbroken lowercase letters,
which I think is hard to read. They're always quoted, so why not have spaces
between words? Or underscores, if that's too progressive.
Grammatical
transformations for agglutinative languages came a bit earlier.
I implemented them for Finnish, when I was told that it was absolutely
necessary if we wished to make our language files site-independent, i.e. to
remove the Wikipedia references. In Finnish, "about Wikipedia" becomes
"Tietoja Wikipediasta" and "you can upload it to Wikipedia" becomes
"Voit
tallentaa tiedoston Wikipediaan". Suffixes are added depending on how the
word is used, plus minor modifications to the base. There is a long list of
exceptions, but since we only needed to translate a few words, such as the
site name, we didn't need to include it.
We now have grammatical transformation functions for 18 languages. Some of
these are just dictionaries for Wikimedia site names, but many have proper
algorithms.
If they're just dictionaries, I wonder whether or not you couldn't have
had wfMsg("sitename-$form"), just like the nominative/genitive
distinction for month names? The current setup makes it difficult to add
your own name to the dictionaries without editing PHP files (not that, I
imagine, anyone would care).
If you have an algorithm, then you only have to enter the site name once,
not six times. That's very convenient, so I would encourage people to
implement algorithms rather than dictionaries. Even a comprehensive
dictionary isn't going to be much good for site names which are invented words.
Most conversion functions respect $wgGrammarForms, which is an exception
list for grammatical transforms that can be customised from
LocalSettings.php, just like the site name.
-- Tim Starling