Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/147403
Change subject: Implemented changes for translatewiki ...................................................................... Implemented changes for translatewiki Moved to Json i18n files Change-Id: I45fc49af74009094d7dac7f14c42f8212278a612 --- M Flexiskin/Flexiskin.class.php M Flexiskin/Flexiskin.setup.php A Flexiskin/i18n/de-formal.json A Flexiskin/i18n/de.json A Flexiskin/i18n/en.json A Flexiskin/i18n/qqq.json M Flexiskin/languages/Flexiskin.i18n.php M Flexiskin/resources/BS.Flexiskin/AddSkin.js M Flexiskin/resources/BS.Flexiskin/Menuitems/General.js M Flexiskin/resources/BS.Flexiskin/Menuitems/Header.js M Flexiskin/resources/BS.Flexiskin/Menuitems/Position.js M Flexiskin/resources/BS.Flexiskin/Panel.js M Flexiskin/resources/BS.Flexiskin/PreviewMenu.js 13 files changed, 268 insertions(+), 200 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/03/147403/1 diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php index c052713..2cef8d9 100644 --- a/Flexiskin/Flexiskin.class.php +++ b/Flexiskin/Flexiskin.class.php @@ -99,7 +99,7 @@ public function runPreferencePlugin($sAdapterName, $oVariable) { $aData = self::getFlexiskins(false); $aResult = array('options' => array( - wfMessage('bs-flexiskin-defaultName')->plain() => 'default', + wfMessage('bs-flexiskin-defaultname')->plain() => 'default', )); if (isset($aData['flexiskin']) && count($aData['flexiskin']) > 0) foreach ($aData['flexiskin'] as $aConf) { @@ -147,23 +147,23 @@ $aData = json_decode(self::getVal('data')); $oData = $aData[0]; if (is_null($oData->template)) - return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-templateNotExists')->plain())); + return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-templatenotexists')->plain())); if( empty($oData->template) ) $oData->template = 'default'; $sId = str_replace(" ", "_", strtolower($oData->name)); if (is_dir((self::$sFlexiskinPath . "/" . md5($sId)))) { - return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-skinExists')->plain())); + return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-skinexists')->plain())); } //PW(27.11.2013) TODO: add check template really exists before add if( empty($oData->name) ) { //PW(27.11.2013) TODO: add msg - return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-nameEmpty')->plain())); + return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-nameempty')->plain())); } if ( $oData->template != 'default'){ $oConfig = self::getFlexiskinConfig(true, $oData->template); if (!$oConfig->isGood()) - return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-templateNotExists')->plain())); + return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-templatenotexists')->plain())); $oConf = json_decode($oConfig->getValue()); $oConf[0]->name = $oData->name; $oConf[0]->desc = $oData->desc; @@ -270,7 +270,7 @@ $aConfigs = json_decode($aData['data']); $aFile = self::generateStyleFile($aConfigs); if (self::$iOldId != self::$iNewId && is_dir(self::$sFlexiskinPath . DS . self::$iNewId) && file_exists(self::$sFlexiskinPath . DS . self::$iNewId . DS . "conf.json")) { - return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-skinExists')->plain())); + return json_encode(array('success' => false, 'msg' => wfMessage('bs-flexiskin-error-skinexists')->plain())); } if (self::$iOldId != self::$iNewId && is_dir(self::$sFlexiskinPath . DS . self::$iOldId)) { $oStatus = BsFileSystemHelper::renameFolder("flexiskin" . DS . self::$iOldId, "flexiskin" . DS . self::$iNewId); diff --git a/Flexiskin/Flexiskin.setup.php b/Flexiskin/Flexiskin.setup.php index e4d32c6..7a55fd7 100644 --- a/Flexiskin/Flexiskin.setup.php +++ b/Flexiskin/Flexiskin.setup.php @@ -1,6 +1,8 @@ <?php -BsExtensionManager::registerExtension('Flexiskin', BsRUNLEVEL::FULL | BsRUNLEVEL::REMOTE); +BsExtensionManager::registerExtension( 'Flexiskin', BsRUNLEVEL::FULL | BsRUNLEVEL::REMOTE ); + +$wgMessagesDirs['Flexiskin'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['Flexiskin'] = __DIR__ . '/languages/Flexiskin.i18n.php'; $wgExtensionMessagesFiles['FlexiskinAlias'] = __DIR__ . '/languages/Flexiskin.alias.php'; @@ -12,53 +14,50 @@ $wgSpecialPageGroups['Flexiskin'] = 'bluespice'; $wgResourceModules['ext.bluespice.flexiskin'] = array( - 'scripts' => array( - 'extensions/BlueSpiceExtensions/Flexiskin/resources/bluespice.flexiskin.js', - ), - 'styles' => array( - 'extensions/BlueSpiceExtensions/Flexiskin/resources/bluespice.flexiskin.css', - ), - 'dependencies' => array( - 'ext.bluespice.extjs' - ), - 'messages' => array( - 'bs-flexiskin-headerName', - 'bs-flexiskin-headerDesc', - 'bs-flexiskin-labelName', - 'bs-flexiskin-labelDesc', - 'bs-flexiskin-headerGeneral', - 'bs-flexiskin-dialogClose', - 'bs-flexiskin-dialogReset', - 'bs-flexiskin-confirmDeleteSkin', - 'bs-flexiskin-titleAddSkin', - 'bs-flexiskin-labelSkins', - 'bs-flexiskin-defaultName', - 'bs-flexiskin-defaultDesc', - 'bs-flexiskin-headerActive', - 'bs-flexiskin-labelBackgroundColor', - 'bs-flexiskin-headerHeader', - 'bs-flexiskin-labelLogoUpload', - 'bs-flexiskin-labelBackgroundUpload', - 'bs-flexiskin-labelRepeatBackground', - 'bs-flexiskin-no-repeat', - 'bs-flexiskin-repeat-x', - 'bs-flexiskin-repeat-y', - 'bs-flexiskin-repeat', - 'bs-flexiskin-labelCustomBackgroundColor', - 'bs-flexiskin-labelNavigation', - 'bs-flexiskin-no-img', - 'bs-flexiskin-headerPosition', - 'bs-flexiskin-labelContent', - 'bs-flexiskin-left', - 'bs-flexiskin-right', - 'bs-flexiskin-center', - 'bs-flexiskin-labelWidth', - 'bs-flexiskin-labelFullWidth', - 'bs-flexiskin-error-nameEmpty', - 'bs-flexiskin-error-templateNotExists' - ), - 'localBasePath' => $IP, - 'remoteBasePath' => &$GLOBALS['wgScriptPath'] + 'scripts' => array( + 'extensions/BlueSpiceExtensions/Flexiskin/resources/bluespice.flexiskin.js', + ), + 'styles' => array( + 'extensions/BlueSpiceExtensions/Flexiskin/resources/bluespice.flexiskin.css', + ), + 'dependencies' => array( + 'ext.bluespice.extjs' + ), + 'messages' => array( + 'bs-flexiskin-labelname', + 'bs-flexiskin-labeldesc', + 'bs-flexiskin-headergeneral', + 'bs-flexiskin-dialogclose', + 'bs-flexiskin-dialogreset', + 'bs-flexiskin-confirmdeleteskin', + 'bs-flexiskin-titleaddskin', + 'bs-flexiskin-labelskins', + 'bs-flexiskin-defaultname', + 'bs-flexiskin-defaultdesc', + 'bs-flexiskin-headeractive', + 'bs-flexiskin-labelbgcolor', + 'bs-flexiskin-headerheader', + 'bs-flexiskin-labellogoupload', + 'bs-flexiskin-labelbackgroundupload', + 'bs-flexiskin-labelrepeatbackground', + 'bs-flexiskin-no-repeat', + 'bs-flexiskin-repeat-x', + 'bs-flexiskin-repeat-y', + 'bs-flexiskin-repeat', + 'bs-flexiskin-labelcustombgcolor', + 'bs-flexiskin-labelnavigation', + 'bs-flexiskin-headerposition', + 'bs-flexiskin-labelcontent', + 'bs-flexiskin-left', + 'bs-flexiskin-right', + 'bs-flexiskin-center', + 'bs-flexiskin-labelwidth', + 'bs-flexiskin-labelfullwidth', + 'bs-flexiskin-error-nameempty', + 'bs-flexiskin-error-templatenotexists' + ), + 'localBasePath' => $IP, + 'remoteBasePath' => &$GLOBALS['wgScriptPath'] ); $wgAjaxExportList[] = 'Flexiskin::getFlexiskins'; diff --git a/Flexiskin/i18n/de-formal.json b/Flexiskin/i18n/de-formal.json new file mode 100644 index 0000000..6ae5c37 --- /dev/null +++ b/Flexiskin/i18n/de-formal.json @@ -0,0 +1,12 @@ +{ + "@metadata": { + "authors": [ + "Tobias Weichart <weich...@hallowelt.biz>", + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-flexiskin-dialogclose": "Sind Sie sicher, dass Sie die Vorschau schließen möchten?", + "bs-flexiskin-dialogreset": "Der Skin wird auf den zuletzt gespeicherten Stand zurückgesetzt. Möchten Sie fortfahren?", + "bs-flexiskin-confirmdeleteskin": "Sind Sie sicher, dass Sie diesen Skin löschen möchten?", + "bs-flexiskin-error-nameempty": "Bitte geben Sie einen validen Namen für den Skin den Sie erstellen möchten ein." +} diff --git a/Flexiskin/i18n/de.json b/Flexiskin/i18n/de.json new file mode 100644 index 0000000..c04de43 --- /dev/null +++ b/Flexiskin/i18n/de.json @@ -0,0 +1,50 @@ +{ + "@metadata": { + "authors": [ + "Tobias Weichart <weich...@hallowelt.biz>", + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-flexiskin-desc": "Stellt eine Seite zum Verwalten von Flexiskins mit Anpassungsoptionen zur Verfügung.", + "bs-flexiskin-label": "Skin", + "bs-flexiskin-defaultname": "Standard", + "bs-flexiskin-defaultdesc": "Standard Vorlage für den Flexiskin.", + "bs-flexiskin-error-skinexists": "Ein Skin mit diesem Namen existiert bereits.", + "bs-flexiskin-error-fail-add-skin": "Ein neuer Skin konnte nicht erstellt werden: $1", + "bs-flexiskin-reset-error": "Die Einstellungen konnten nicht zurückgesetzt werden: $1", + "bs-flexiskin-error-get-config": "Die Konfiguration konnte nicht geladen werden: $1", + "bs-flexiskin-error-delete-skin": "Der Skin konnte nicht gelöscht werden: $1", + "bs-flexiskin-not-allowed": "Der Zugriff auf diese Seite ist nicht erlaubt.", + "prefs-flexiskin": "Flexiskin", + "bs-flexiskin-pref-active": "Aktiver Skin: ", + "bs-flexiskin-pref-logo": "Logo: ", + "bs-flexiskin-labelname": "Name", + "bs-flexiskin-labeldesc": "Beschreibung", + "bs-flexiskin-headergeneral": "Allgemein", + "bs-flexiskin-dialogclose": "Bist du sicher, dass du die Vorschau schließen möchtest?", + "bs-flexiskin-dialogreset": "Der Skin wird auf den zuletzt gespeicherten Stand zurückgesetzt. Möchtest du fortfahren?", + "bs-flexiskin-confirmdeleteskin": "Bist du sicher, dass du diesen Skin löschen möchtest?", + "bs-flexiskin-titleaddskin": "Flexiskin hinzufügen", + "bs-flexiskin-labelskins": "Vorlage", + "bs-flexiskin-headeractive": "Aktiv", + "bs-flexiskin-labelbgcolor": "Hintergrundfarbe", + "bs-flexiskin-headerheader": "Kopfleiste", + "bs-flexiskin-labellogoupload": "Logo", + "bs-flexiskin-labelbackgroundupload": "Hintergrundbild", + "bs-flexiskin-labelrepeatbackground": "Hintergrundbild wiederholen", + "bs-flexiskin-no-repeat": "keine Wiederholung", + "bs-flexiskin-repeat-x": "horizontale Wiederholung", + "bs-flexiskin-repeat-y": "vertikale Wiederholung", + "bs-flexiskin-repeat": "horizontale und vertikale Wiederholung", + "bs-flexiskin-labelcustombgcolor": "Benutzerdefinierte Farbe", + "bs-flexiskin-headerposition": "Positionen und Größen", + "bs-flexiskin-labelnavigation": "Position der Navigation", + "bs-flexiskin-labelcontent": "Seitenausrichtung", + "bs-flexiskin-left": "Links", + "bs-flexiskin-right": "Rechts", + "bs-flexiskin-center": "Mittig", + "bs-flexiskin-labelwidth": "Gesamtbreite (in Pixel)", + "bs-flexiskin-labelfullwidth": "Maximale Breite", + "bs-flexiskin-error-nameempty": "Bitte gib einen validen Namen für den Skin den du erstellen möchtest ein.", + "bs-flexiskin-error-templatenotexists": "Das ausgewählte Template existiert nicht." +} diff --git a/Flexiskin/i18n/en.json b/Flexiskin/i18n/en.json new file mode 100644 index 0000000..7d680a3 --- /dev/null +++ b/Flexiskin/i18n/en.json @@ -0,0 +1,50 @@ +{ + "@metadata": { + "authors": [ + "Tobias Weichart <weich...@hallowelt.biz>", + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-flexiskin-desc": "Adds functionalitiy to create skins", + "bs-flexiskin-label": "Skin", + "bs-flexiskin-defaultname": "Default", + "bs-flexiskin-defaultdesc": "Default skin template.", + "bs-flexiskin-error-skinexists": "A skin with this name already exists.", + "bs-flexiskin-error-fail-add-skin": "A skin could not be created: $1", + "bs-flexiskin-reset-error": "Could not reset configuration: $1", + "bs-flexiskin-error-get-config": "Could not load configuration: $1", + "bs-flexiskin-error-delete-skin": "Could not delete skin: $1", + "bs-flexiskin-not-allowed": "Access to this page is not allowed.", + "prefs-flexiskin": "Skin", + "bs-flexiskin-pref-active": "Activated skin:", + "bs-flexiskin-pref-logo": "Logo:", + "bs-flexiskin-labelname": "Name", + "bs-flexiskin-labeldesc": "Description", + "bs-flexiskin-headergeneral": "General", + "bs-flexiskin-dialogclose": "Are you sure you want to close the preview?", + "bs-flexiskin-dialogreset": "The skin will be reset to the last saved state. Do you want to continue?", + "bs-flexiskin-confirmdeleteskin": "Are you sure that you want to delete this skin?", + "bs-flexiskin-titleaddskin": "Add skin", + "bs-flexiskin-labelskins": "Template", + "bs-flexiskin-headeractive": "Active", + "bs-flexiskin-labelbgcolor": "Background color", + "bs-flexiskin-headerheader": "Header", + "bs-flexiskin-labellogoupload": "Logo", + "bs-flexiskin-labelbackgroundupload": "Background image", + "bs-flexiskin-no-repeat": "no repeat", + "bs-flexiskin-repeat-x": "horizontal repeat", + "bs-flexiskin-repeat-y": "vertical repeat", + "bs-flexiskin-repeat": "horizontal and vertical repeat", + "bs-flexiskin-labelrepeatbackground": "Repeat background image", + "bs-flexiskin-labelcustombgcolor": "Custom color", + "bs-flexiskin-headerposition": "Position and size", + "bs-flexiskin-labelnavigation": "Position of the navigation", + "bs-flexiskin-labelcontent": "Position of the content", + "bs-flexiskin-left": "left", + "bs-flexiskin-right": "right", + "bs-flexiskin-center": "center", + "bs-flexiskin-labelwidth": "Complete width (in pixel)", + "bs-flexiskin-labelfullwidth": "Maximum width", + "bs-flexiskin-error-nameempty": "Please enter a valid name for the skin you want to create.", + "bs-flexiskin-error-templatenotexists": "The chosen template does not exist." +} diff --git a/Flexiskin/i18n/qqq.json b/Flexiskin/i18n/qqq.json new file mode 100644 index 0000000..566943d --- /dev/null +++ b/Flexiskin/i18n/qqq.json @@ -0,0 +1,50 @@ +{ + "@metadata": { + "authors": [ + "Tobias Weichart <weich...@hallowelt.biz>", + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-flexiskin-desc": "Used in [{{canonicalurl:Special:WikiAdmin|mode=ExtensionInfo}} Special:WikiAdmin?mode=ExtensionInfo], description of flexi skin extension", + "bs-flexiskin-label": "Used in sidebar anchoe text for skin\\n{{Identical|Skin}}", + "bs-flexiskin-defaultname": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for the default skin template\\n{{Identical|Default}}", + "bs-flexiskin-defaultdesc": "Description message for the default template.", + "bs-flexiskin-error-skinexists": "Error message that a skin with the same name already exists.", + "bs-flexiskin-error-fail-add-skin": "Error message that the skin could not be created:\\n*$1 is the reason why the skin could not be created", + "bs-flexiskin-reset-error": "Error message that the configuration of the skin could not be reset:\\n*$1 is the reason why the configuration could not be reset", + "bs-flexiskin-error-get-config": "Error message that the configuration of the skin could not be loaded:\\n*$1 is the reason why the configuration could not be loaded", + "bs-flexiskin-error-delete-skin": "Error message that the skin could not deleted\\n*$1 is the reason why the skin could not be deleted", + "bs-flexiskin-not-allowed": "Error message that the access to this page is not allowed.", + "prefs-flexiskin": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], headline for flexi skin section in preferences{{Identical|Skin}}", + "bs-flexiskin-pref-active": "Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], label for activated skin:", + "bs-flexiskin-pref-logo": "Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], label for logo:", + "bs-flexiskin-labelname": "Column headline for name\\n{{Identical|Name}}", + "bs-flexiskin-labeldesc": "Column headline for description\\n{{Identical|Description}}", + "bs-flexiskin-headergeneral": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], headline for general information section\\n{{Identical|General}}", + "bs-flexiskin-dialogclose": "Text message if you are sure to close the preview?", + "bs-flexiskin-dialogreset": "Text message that the skin will be reset to the last saved state and if you want to continue", + "bs-flexiskin-confirmdeleteskin": "Text message if you are sure that you want to delete this skin", + "bs-flexiskin-titleaddskin": "Window title for add skin}\\n{{Identical|Add skin}}", + "bs-flexiskin-labelskins": "Label for template\\n{{Identical|Template}}", + "bs-flexiskin-headeractive": "Column headline for active\\n{{Identical|Active}}", + "bs-flexiskin-labelbgcolor": "Label for background color\\n{{Identical|Background color}}", + "bs-flexiskin-headerheader": "Column headline for header\\n{{Identical|Header}}", + "bs-flexiskin-labellogoupload": "Label for logo\\n{{Identical|Logo}}", + "bs-flexiskin-labelbackgroundupload": "Label for background image\\n{{Identical|Background image}}", + "bs-flexiskin-no-repeat": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for no repeat", + "bs-flexiskin-repeat-x": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for horizontal repeat", + "bs-flexiskin-repeat-y": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for vertical repeat", + "bs-flexiskin-repeat": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for horizontal and vertical repeat", + "bs-flexiskin-labelrepeatbackground": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], checkbox label for repeat background image", + "bs-flexiskin-labelcustombgcolor": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], label for custom color", + "bs-flexiskin-headerposition": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], headline for position and size section\n{{Identical|Position and size}}", + "bs-flexiskin-labelnavigation": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], label for position of the navigation", + "bs-flexiskin-labelcontent": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], label for position of the content", + "bs-flexiskin-left": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for left\\n{{Identical|Left}}", + "bs-flexiskin-right": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for right\\n{{Identical|Right}}", + "bs-flexiskin-center": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], option label for center\\n{{Identical|Center}}", + "bs-flexiskin-labelwidth": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], label for complete width (in pixel)", + "bs-flexiskin-labelfullwidth": "Used in [{{canonicalurl:Special:WikiAdmin|mode=Flexiskin}} Special:WikiAdmin?mode=Flexiskin], label for maximum width", + "bs-flexiskin-error-nameempty": "Error message that you must enter a valid name for the skin you watn to create.", + "bs-flexiskin-error-templatenotexists": "Error message that the template you chose does not exist." +} diff --git a/Flexiskin/languages/Flexiskin.i18n.php b/Flexiskin/languages/Flexiskin.i18n.php index 96cc37e..17f0655 100644 --- a/Flexiskin/languages/Flexiskin.i18n.php +++ b/Flexiskin/languages/Flexiskin.i18n.php @@ -1,128 +1,35 @@ <?php - /** - * Internationalisation file for Flexiskin + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php * - * Part of BlueSpice for MediaWiki + * Beginning with MediaWiki 1.23, translation strings are stored in json files, + * and the EXTENSION.i18n.php file only exists to provide compatibility with + * older releases of MediaWiki. For more information about this migration, see: + * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format * - * @author Tobias Weichart <weich...@hallowelt.biz> - * @package BlueSpice_Extensions - * @subpackage Flexiskin - * @copyright Copyright (C) 2012 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later - * @filesource + * This shim maintains compatibility back to MediaWiki 1.17. */ $messages = array(); +if ( !function_exists( 'wfJsonI18nShima5bcba5d320cd14e' ) ) { + function wfJsonI18nShima5bcba5d320cd14e( $cache, $code, &$cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = dirname( __FILE__ ) . "/../i18n/$csCode.json"; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( array_keys( $data ) as $key ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } -$messages['en'] = array( - 'bs-flexiskin-extension-description' => 'Provides a page to manage flexiskins with customizing options.', - //SpecialPage - 'flexiskin' => 'Flexiskin', - 'bs-flexiskin-label' => 'Flexiskin', - 'bs-flexiskin-defaultName' => 'Default', - 'bs-flexiskin-defaultDesc' => 'Default Template for the Flexiskin', - 'bs-flexiskin-error-skinExists' => 'A Flexiskin with this name already exists.', - 'bs-flexiskin-error-fail-add-skin' => 'A new Flexiskin could not be created. (Reason: "$1")', - 'bs-flexiskin-reset-error' => 'Could not reset configurations. (Reason: "$1")', - 'bs-flexiskin-error-get-config' => 'The configurations could not be loaded. (Reason: "$1")', - 'bs-flexiskin-error-delete-skin' => 'Could not delete skin. (Reason: "$1")', - 'bs-flexiskin-not-allowed' => 'Access to this page is not allowed.', - //Settings - 'prefs-Flexiskin' => 'Flexiskin', - 'bs-flexiskin-pref-active' => 'Active Flexiskin: ', - 'bs-flexiskin-pref-logo' => 'Logo: ', - //JavaScript - 'bs-flexiskin-headerName' => 'Name', - 'bs-flexiskin-headerDesc' => 'Description', - 'bs-flexiskin-labelName' => 'Name', - 'bs-flexiskin-labelDesc' => 'Description', - 'bs-flexiskin-headerGeneral' => 'General', - 'bs-flexiskin-dialogClose' => 'Are you sure you want to close the preview?', - 'bs-flexiskin-dialogReset' => 'The skin will be reset to the last saved state. Do you want to continue?', - 'bs-flexiskin-confirmDeleteSkin' => 'Are you sure that you want to delete this skin?', - 'bs-flexiskin-titleAddSkin' => 'Add Flexiskin', - 'bs-flexiskin-labelSkins' => 'Template', - 'bs-flexiskin-headerActive' => 'Active', - 'bs-flexiskin-labelBackgroundColor' => 'Background color', - 'bs-flexiskin-headerHeader' => 'Header', - 'bs-flexiskin-labelLogoUpload' => 'Logo', - 'bs-flexiskin-labelBackgroundUpload' => 'Background image', - 'bs-flexiskin-no-repeat' => 'no repeat', - 'bs-flexiskin-repeat-x' => 'horizontal repeat', - 'bs-flexiskin-repeat-y' => 'vertical repeat', - 'bs-flexiskin-repeat' => 'horizontal and vertical repeat', - 'bs-flexiskin-labelRepeatBackground' => 'Repeat background image', - 'bs-flexiskin-labelCustomBackgroundColor' => 'Custom color', - 'bs-flexiskin-no-img' => 'No Image', - 'bs-flexiskin-headerPosition' => "Positions and sizes", - 'bs-flexiskin-labelNavigation' => 'Position of the navigation', - 'bs-flexiskin-labelContent' => 'Position of the page', - 'bs-flexiskin-left' => 'left', - 'bs-flexiskin-right' => 'right', - 'bs-flexiskin-center' => 'center', - 'bs-flexiskin-labelWidth' => 'Complete width (px)', - 'bs-flexiskin-labelFullWidth' => 'Maximum width', - 'bs-flexiskin-error-nameEmpty' => 'Please enter a valid name for the Flexiskin you want to create.', - 'bs-flexiskin-error-templateNotExists' => 'The chosen template does not exist.' -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; + } -$messages['de'] = array( - 'bs-flexiskin-extension-description' => 'Stellt eine Seite zum Verwalten von Flexiskins mit Anpassungsoptionen zur Verfügung.', - //SpecialPage - 'flexiskin' => 'Flexiskin', - 'bs-flexiskin-label' => 'Flexiskin', - 'bs-flexiskin-defaultName' => 'Standard', - 'bs-flexiskin-defaultDesc' => 'Standard Vorlage für den Flexiskin', - 'bs-flexiskin-error-skinExists' => 'Ein Flexiskin mit diesem Namen existiert bereits.', - 'bs-flexiskin-error-fail-add-skin' => 'Ein neuer Flexiskin konnte nicht erstellt werden. (Grund: "$1")', - 'bs-flexiskin-reset-error' => 'Die Einstellungen konnten nicht zurückgesetzt werden. (Grund: "$1")', - 'bs-flexiskin-error-get-config' => 'Die Konfiguration konnte nicht geladen werden. (Grund: "$1")', - 'bs-flexiskin-error-delete-skin' => 'Der Skin konnte nicht gelöscht werden. (Reason: "$1")', - 'bs-flexiskin-not-allowed' => 'Der Zugriff auf diese Seite ist nicht erlaubt.', - //Settings - 'prefs-Flexiskin' => 'Flexiskin', - 'bs-flexiskin-pref-active' => 'Aktiver Flexiskin: ', - 'bs-flexiskin-pref-logo' => 'Logo: ', - //JavaScript - 'bs-flexiskin-headerName' => 'Name', - 'bs-flexiskin-headerDesc' => 'Beschreibung', - 'bs-flexiskin-labelName' => 'Name', - 'bs-flexiskin-labelDesc' => 'Beschreibung', - 'bs-flexiskin-headerGeneral' => 'Allgemein', - 'bs-flexiskin-dialogClose' => 'Bist du sicher, dass du die Vorschau schließen möchtest?', - 'bs-flexiskin-dialogReset' => 'Der Skin wird auf den zuletzt gespeicherten Stand zurückgesetzt. Möchtest du fortfahren?', - 'bs-flexiskin-confirmDeleteSkin' => 'Bist du sicher, dass du diesen Skin löschen möchtest?', - 'bs-flexiskin-titleAddSkin' => 'Flexiskin hinzufügen', - 'bs-flexiskin-labelSkins' => 'Vorlage', - 'bs-flexiskin-headerActive' => 'Aktiv', - 'bs-flexiskin-labelBackgroundColor' => 'Hintergrundfarbe', - 'bs-flexiskin-headerHeader' => 'Kopfleiste', - 'bs-flexiskin-labelLogoUpload' => 'Logo', - 'bs-flexiskin-labelBackgroundUpload' => 'Hintergrundbild', - 'bs-flexiskin-labelRepeatBackground' => 'Hintergrundbild wiederholen', - 'bs-flexiskin-no-repeat' => 'keine Wiederholung', - 'bs-flexiskin-repeat-x' => 'horizontale Wiederholung', - 'bs-flexiskin-repeat-y' => 'vertikale Wiederholung', - 'bs-flexiskin-repeat' => 'horizontale und vertikale Wiederholung', - 'bs-flexiskin-labelCustomBackgroundColor' => 'Benutzerdefinierte Farbe', - 'bs-flexiskin-no-img' => 'Kein Bild', - 'bs-flexiskin-headerPosition' => "Positionen und Größen", - 'bs-flexiskin-labelNavigation' => 'Position der Navigation', - 'bs-flexiskin-labelContent' => 'Seitenausrichtung', - 'bs-flexiskin-left' => 'links', - 'bs-flexiskin-right' => 'rechts', - 'bs-flexiskin-center' => 'mittig', - 'bs-flexiskin-labelWidth' => 'Gesamtbreite (px)', - 'bs-flexiskin-labelFullWidth' => 'Maximale Breite', - 'bs-flexiskin-error-nameEmpty' => 'Bitte gib einen validen Namen für den Flexiskin den du erstellen möchtest ein.', - 'bs-flexiskin-error-templateNotExists' => 'Das ausgewählte Template existiert nicht.' -); - -$messages['de-formal'] = array( - 'bs-flexiskin-dialogClose' => 'Sind Sie sicher, dass Sie die Vorschau schließen möchten?', - 'bs-flexiskin-dialogReset' => 'Der Skin wird auf den zuletzt gespeicherten Stand zurückgesetzt. Möchten Sie fortfahren?', - 'bs-flexiskin-confirmDeleteSkin' => 'Sind Sie sicher, dass Sie diesen Skin löschen möchten?', - 'bs-flexiskin-error-nameEmpty' => 'Bitte geben Sie einen validen Namen für den Flexiskin den Sie erstellen möchten ein.' -); - -$messages['qqq'] = array(); + $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShima5bcba5d320cd14e'; +} diff --git a/Flexiskin/resources/BS.Flexiskin/AddSkin.js b/Flexiskin/resources/BS.Flexiskin/AddSkin.js index 80dba0d..260cfae 100644 --- a/Flexiskin/resources/BS.Flexiskin/AddSkin.js +++ b/Flexiskin/resources/BS.Flexiskin/AddSkin.js @@ -20,7 +20,7 @@ this.strSkins.on( 'load', this.onStrSkinsLoad, this ); this.tfName = Ext.create( 'Ext.form.TextField', { - fieldLabel: mw.message('bs-flexiskin-labelName').plain(), + fieldLabel: mw.message('bs-flexiskin-labelname').plain(), labelWidth: 130, labelAlign: 'left', name: 'name', @@ -29,7 +29,7 @@ id: 'bs-flexiskin-add-dlg-name' }); this.tfDesc = Ext.create( 'Ext.form.TextField', { - fieldLabel: mw.message('bs-flexiskin-labelDesc').plain(), + fieldLabel: mw.message('bs-flexiskin-labeldesc').plain(), labelWidth: 130, labelAlign: 'left', name: 'desc', @@ -37,7 +37,7 @@ }); this.cbSkins = Ext.create( 'Ext.form.field.ComboBox', { - fieldLabel: mw.message('bs-flexiskin-labelSkins').plain(), + fieldLabel: mw.message('bs-flexiskin-labelskins').plain(), labelWidth: 130, labelAlign: 'left', store: this.strSkins, @@ -87,8 +87,8 @@ onStrSkinsLoad: function( store, records, successful, eOpts ) { store.insert(0, { flexiskin_id:'default', - flexiskin_name: mw.message('bs-flexiskin-defaultName').plain(), - flexiskin_desc: mw.message('bs-flexiskin-defaultDesc').plain() + flexiskin_name: mw.message('bs-flexiskin-defaultname').plain(), + flexiskin_desc: mw.message('bs-flexiskin-defaultdesc').plain() }); this.cbSkins.setValue('default'); }, diff --git a/Flexiskin/resources/BS.Flexiskin/Menuitems/General.js b/Flexiskin/resources/BS.Flexiskin/Menuitems/General.js index 06f442b..9d61aad 100644 --- a/Flexiskin/resources/BS.Flexiskin/Menuitems/General.js +++ b/Flexiskin/resources/BS.Flexiskin/Menuitems/General.js @@ -1,12 +1,12 @@ Ext.define('BS.Flexiskin.Menuitems.General', { extend: 'Ext.Panel', - title: mw.message('bs-flexiskin-headerGeneral').plain(), + title: mw.message('bs-flexiskin-headergeneral').plain(), layout: 'form', currentData: {}, id: 'bs-flexiskin-preview-menu-general', initComponent: function() { this.tfName = Ext.create('Ext.form.TextField', { - fieldLabel: mw.message('bs-flexiskin-labelName').plain(), + fieldLabel: mw.message('bs-flexiskin-labelname').plain(), labelWidth: 100, labelAlign: 'left', name: 'name', @@ -16,7 +16,7 @@ Ext.getCmp('bs-flexiskin-preview-menu').onItemStateChange(); }); this.tfDesc = Ext.create('Ext.form.TextField', { - fieldLabel: mw.message('bs-flexiskin-labelDesc').plain(), + fieldLabel: mw.message('bs-flexiskin-labeldesc').plain(), labelWidth: 100, labelAlign: 'left', name: 'desc', @@ -38,14 +38,14 @@ }); this.coBackgroundColorContainer = Ext.create('Ext.form.FieldContainer', { - fieldLabel: mw.message('bs-flexiskin-labelBackgroundColor').plain(), + fieldLabel: mw.message('bs-flexiskin-labelbgcolor').plain(), labelWidth: 100, labelAlign: 'left', items: [this.pfBackgroundColor] }); this.tfCustomBackgroundColor = Ext.create('Ext.form.TextField', { id: 'bs-flexiskin-general-custom-background-field', - fieldLabel: mw.message('bs-flexiskin-labelCustomBackgroundColor').plain(), + fieldLabel: mw.message('bs-flexiskin-labelcustombgcolor').plain(), labelWidth: 100, labelAlign: 'left', name: 'customBackgroundColor', @@ -60,7 +60,7 @@ this.ufBackgroundUpload = Ext.create('BS.form.UploadPanel', { url: bs.util.getAjaxDispatcherUrl('Flexiskin::uploadFile'), uploadFormName: 'background', - uploadFieldLabel: mw.message('bs-flexiskin-labelBackgroundUpload').plain(), + uploadFieldLabel: mw.message('bs-flexiskin-labelbackgroundupload').plain(), uploadLabelWidth: 100, uploadResetButton: true }); @@ -74,7 +74,7 @@ ] }); this.cgRepeatBackground = Ext.create('Ext.form.ComboBox', { - fieldLabel: mw.message('bs-flexiskin-labelRepeatBackground').plain(), + fieldLabel: mw.message('bs-flexiskin-labelrepeatbackground').plain(), mode: 'local', store: rep_back_pos, displayField: 'val', diff --git a/Flexiskin/resources/BS.Flexiskin/Menuitems/Header.js b/Flexiskin/resources/BS.Flexiskin/Menuitems/Header.js index 7594452..d6c6d28 100644 --- a/Flexiskin/resources/BS.Flexiskin/Menuitems/Header.js +++ b/Flexiskin/resources/BS.Flexiskin/Menuitems/Header.js @@ -1,6 +1,6 @@ Ext.define('BS.Flexiskin.Menuitems.Header', { extend: 'BS.Panel', - title: mw.message('bs-flexiskin-headerHeader').plain(), + title: mw.message('bs-flexiskin-headerheader').plain(), layout: 'form', currentData: {}, id: 'bs-flexiskin-preview-menu-header', @@ -8,7 +8,7 @@ this.ufLogoUpload = Ext.create('BS.form.UploadPanel', { url: bs.util.getAjaxDispatcherUrl('Flexiskin::uploadFile'), uploadFormName: 'logo', - uploadFieldLabel: mw.message('bs-flexiskin-labelLogoUpload').plain(), + uploadFieldLabel: mw.message('bs-flexiskin-labellogoupload').plain(), uploadLabelWidth: 50, uploadResetButton: true }); diff --git a/Flexiskin/resources/BS.Flexiskin/Menuitems/Position.js b/Flexiskin/resources/BS.Flexiskin/Menuitems/Position.js index 950c522..e9ea8b5 100644 --- a/Flexiskin/resources/BS.Flexiskin/Menuitems/Position.js +++ b/Flexiskin/resources/BS.Flexiskin/Menuitems/Position.js @@ -1,6 +1,6 @@ Ext.define('BS.Flexiskin.Menuitems.Position', { extend: 'BS.Panel', - title: mw.message('bs-flexiskin-headerPosition').plain(), + title: mw.message('bs-flexiskin-headerposition').plain(), layout: 'form', currentData: {}, id: 'bs-flexiskin-preview-menu-position', @@ -13,7 +13,7 @@ ] }); this.cgNavigation = Ext.create('Ext.form.ComboBox', { - fieldLabel: mw.message('bs-flexiskin-labelNavigation').plain(), + fieldLabel: mw.message('bs-flexiskin-labelnavigation').plain(), mode: 'local', store: nav_pos, displayField: 'val', @@ -35,7 +35,7 @@ ] }); this.cgContent = Ext.create('Ext.form.ComboBox', { - fieldLabel: mw.message('bs-flexiskin-labelContent').plain(), + fieldLabel: mw.message('bs-flexiskin-labelcontent').plain(), mode: 'local', store: cont_pos, displayField: 'val', @@ -49,7 +49,7 @@ scope: this }); this.tfWidth = Ext.create('Ext.form.TextField', { - fieldLabel: mw.message('bs-flexiskin-labelWidth').plain(), + fieldLabel: mw.message('bs-flexiskin-labelwidth').plain(), labelWidth: 100, labelAlign: 'left', name: 'width', @@ -59,7 +59,7 @@ Ext.getCmp('bs-flexiskin-preview-menu').onItemStateChange(); }); this.cbFullWidth = Ext.create('Ext.form.field.Checkbox', { - fieldLabel: mw.message('bs-flexiskin-labelFullWidth').plain(), + fieldLabel: mw.message('bs-flexiskin-labelfullwidth').plain(), labelWidth: 100, labelAlign: 'left', name: 'fullWidth', diff --git a/Flexiskin/resources/BS.Flexiskin/Panel.js b/Flexiskin/resources/BS.Flexiskin/Panel.js index 7738bb8..d56b60d 100644 --- a/Flexiskin/resources/BS.Flexiskin/Panel.js +++ b/Flexiskin/resources/BS.Flexiskin/Panel.js @@ -38,21 +38,21 @@ this.colName = Ext.create('Ext.grid.column.Template', { id: 'flexiskin_name', - header: mw.message('bs-flexiskin-headerName').plain(), + header: mw.message('bs-flexiskin-labelname').plain(), sortable: true, dataIndex: 'flexiskin_name', tpl: '{flexiskin_name}' }); this.colDesc = Ext.create('Ext.grid.column.Template', { id: 'flexiskin_desc', - header: mw.message('bs-flexiskin-headerDesc').plain(), + header: mw.message('bs-flexiskin-labeldesc').plain(), sortable: true, dataIndex: 'flexiskin_desc', tpl: '{flexiskin_desc}' }); this.colActive = Ext.create('Ext.grid.column.CheckColumn', { id: 'flexiskin_active', - header: mw.message('bs-flexiskin-headerActive').plain(), + header: mw.message('bs-flexiskin-headeractive').plain(), sortable: true, dataIndex: 'flexiskin_active' }); @@ -82,7 +82,7 @@ this.dlgSkinAdd.on('ok', this.onDlgSkinAdd, this); } - this.dlgSkinAdd.setTitle(mw.message('bs-flexiskin-titleAddSkin').plain()); + this.dlgSkinAdd.setTitle(mw.message('bs-flexiskin-titleaddskin').plain()); this.dlgSkinAdd.tfName.enable(); this.dlgSkinAdd.show(); this.callParent(arguments); @@ -129,7 +129,7 @@ bs.util.confirm( 'UMremove', { - text: mw.message('bs-flexiskin-confirmDeleteSkin').plain(), + text: mw.message('bs-flexiskin-confirmdeleteskin').plain(), title: mw.message('bs-extjs-delete').plain() }, { diff --git a/Flexiskin/resources/BS.Flexiskin/PreviewMenu.js b/Flexiskin/resources/BS.Flexiskin/PreviewMenu.js index 60254b4..78888ef 100644 --- a/Flexiskin/resources/BS.Flexiskin/PreviewMenu.js +++ b/Flexiskin/resources/BS.Flexiskin/PreviewMenu.js @@ -107,7 +107,7 @@ 'bs-flexiskin-config-close', { titleMsg: 'bs-extjs-warning', - textMsg: 'bs-flexiskin-dialogClose' + textMsg: 'bs-flexiskin-dialogclose' }, { ok: function() { @@ -129,7 +129,7 @@ 'bs-flexiskin-config-close', { titleMsg: 'bs-extjs-warning', - textMsg: 'bs-flexiskin-dialogReset' + textMsg: 'bs-flexiskin-dialogreset' }, { ok: function() { -- To view, visit https://gerrit.wikimedia.org/r/147403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45fc49af74009094d7dac7f14c42f8212278a612 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli <mug...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits