Hello,
I am willing to complete the languages localisations files. Lot of new messages have been added to the software but are not localised in the langages.php files, instead they have been customised through the mediawiki namespaces.
My idea is to get a dump of the mediawiki namespaces for all wikipedias and use it to update the different hardcoded langagesXX.php files through a script to be build. The script could: 1/ look at each value existing in the database 2/ if it doesnt exist add it else ask what to do (ignore / update) 3/ generate new arrays
A problem I noticed, is that lot of mediawiki namespaces are using "/wiki/" or "Wikipedia". What are the best variables to replace that ? I am thinking about $wgScriptPath & {{ns:4}}, are they valid choices ?
Once the datas from wikipedia got imported, we could ask people to updates the refreshed langagesXX.php files.
cheers,
Ashar Voultoiz wrote:
A problem I noticed, is that lot of mediawiki namespaces are using
"/wiki/"
or "Wikipedia". What are the best variables to replace that ? I am
thinking
about $wgScriptPath & {{ns:4}}, are they valid choices ?
Yes for {{ns:4}} but no for $wgScriptPath. Use {{localurl:}}, which converts a title to a URL. localurl and localurle convert "canonical namespaces" to the localised variety. So {{localurl:Project:Deletion log}} is the URL for the deletion log on any wiki. See Namespace.php for a list of canonical namespace names. Basically the idea is to get rid of all PHP variables such as $wgScriptPath, and all PHP functions called from that part of the language file, e.g. wfLocalUrl(). To see how this is done, see Language.php
-- Tim Starling
On Apr 23, 2004, at 06:38, Ashar Voultoiz wrote:
A problem I noticed, is that lot of mediawiki namespaces are using "/wiki/" or "Wikipedia". What are the best variables to replace that ? I am thinking about $wgScriptPath & {{ns:4}}, are they valid choices ?
Use [[ ]]. Messages potentially containing links and formatting should be run through the wiki formatter, not raw HTML, since they are now user-editable.
{{SITENAME}} and {{NS:4}} should be used, iirc, in place of 'Wikipedia'. (Some of the files have had $wgSitename and $wgMetaNamespace, but this information gets lost in the MediaWiki: namespace because the substitution happens at script load time, and the substituted version is imported.)
Also there's other hardcoded Wikipedia text in there, such as the google search, that we shouldn't see in general files.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org