Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/142213
Change subject: Implemented changes for translatewiki ...................................................................... Implemented changes for translatewiki Moved php i18n file into languages folder Moved to Json i18n files Change-Id: I20b9ae3e3a297d88a68cc1aa35588cbe9f6efd40 --- M WantedArticle/WantedArticle.class.php D WantedArticle/WantedArticle.i18n.php M WantedArticle/WantedArticle.setup.php A WantedArticle/i18n/de-formal.json A WantedArticle/i18n/de.json A WantedArticle/i18n/en.json A WantedArticle/i18n/qqq.json M WantedArticle/languages/WantedArticle.i18n.php M WantedArticle/resources/bluespice.wantedArticle.js 9 files changed, 210 insertions(+), 300 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/13/142213/1 diff --git a/WantedArticle/WantedArticle.class.php b/WantedArticle/WantedArticle.class.php index 0f281f5..877afb9 100644 --- a/WantedArticle/WantedArticle.class.php +++ b/WantedArticle/WantedArticle.class.php @@ -358,13 +358,23 @@ * @return always true to keep hook running */ public function onBSInsertMagicAjaxGetData( &$oResponse, $type ) { - if( $type != 'tags' ) return true; + if ( $type != 'tags' ) return true; + + $aParams = array( + wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc-param-count' )->text(), + wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc-param-title' )->text(), + wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc-param-order' )->text(), + wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc-param-sort' )->text(), + wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc-param-type' )->text() + ); + $sDesc = wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc' )->plain(). + '<br /><br />' . implode( '<br />', $aParams ); $oResponse->result[] = array( 'id' => 'bs:wantedarticle', 'type' => 'tag', 'name' => 'wantedarticle', - 'desc' => wfMessage( 'bs-wantedarticle-tag-wantedarticle-desc' )->parse(), + 'desc' => $sDesc, 'code' => '<bs:wantedarticle />', ); @@ -488,19 +498,25 @@ } if ( count( $aFoundChars ) > 0 ) { - $sErrorMsg = wfMessage( 'bs-wantedarticle-ajax-error-invalid-chars' )->plain(); - $sErrorMsg .= implode( ', ', $aFoundChars ); + $sChars = implode( ', ', $aFoundChars ); + $sErrorMsg = wfMessage( 'bs-wantedarticle-title-invalid-chars', $sChars )->plain(); return json_encode( array('success' => false, 'message' => $sErrorMsg ) ); } //Check if suggested page already exists $oSuggestedTitle = Title::newFromText( $sSuggestedArticleWikiLink ); + $sSuggestedTitle = $oSuggestedTitle->getPrefixedText(); if ( $oSuggestedTitle->exists() ) { $sErrorMsg = wfMessage( 'bs-wantedarticle-ajax-error-suggested-page-already-exists', - $oSuggestedTitle->getPrefixedText() + $sSuggestedTitle )->plain(); - return json_encode( array('success' => false, 'message' => $sErrorMsg ) ); + return json_encode( + array( + 'success' => false, + 'message' => $sErrorMsg + ) + ); } $oWantedArticle = BsExtensionManager::getExtension( 'WantedArticle' ); @@ -513,9 +529,14 @@ if ( $oSuggestedTitle->equals( $aWish['title'] ) ){ $sErrorMsg = wfMessage( 'bs-wantedarticle-ajax-error-suggested-page-already-on-list', - $oSuggestedTitle->getPrefixedText() + $sSuggestedTitle )->plain(); - return json_encode( array('success' => true, 'message' => $sErrorMsg ) ); + return json_encode( + array( + 'success' => true, + 'message' => $sErrorMsg + ) + ); } if ( $bDeleteExisting && $aWish['title']->exists() === true ){ unset($aWishList[$key]); @@ -534,14 +555,24 @@ $oEditStatus = $oWantedArticle->saveTitleListToTitle( $aWishList, $oDataSourceArticle->getTitle(), - wfMessage( 'bs-wantedarticle-edit-comment-suggestion-added', $oSuggestedTitle->getPrefixedText() )->plain() + wfMessage( 'bs-wantedarticle-edit-comment-suggestion-added', $sSuggestedTitle )->plain() ); if ( $oEditStatus->isGood() ) { - return json_encode( array( 'success' => true, 'message' => wfMessage( 'bs-wantedarticle-success-suggestion-entered' )->plain() ) ); + return FormatJson::encode( + array( + 'success' => true, + 'message' => wfMessage( 'bs-wantedarticle-success-suggestion-entered', $sSuggestedTitle )->plain() + ) + ); } else { $sErrorMsg = $oWantedArticle->mCore->parseWikiText( $oEditStatus->getWikiText(), $this->getTitle() ); - return json_encode( array( 'success' => false, 'message' => $sErrorMsg ) ); + return FormatJson::encode( + array( + 'success' => false, + 'message' => $sErrorMsg + ) + ); } } diff --git a/WantedArticle/WantedArticle.i18n.php b/WantedArticle/WantedArticle.i18n.php deleted file mode 100644 index c18d9ce..0000000 --- a/WantedArticle/WantedArticle.i18n.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php -/** - * Internationalisation file for WantedArticle - * - * Part of BlueSpice for MediaWiki - * - * @author Stephan Muggli <mug...@hallowelt.biz> - * @package BlueSpice_Extensions - * @subpackage WantedArticle - * @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 - */ - -$messages = array(); - -$messages['de'] = array( - 'bs-wantedarticle-desc' => 'Ein Textfeld, über das man einer Liste gewünschte Seiten hinzufügen kann.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'Es wurde kein Titel angegeben', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'Die Seite $1 existiert bereits.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'Die Seite $1 wurde bereits vorgeschlagen.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'Die folgenden Zeichen sind in einem Titel nicht erlaubt: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => '$1 wurde über das Formular eingetragen.', - 'bs-wantedarticle-success-suggestion-entered' => 'Dein Vorschlag wurde eingetragen', - 'bs-wantedarticle-sort-value-unknown' => 'Es sind nur die Werte "title" (Nach Titel) und "time" (Nach Zeit) gültig', - 'bs-wantedarticle-order-value-unknown' => 'Es sind nur die Werte ASC (aufsteigend) und DESC (absteigend) gültig', - 'bs-wantedarticle-page-removed' => 'Der Artikel $1 wurde von der Liste entfernt', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Vorschlagen', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Anlegen', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Artikeltitel', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Stellt eine Liste der gewünschten Artikel dar. -Verfügbare Parameter: -;count: Numerischer Freitext -;sort: Mögliche Werte sind <code>time</code>, <code>title</code> -;order: Mögliche Werte sind <code>ASC</code>, <code>DESC</code> -;title: Freitext -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => 'mehr...', - 'bs-wantedarticle-tag-default-title' => 'Gewünschte Seiten', - 'wantedarticle' => 'Gewünschte Seiten', - 'prefs-wantedarticle' => 'Gewünschte Seiten', - 'bs-wantedarticle-pref-includelimit' => 'Maximale Länge der Wunschliste:', - 'bs-wantedarticle-pref-deleteexisting' => 'Existierende Artikel aus Wunschliste löschen', - 'bs-wantedarticle-pref-showcreate' => 'Anlegen anzeigen', - 'bs-wantedarticle-pref-deleteoncreation' => 'Beim Anlegen eines Artikels diesen aus der Liste entfernen', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Titel des Artikels, in dem die Vorschläge aufgelistet werden (Wird im Vorlage Namensraum erstellt)', - 'bs-wantedarticle-pref-sort' => 'Sortierreihenfolge', - 'bs-wantedarticle-pref-order' => 'Reihenfolge', - 'bs-wantedarticle-pref-sort-time' => 'Zeit', - 'bs-wantedarticle-pref-sort-title' => 'Titel', - 'bs-wantedarticle-pref-order-asc' => 'aufsteigend', - 'bs-wantedarticle-pref-order-desc' => 'absteigend', - 'bs-wantedarticle-create-page' => 'Seite $1 erstellen.', - 'bs-wantedarticle-suggest-page' => 'Seite $1 vorschlagen.', - 'bs-wantedarticle-info_dialog_title' => 'Hinweis', - 'bs-wantedarticle-info-nothing-entered' => 'Bitte gib einen zulässigen Titel ein.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'Die folgenden Zeichen sind in einem Titel nicht erlaubt: ' -); - -$messages['de-formal'] = array( - 'bs-wantedarticle-info-nothing-entered' => 'Bitte geben Sie einen zulässigen Titel ein.', - 'bs-wantedarticle-success-suggestion-entered' => 'Ihr Vorschlag wurde eingetragen', -); - -$messages['en'] = array( - 'bs-wantedarticle-desc' => 'Add a page to the wanted page list.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'No title provided.', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'The suggested page $1 already exitis.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'The suggested page $1 is already in list.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'The following characters are not valid for use in an page title: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => '$1 entered by form.', - 'bs-wantedarticle-success-suggestion-entered' => 'Your suggestion was entered to the list.', - 'bs-wantedarticle-sort-value-unknown' => 'Only the values title and time are valid', - 'bs-wantedarticle-order-value-unknown' => 'Only values ASC (acending) and DESC (descendig) are valid', - 'bs-wantedarticle-page-removed' => 'The page $1 has been removed from the list', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Suggest', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Create', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Title', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Renders a list of wanted articles. -Valid attributes: -;count: Numerical free text -;sort: Possible values are <code>time</code>, <code>title</code> -;order: Possible values are <code>ASC</code>, <code>DESC</code> -;title: Free text -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => 'more...', - 'bs-wantedarticle-tag-default-title' => 'Wanted articles', - 'wantedarticle' => 'Wanted article', - 'prefs-wantedarticle' => 'Wanted article', - 'bs-wantedarticle-pref-includelimit' => 'Include limits:', - 'bs-wantedarticle-pref-deleteexisting' => 'Delete existing entries', - 'bs-wantedarticle-pref-showcreate' => 'Show create', - 'bs-wantedarticle-pref-deleteoncreation' => 'Remove list entry if created', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Article title to place the suggestions (is created in template namespace)', - 'bs-wantedarticle-pref-sort' => 'Sort by', - 'bs-wantedarticle-pref-order' => 'Order', - 'bs-wantedarticle-pref-sort-time' => 'Time', - 'bs-wantedarticle-pref-sort-title' => 'Title', - 'bs-wantedarticle-pref-order-asc' => 'ascending', - 'bs-wantedarticle-pref-order-desc' => 'descending', - 'bs-wantedarticle-create-page' => 'Create article $1.', - 'bs-wantedarticle-suggest-page' => 'Suggest article $1.', - 'bs-wantedarticle-info-nothing-entered' => 'Please provide a valid title.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'The following characters are not valid for use in an article title: ' + '<br />' -); - -$messages['qqq'] = array( - 'bs-wantedarticle-desc' => 'Used in [[Special:Wiki_Admin&mode=ExtensionInfo]], description of wanted article extension.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'Text for no title provided.', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'Text for the suggested page $1 already exitis.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'Text for the suggested page $1 is already in list.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'Text for the following characters are not valid for use in a page title: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => 'Text for $1 entered by form. $1 is the name of the suggested page.', - 'bs-wantedarticle-success-suggestion-entered' => 'Text for your suggestion was added to the list.', - 'bs-wantedarticle-sort-value-unknown' => 'Text for only the values title and time are valid', - 'bs-wantedarticle-order-value-unknown' => 'Text for only the values ASC (acending) and DESC (descendig) are valid', - 'bs-wantedarticle-page-removed' => 'Text for the page $1 has been removed from the list', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Button text for suggest', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Button text for create', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Default text in input field for title', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Text for renders a list of wanted pages.\n -Valid attributes:\n -;count: Numerical free text\n -;sort: Possible values are <code>time</code>, <code>title</code>\n -;order: Possible values are <code>ASC</code>, <code>DESC</code>\n -;title: Free text\n -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => ' Text for more...', - 'bs-wantedarticle-tag-default-title' => 'Text for wanted pages', - 'wantedarticle' => 'Wanted pages', - 'prefs-wantedarticle' => 'Wanted pages', - 'bs-wantedarticle-pref-includelimit' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for include limits:', - 'bs-wantedarticle-pref-deleteexisting' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for delete existing entries', - 'bs-wantedarticle-pref-showcreate' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for show create', - 'bs-wantedarticle-pref-deleteoncreation' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for remove list entry if created', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for page title to place the suggestions (is created in template namespace)', - 'bs-wantedarticle-pref-sort' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for sort by:', - 'bs-wantedarticle-pref-order' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for order:', - 'bs-wantedarticle-pref-sort-time' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for time', - 'bs-wantedarticle-pref-sort-title' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for title', - 'bs-wantedarticle-pref-order-asc' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for ascending', - 'bs-wantedarticle-pref-order-desc' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for descending', - 'bs-wantedarticle-create-page' => 'Text for create page $1. $1 is the entered page name', - 'bs-wantedarticle-suggest-page' => 'Test for suggest page $1. $1 is the entered page name', - 'bs-wantedarticle-info-nothing-entered' => 'Text for please provide a valid title.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'Text for the following characters are not valid for use in a page title: \' + \'<br />' -); \ No newline at end of file diff --git a/WantedArticle/WantedArticle.setup.php b/WantedArticle/WantedArticle.setup.php index 38cded2..9a1e8e5 100644 --- a/WantedArticle/WantedArticle.setup.php +++ b/WantedArticle/WantedArticle.setup.php @@ -9,7 +9,7 @@ //'styles' => 'bluespice.wantedArticle.css', 17.05.2014 13:43 STM: Not needed at the moment because wantedarticle from is not used anymore - not removed because maybe future use 'messages' => array( 'bs-wantedarticle-info-nothing-entered', - 'bs-wantedarticle-info-title-contains-invalid-chars' + 'bs-wantedarticle-title-invalid-chars' ), 'position' => 'top', 'localBasePath' => $IP . '/extensions/BlueSpiceExtensions/WantedArticle/resources', diff --git a/WantedArticle/i18n/de-formal.json b/WantedArticle/i18n/de-formal.json new file mode 100644 index 0000000..ed47674 --- /dev/null +++ b/WantedArticle/i18n/de-formal.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-wantedarticle-info-nothing-entered": "Bitte geben Sie einen zulässigen Seitentitel ein.", + "bs-wantedarticle-success-suggestion-entered": "Ihr Vorschlag wurde eingetragen." +} diff --git a/WantedArticle/i18n/de.json b/WantedArticle/i18n/de.json new file mode 100644 index 0000000..61d56fb --- /dev/null +++ b/WantedArticle/i18n/de.json @@ -0,0 +1,44 @@ +{ + "@metadata": { + "authors": [ + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-wantedarticle-desc": "Eine gewünschte Seite vorschlagen", + "prefs-wantedarticle": "Gewünschte Seiten", + "bs-wantedarticle-ajax-error-no-parameter": "Es wurde kein Seitentitel angegeben.", + "bs-wantedarticle-ajax-error-suggested-page-already-exists": "Die Seite \"$1\" existiert bereits.", + "bs-wantedarticle-ajax-error-suggested-page-already-on-list": "Die Seite \"$1\" wurde bereits vorgeschlagen.", + "bs-wantedarticle-edit-comment-suggestion-added": "Vorschlag \"$1\" wurde eingetragen.", + "bs-wantedarticle-success-suggestion-entered": "Dein \"$1\" Vorschlag wurde eingetragen.", + "bs-wantedarticle-sort-value-unknown": "Es sind nur die Werte \"title\" (Seitentitel) und \"time\" (Zeit) gültig.", + "bs-wantedarticle-order-value-unknown": "Es sind nur die Werte \"ASC\" (aufsteigend) und \"DESC\" (absteigend) gültig.", + "bs-wantedarticle-page-removed": "Die Seite \"$1\" wurde von der Liste entfernt.", + "bs-wantedarticle-single-textfield-suggestbutton-text": "Vorschlagen", + "bs-wantedarticle-single-textfield-createbutton-text": "Erstellen", + "bs-wantedarticle-single-textfield-defaulttext": "Seitentitel", + "bs-wantedarticle-tag-wantedarticle-desc": "Stellt eine Liste der gewünschten Seiten dar. Verfügbare Konfigurationsparameter sind:", + "bs-wantedarticle-tag-wantedarticle-desc-param-count": "<code>count</code>: Anzahl von darzustellenden Seiten.", + "bs-wantedarticle-tag-wantedarticle-desc-param-title": "<code>title</code>: Überschrift.", + "bs-wantedarticle-tag-wantedarticle-desc-param-order": "<code>order</code>: Sortierreihenfolge <code>ASC</code> (aufsteigend) oder <code>DESC</code> (absteigend).", + "bs-wantedarticle-tag-wantedarticle-desc-param-sort": "<code>sort</code>: Sortieren nach <code>time</code> (Zeit) oder <code>title</code> (Seitentitel).", + "bs-wantedarticle-tag-wantedarticle-desc-param-type": "<code>type</code>: Ausgabeformat <code>list</code> (Liste) oder <code>quene</code> (Kommasepariert).", + "bs-wantedarticle-tag-more-linktext": "Mehr ...", + "bs-wantedarticle-tag-default-title": "Gewünschte Seiten", + "bs-wantedarticle-pref-includelimit": "Anzahl der darzustellenden Vorschläge:", + "bs-wantedarticle-pref-deleteexisting": "Existierende Seiten aus Wunschliste löschen", + "bs-wantedarticle-pref-showcreate": "Erstellen-Link anzeigen", + "bs-wantedarticle-pref-deleteoncreation": "Beim Erstellen einer Seite, diese aus der Liste entfernen", + "bs-wantedarticle-pref-datasourcetemplatetitle": "Vorlagentitel der Wunschliste:", + "bs-wantedarticle-pref-sort": "Sortieren nach:", + "bs-wantedarticle-pref-order": "Reihenfolge:", + "bs-wantedarticle-pref-sort-time": "Zeit", + "bs-wantedarticle-pref-sort-title": "Titel", + "bs-wantedarticle-pref-order-asc": "aufsteigend", + "bs-wantedarticle-pref-order-desc": "absteigend", + "bs-wantedarticle-create-page": "Seite \"$1\" erstellen.", + "bs-wantedarticle-suggest-page": "Seite \"$1\" vorschlagen.", + "bs-wantedarticle-info_dialog_title": "Hinweis", + "bs-wantedarticle-info-nothing-entered": "Bitte gib einen zulässigen Seitentitel ein.", + "bs-wantedarticle-title-invalid-chars": "Die folgenden Zeichen sind in einem Seitentitel nicht erlaubt: $1" +} diff --git a/WantedArticle/i18n/en.json b/WantedArticle/i18n/en.json new file mode 100644 index 0000000..4fa8d65 --- /dev/null +++ b/WantedArticle/i18n/en.json @@ -0,0 +1,43 @@ +{ + "@metadata": { + "authors": [ + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-wantedarticle-desc": "Suggest a wanted page", + "prefs-wantedarticle": "Wanted page", + "bs-wantedarticle-ajax-error-no-parameter": "No page title provided.", + "bs-wantedarticle-ajax-error-suggested-page-already-exists": "The suggested page \"$1\" already exitis.", + "bs-wantedarticle-ajax-error-suggested-page-already-on-list": "The suggested page \"$1\" is already suggested.", + "bs-wantedarticle-edit-comment-suggestion-added": "Suggestion \"$1\" added.", + "bs-wantedarticle-success-suggestion-entered": "Your suggestion \"$1\" has been added.", + "bs-wantedarticle-sort-value-unknown": "Valid values are: title and time.", + "bs-wantedarticle-order-value-unknown": "Valid values are: ASC ({{int:bs-wantedarticle-pref-order-asc}}) and DESC ({{int:bs-wantedarticle-pref-order-desc}}).", + "bs-wantedarticle-page-removed": "The page \"$1\" has been removed.", + "bs-wantedarticle-single-textfield-suggestbutton-text": "Suggest", + "bs-wantedarticle-single-textfield-createbutton-text": "Create", + "bs-wantedarticle-single-textfield-defaulttext": "Page title", + "bs-wantedarticle-tag-wantedarticle-desc": "Renders a list of wanted pages. Available configuration attributes:", + "bs-wantedarticle-tag-wantedarticle-desc-param-count": "<code>count</code>: Number of pages to display.", + "bs-wantedarticle-tag-wantedarticle-desc-param-title": "<code>title</code>: Headline.", + "bs-wantedarticle-tag-wantedarticle-desc-param-order": "<code>order</code>: Sort order <code>ASC</code> ({{int:bs-wantedarticle-pref-order-asc}}) or <code>DESC</code> ({{int:bs-wantedarticle-pref-order-desc}})", + "bs-wantedarticle-tag-wantedarticle-desc-param-sort": "<code>sort</code>: Sort by <code>title</code> or <code>time</code>.", + "bs-wantedarticle-tag-wantedarticle-desc-param-type": "<code>type</code>: Output format <code>list</code> or <code>quene</code> (comma seperated).", + "bs-wantedarticle-tag-more-linktext": "More ...", + "bs-wantedarticle-tag-default-title": "Wanted pages", + "bs-wantedarticle-pref-includelimit": "Number of suggestions:", + "bs-wantedarticle-pref-deleteexisting": "Delete existing entries from list", + "bs-wantedarticle-pref-showcreate": "Show create link", + "bs-wantedarticle-pref-deleteoncreation": "Remove entry from list when page is created", + "bs-wantedarticle-pref-datasourcetemplatetitle": "Template title for suggestions:", + "bs-wantedarticle-pref-sort": "Sort by:", + "bs-wantedarticle-pref-order": "Order:", + "bs-wantedarticle-pref-sort-time": "Time", + "bs-wantedarticle-pref-sort-title": "Title", + "bs-wantedarticle-pref-order-asc": "ascending", + "bs-wantedarticle-pref-order-desc": "descending", + "bs-wantedarticle-create-page": "Create page \"$1\".", + "bs-wantedarticle-suggest-page": "Suggest page \"$1\".", + "bs-wantedarticle-info-nothing-entered": "Please provide a valid page title.", + "bs-wantedarticle-title-invalid-chars": "The following characters are not valid for use in a page title: $1" +} diff --git a/WantedArticle/i18n/qqq.json b/WantedArticle/i18n/qqq.json new file mode 100644 index 0000000..bd2c8a8 --- /dev/null +++ b/WantedArticle/i18n/qqq.json @@ -0,0 +1,43 @@ +{ + "@metadata": { + "authors": [ + "Stephan Muggli <mug...@hallowelt.biz>" + ] + }, + "bs-wantedarticle-desc": "Used in [[Special:Wiki_Admin&mode=ExtensionInfo]], description of wanted page extension.", + "prefs-wantedarticle": "Used in [[Special:Wiki_Admin&mode=Preferences]], headline for wanted page section in preferences.\n{{Identical|Wanted page}}", + "bs-wantedarticle-ajax-error-no-parameter": "Text for no page title provided.", + "bs-wantedarticle-ajax-error-suggested-page-already-exists": "Text for the suggested page \"$1\" already exitis. \n $1 is the name of the suggested page", + "bs-wantedarticle-ajax-error-suggested-page-already-on-list": "Text for the suggested page \"$1\" is already suggested. \n $1 is the name of the suggested page", + "bs-wantedarticle-edit-comment-suggestion-added": "Text for suggestion \"$1\" added. \n $1 is the name of the suggested page", + "bs-wantedarticle-success-suggestion-entered": "Text for your suggestion \"$1\" has been added.", + "bs-wantedarticle-sort-value-unknown": "Text for valid values are: title and time.", + "bs-wantedarticle-order-value-unknown": "Text for valid values are: ASC ({{int:bs-wantedarticle-pref-order-asc}}) and DESC ({{int:bs-wantedarticle-pref-order-desc}})", + "bs-wantedarticle-page-removed": "Text for the page \"$1\" has been removed. \n $1 is the name of the suggested page", + "bs-wantedarticle-single-textfield-suggestbutton-text": "Button text for suggest", + "bs-wantedarticle-single-textfield-createbutton-text": "Button text for create", + "bs-wantedarticle-single-textfield-defaulttext": "Default text in input field for page title", + "bs-wantedarticle-tag-wantedarticle-desc": "Text for renders a list of wanted pages. Available configuration attributes:", + "bs-wantedarticle-tag-wantedarticle-desc-param-count": "Text for <code>count</code>: Number of pages to display. \n \"count\" has to be lowercase", + "bs-wantedarticle-tag-wantedarticle-desc-param-title": "Text for <code>title</code>: Headline. \n \"title\" has to be lowercase", + "bs-wantedarticle-tag-wantedarticle-desc-param-order": "Text for <code>order</code>: Sort order <code>ASC</code> ({{int:bs-wantedarticle-pref-order-asc}}) or <code>DESC</code> ({{int:bs-wantedarticle-pref-order-desc}}) \n \"order\" has to be lowercase", + "bs-wantedarticle-tag-wantedarticle-desc-param-sort": "Text for <code>sort</code>: Sort by <code>title</code> or <code>time</code>. \n \"sort\" has to be lowercase", + "bs-wantedarticle-tag-wantedarticle-desc-param-type": "Text for <code>type</code>: Output format <code>list</code> or <code>quene</code> (comma seperated). \n \"type\" has to be lowercase", + "bs-wantedarticle-tag-more-linktext": " Text for more ...", + "bs-wantedarticle-tag-default-title": "Text for wanted pages", + "bs-wantedarticle-pref-includelimit": "Option in [[Special:Wiki_Admin&mode=Preferences]], label for number of suggestions:", + "bs-wantedarticle-pref-deleteexisting": "Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for delete existing entries", + "bs-wantedarticle-pref-showcreate": "Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for show create link", + "bs-wantedarticle-pref-deleteoncreation": "Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for remove entry from list when page is created", + "bs-wantedarticle-pref-datasourcetemplatetitle": "Option in [[Special:Wiki_Admin&mode=Preferences]], label for template title for suggestions:", + "bs-wantedarticle-pref-sort": "Option in [[Special:Wiki_Admin&mode=Preferences]], label for sort by:", + "bs-wantedarticle-pref-order": "Option in [[Special:Wiki_Admin&mode=Preferences]], label for order:", + "bs-wantedarticle-pref-sort-time": "Option in [[Special:Wiki_Admin&mode=Preferences]], option label for time", + "bs-wantedarticle-pref-sort-title": "Option in [[Special:Wiki_Admin&mode=Preferences]], option label for title", + "bs-wantedarticle-pref-order-asc": "Option in [[Special:Wiki_Admin&mode=Preferences]], option label for ascending", + "bs-wantedarticle-pref-order-desc": "Option in [[Special:Wiki_Admin&mode=Preferences]], option label for descending", + "bs-wantedarticle-create-page": "Text for create page \"$1\". $1 is the entered page name", + "bs-wantedarticle-suggest-page": "Test for suggest page \"$1\". $1 is the entered page name", + "bs-wantedarticle-info-nothing-entered": "Text for please provide a valid page title.", + "bs-wantedarticle-title-invalid-chars": "Text for The following characters are not valid for use in a page title: $1\n $1 is a comma seperated list of invalid characters" +} diff --git a/WantedArticle/languages/WantedArticle.i18n.php b/WantedArticle/languages/WantedArticle.i18n.php index c18d9ce..214c462 100644 --- a/WantedArticle/languages/WantedArticle.i18n.php +++ b/WantedArticle/languages/WantedArticle.i18n.php @@ -1,147 +1,35 @@ <?php /** - * Internationalisation file for WantedArticle + * 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 Stephan Muggli <mug...@hallowelt.biz> - * @package BlueSpice_Extensions - * @subpackage WantedArticle - * @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( 'wfJsonI18nShim06871b6646be3c43' ) ) { + function wfJsonI18nShim06871b6646be3c43( $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['de'] = array( - 'bs-wantedarticle-desc' => 'Ein Textfeld, über das man einer Liste gewünschte Seiten hinzufügen kann.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'Es wurde kein Titel angegeben', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'Die Seite $1 existiert bereits.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'Die Seite $1 wurde bereits vorgeschlagen.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'Die folgenden Zeichen sind in einem Titel nicht erlaubt: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => '$1 wurde über das Formular eingetragen.', - 'bs-wantedarticle-success-suggestion-entered' => 'Dein Vorschlag wurde eingetragen', - 'bs-wantedarticle-sort-value-unknown' => 'Es sind nur die Werte "title" (Nach Titel) und "time" (Nach Zeit) gültig', - 'bs-wantedarticle-order-value-unknown' => 'Es sind nur die Werte ASC (aufsteigend) und DESC (absteigend) gültig', - 'bs-wantedarticle-page-removed' => 'Der Artikel $1 wurde von der Liste entfernt', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Vorschlagen', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Anlegen', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Artikeltitel', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Stellt eine Liste der gewünschten Artikel dar. -Verfügbare Parameter: -;count: Numerischer Freitext -;sort: Mögliche Werte sind <code>time</code>, <code>title</code> -;order: Mögliche Werte sind <code>ASC</code>, <code>DESC</code> -;title: Freitext -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => 'mehr...', - 'bs-wantedarticle-tag-default-title' => 'Gewünschte Seiten', - 'wantedarticle' => 'Gewünschte Seiten', - 'prefs-wantedarticle' => 'Gewünschte Seiten', - 'bs-wantedarticle-pref-includelimit' => 'Maximale Länge der Wunschliste:', - 'bs-wantedarticle-pref-deleteexisting' => 'Existierende Artikel aus Wunschliste löschen', - 'bs-wantedarticle-pref-showcreate' => 'Anlegen anzeigen', - 'bs-wantedarticle-pref-deleteoncreation' => 'Beim Anlegen eines Artikels diesen aus der Liste entfernen', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Titel des Artikels, in dem die Vorschläge aufgelistet werden (Wird im Vorlage Namensraum erstellt)', - 'bs-wantedarticle-pref-sort' => 'Sortierreihenfolge', - 'bs-wantedarticle-pref-order' => 'Reihenfolge', - 'bs-wantedarticle-pref-sort-time' => 'Zeit', - 'bs-wantedarticle-pref-sort-title' => 'Titel', - 'bs-wantedarticle-pref-order-asc' => 'aufsteigend', - 'bs-wantedarticle-pref-order-desc' => 'absteigend', - 'bs-wantedarticle-create-page' => 'Seite $1 erstellen.', - 'bs-wantedarticle-suggest-page' => 'Seite $1 vorschlagen.', - 'bs-wantedarticle-info_dialog_title' => 'Hinweis', - 'bs-wantedarticle-info-nothing-entered' => 'Bitte gib einen zulässigen Titel ein.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'Die folgenden Zeichen sind in einem Titel nicht erlaubt: ' -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; + } -$messages['de-formal'] = array( - 'bs-wantedarticle-info-nothing-entered' => 'Bitte geben Sie einen zulässigen Titel ein.', - 'bs-wantedarticle-success-suggestion-entered' => 'Ihr Vorschlag wurde eingetragen', -); - -$messages['en'] = array( - 'bs-wantedarticle-desc' => 'Add a page to the wanted page list.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'No title provided.', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'The suggested page $1 already exitis.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'The suggested page $1 is already in list.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'The following characters are not valid for use in an page title: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => '$1 entered by form.', - 'bs-wantedarticle-success-suggestion-entered' => 'Your suggestion was entered to the list.', - 'bs-wantedarticle-sort-value-unknown' => 'Only the values title and time are valid', - 'bs-wantedarticle-order-value-unknown' => 'Only values ASC (acending) and DESC (descendig) are valid', - 'bs-wantedarticle-page-removed' => 'The page $1 has been removed from the list', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Suggest', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Create', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Title', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Renders a list of wanted articles. -Valid attributes: -;count: Numerical free text -;sort: Possible values are <code>time</code>, <code>title</code> -;order: Possible values are <code>ASC</code>, <code>DESC</code> -;title: Free text -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => 'more...', - 'bs-wantedarticle-tag-default-title' => 'Wanted articles', - 'wantedarticle' => 'Wanted article', - 'prefs-wantedarticle' => 'Wanted article', - 'bs-wantedarticle-pref-includelimit' => 'Include limits:', - 'bs-wantedarticle-pref-deleteexisting' => 'Delete existing entries', - 'bs-wantedarticle-pref-showcreate' => 'Show create', - 'bs-wantedarticle-pref-deleteoncreation' => 'Remove list entry if created', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Article title to place the suggestions (is created in template namespace)', - 'bs-wantedarticle-pref-sort' => 'Sort by', - 'bs-wantedarticle-pref-order' => 'Order', - 'bs-wantedarticle-pref-sort-time' => 'Time', - 'bs-wantedarticle-pref-sort-title' => 'Title', - 'bs-wantedarticle-pref-order-asc' => 'ascending', - 'bs-wantedarticle-pref-order-desc' => 'descending', - 'bs-wantedarticle-create-page' => 'Create article $1.', - 'bs-wantedarticle-suggest-page' => 'Suggest article $1.', - 'bs-wantedarticle-info-nothing-entered' => 'Please provide a valid title.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'The following characters are not valid for use in an article title: ' + '<br />' -); - -$messages['qqq'] = array( - 'bs-wantedarticle-desc' => 'Used in [[Special:Wiki_Admin&mode=ExtensionInfo]], description of wanted article extension.', - 'bs-wantedarticle-ajax-error-no-parameter' => 'Text for no title provided.', - 'bs-wantedarticle-ajax-error-suggested-page-already-exists' => 'Text for the suggested page $1 already exitis.', - 'bs-wantedarticle-ajax-error-suggested-page-already-on-list' => 'Text for the suggested page $1 is already in list.', - 'bs-wantedarticle-ajax-error-invalid-chars' => 'Text for the following characters are not valid for use in a page title: '+"\n", - 'bs-wantedarticle-edit-comment-suggestion-added' => 'Text for $1 entered by form. $1 is the name of the suggested page.', - 'bs-wantedarticle-success-suggestion-entered' => 'Text for your suggestion was added to the list.', - 'bs-wantedarticle-sort-value-unknown' => 'Text for only the values title and time are valid', - 'bs-wantedarticle-order-value-unknown' => 'Text for only the values ASC (acending) and DESC (descendig) are valid', - 'bs-wantedarticle-page-removed' => 'Text for the page $1 has been removed from the list', - 'bs-wantedarticle-single-textfield-suggestbutton-text' => 'Button text for suggest', - 'bs-wantedarticle-single-textfield-createbutton-text' => 'Button text for create', - 'bs-wantedarticle-single-textfield-defaulttext' => 'Default text in input field for title', - 'bs-wantedarticle-tag-wantedarticle-desc' => "Text for renders a list of wanted pages.\n -Valid attributes:\n -;count: Numerical free text\n -;sort: Possible values are <code>time</code>, <code>title</code>\n -;order: Possible values are <code>ASC</code>, <code>DESC</code>\n -;title: Free text\n -;type: Mögliche Werte sind <code>list</code>, <code>queue</code>", - 'bs-wantedarticle-tag-more-linktext' => ' Text for more...', - 'bs-wantedarticle-tag-default-title' => 'Text for wanted pages', - 'wantedarticle' => 'Wanted pages', - 'prefs-wantedarticle' => 'Wanted pages', - 'bs-wantedarticle-pref-includelimit' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for include limits:', - 'bs-wantedarticle-pref-deleteexisting' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for delete existing entries', - 'bs-wantedarticle-pref-showcreate' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for show create', - 'bs-wantedarticle-pref-deleteoncreation' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], checkbox label for remove list entry if created', - 'bs-wantedarticle-pref-datasourcetemplatetitle' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for page title to place the suggestions (is created in template namespace)', - 'bs-wantedarticle-pref-sort' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for sort by:', - 'bs-wantedarticle-pref-order' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], label for order:', - 'bs-wantedarticle-pref-sort-time' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for time', - 'bs-wantedarticle-pref-sort-title' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for title', - 'bs-wantedarticle-pref-order-asc' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for ascending', - 'bs-wantedarticle-pref-order-desc' => 'Option in [[Special:Wiki_Admin&mode=Preferences]], option label for descending', - 'bs-wantedarticle-create-page' => 'Text for create page $1. $1 is the entered page name', - 'bs-wantedarticle-suggest-page' => 'Test for suggest page $1. $1 is the entered page name', - 'bs-wantedarticle-info-nothing-entered' => 'Text for please provide a valid title.', - 'bs-wantedarticle-info-title-contains-invalid-chars' => 'Text for the following characters are not valid for use in a page title: \' + \'<br />' -); \ No newline at end of file + $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim06871b6646be3c43'; +} diff --git a/WantedArticle/resources/bluespice.wantedArticle.js b/WantedArticle/resources/bluespice.wantedArticle.js index 284aee8..a72387c 100644 --- a/WantedArticle/resources/bluespice.wantedArticle.js +++ b/WantedArticle/resources/bluespice.wantedArticle.js @@ -109,8 +109,7 @@ bs.util.alert( 'bs-wantedarticle-alert', { - text: mw.message('bs-wantedarticle-info-title-contains-invalid-chars' ).plain() - + aFoundChars.join( ', ' ) + text: mw.message('bs-wantedarticle-title-invalid-chars', aFoundChars.join( ', ' ) ).plain() } ); return false; -- To view, visit https://gerrit.wikimedia.org/r/142213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20b9ae3e3a297d88a68cc1aa35588cbe9f6efd40 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