Ticket #1567 (closed New Feature: duplicate)

Opened 7 years ago

Last modified 7 years ago

MediaWiki plugin localization

Reported by: B_aniaczek Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: 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 to 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)

Attachments

en.js (2.9 KB) - added by B_aniaczek 7 years ago.
English translation
pl.js (3.2 KB) - added by B_aniaczek 7 years ago.
Polish translation
fckplugin.js (21.4 KB) - added by B_aniaczek 7 years ago.
Plugin body
image.html (9.9 KB) - added by B_aniaczek 7 years ago.
Dialog
link.html (6.2 KB) - added by B_aniaczek 7 years ago.
Dialog
math.html (3.5 KB) - added by B_aniaczek 7 years ago.
Dialog
ref.html (3.3 KB) - added by B_aniaczek 7 years ago.
Dialog
template.html (3.3 KB) - added by B_aniaczek 7 years ago.
Dialog

Change History

Changed 7 years ago by B_aniaczek

English translation

Changed 7 years ago by B_aniaczek

Polish translation

Changed 7 years ago by B_aniaczek

Plugin body

Changed 7 years ago by B_aniaczek

Dialog

Changed 7 years ago by B_aniaczek

Dialog

Changed 7 years ago by B_aniaczek

Dialog

Changed 7 years ago by B_aniaczek

Dialog

Changed 7 years ago by B_aniaczek

Dialog

comment:1 Changed 7 years ago by B_aniaczek

Sorry for duplicated post. It was not clear, how to add attachments. Please remove this post and take a look at #1569

comment:2 Changed 7 years ago by martinkou

  • Status changed from new to closed
  • Keywords localization removed
  • Resolution set to duplicate

Marked as dup of #1569.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy