Ticket #1569 (closed New Feature: fixed)
MediaWiki plugin localization
| Reported by: | B_aniaczek | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Project : MediaWiki+FCKeditor | Version: | |
| Keywords: | Fixed | Cc: |
Description
It would be great to have mediaWiki plugin localized to user language, like FCKeditor. Most things are localized, but mediaWiki specific strings are English only.
Things to do: File FCKeditor/fckeditor_config.js: Add before FCKConfig.Plugins.Add( 'mediawiki' ) ; lines:
var MediaWikiPluginAvailableLanguages = {
en : 'English', pl : 'Polish'
}; var MediaWikiPluginLanguage = 'pl';
and modify line:
FCKConfig.Plugins.Add( 'mediawiki' ) ;
to have
FCKConfig.Plugins.Add( 'mediawiki' , MediaWikiPluginLanguage ) ;
I have no idea, how to use mediaWiki settings (see ticket #1565) :(
Create directory FCKeditor/plugins/mediawiki/lang and put there en.js and pl.js (attached)
Modify files: fckplugin.js, image.html, link.html, math.html, ref.html, template.html. There is too many changes to describe them. To find differences simply look at attached my versions and look for strings: .wiki and "wiki" and search for function plural (inside image.html and link.html only).
Note about function plural( thingsToCount, found0, found1, foundSeveral, foundMore )
It returns:
found0 if there is no thingsToCount,
found1 if there is one thingsToCount,
foundSeveral if there is: 2,3,4, 22,23,24, 32,33,34, 42,43,44, ..., 102,103,104 ... and so on (but not 12,13,14,112,113,114) thingsToCount,
foundMore otherwise
It is polish specific behavior. English users (this is probably the same in many other languages) should use foundSeveral same as foundMore. In fact - plural is language specific and it should be loaded with language file, but I'm noob with javaScript to code it :( For examples look for language files in mediaWiki installation: /languages/classes/Language*.php)