Raimond Spekking has uploaded a new change for review.
https://gerrit.wikimedia.org/r/169197
Change subject: Convert i18n to JSON
......................................................................
Convert i18n to JSON
* Remove "translations" which are identical to English
* TODO: Please add message documentation
Change-Id: I8c9eb5669727fce860a0e6fa23a081a1599da1ca
---
A i18n/cs.json
A i18n/de.json
A i18n/en.json
A i18n/es.json
A i18n/nl.json
M mscatselect.i18n.php
M mscatselect.php
7 files changed, 121 insertions(+), 98 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsCatSelect
refs/changes/97/169197/1
diff --git a/i18n/cs.json b/i18n/cs.json
new file mode 100644
index 0000000..95aa64c
--- /dev/null
+++ b/i18n/cs.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Neřeknu <[email protected]>"
+ ]
+ },
+ "mscs-title": "Hlavní kategorie",
+ "mscs-untercat": "Nová podkategorie",
+ "mscs-untercat-hinw": "bude vytvořena ve výše uvedené kategorii",
+ "mscs-warnnocat": "UPOZORNĚNÍ: Tato stránka není zařazena do žádné
kategorie. Prosím zvolte nějakou kategorii!",
+ "mscs-cats": "Již přiřazené kategorie",
+ "mscs-add": "přidat",
+ "mscs-go": "vytvořit"
+}
diff --git a/i18n/de.json b/i18n/de.json
new file mode 100644
index 0000000..87f7788
--- /dev/null
+++ b/i18n/de.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Martin Schwindl <[email protected]>",
+ "Kghbln"
+ ]
+ },
+ "mscs-desc": "Ermöglicht das Zuweisen einer Seite zu einer bestehenden
oder neu erstellbaren Kategorie über ein Dropdown-Listenfeld",
+ "mscs-title": "Oberkategorie auswählen:",
+ "mscs-untercat": "Neue Unterkategorie:",
+ "mscs-untercat-hinw": "wird in vorrausgewählter Oberkategorie erstellt",
+ "mscs-warnnocat": "VORSICHT: Diese Seite enthält noch keine Kategorie.
Bitte fügen Sie zuerst eine Kategorie hinzu!",
+ "mscs-cats": "Bereits vergebene Kategorien:",
+ "mscs-add": "hinzufügen",
+ "mscs-go": "erstellen",
+ "mscs-created": "Neue Kategorie erfolgreich erstellt",
+ "mscs-sortkey": "Hier bitte den Sortierschlüssel eingeben. Der
Sortierschlüssel ist für die Sortierung in der Kategorieübersicht relevant."
+}
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..b2fbcd2
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "GabMaster",
+ "Kghbln"
+ ]
+ },
+ "mscs-desc": "Allows to add a page to an existing or newly creatable
category via a drop-down list",
+ "mscs-title": "Main category",
+ "mscs-untercat": "New subcategory",
+ "mscs-untercat-hinw": "will be created in the category selected above",
+ "mscs-warnnocat": "WARNING: This page does not belong to any category.
Please select a category.',
+ "mscs-cats": "Assigned categories",
+ "mscs-add": "Add",
+ "mscs-go": "Create",
+ "mscs-created": "New category successfully created",
+ "mscs-sortkey": "Please add the default sortkey here. It is used for
sorting within the category overview pages."
+}
diff --git a/i18n/es.json b/i18n/es.json
new file mode 100644
index 0000000..18e64f5
--- /dev/null
+++ b/i18n/es.json
@@ -0,0 +1,17 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ángel J. Vico"
+ ]
+ },
+ "mscs-desc": "Esta extensión permite asignar categorías y subcategorías
a una página escogiéndolas de una lista desplegable. También permite crear
nuevas categorías desde la página de edición.",
+ "mscs-title": "Categoría principal",
+ "mscs-untercat": "Nueva subcategoría",
+ "mscs-untercat-hinw": "se creará en la categoría seleccionada arriba",
+ "mscs-warnnocat": "ADVERTENCIA: Esta página no pertenece a ninguna
categoría. Por favor, seleccione una categoría.",
+ "mscs-cats": "Categorías asignadas",
+ "mscs-add": "Agregar",
+ "mscs-go": "Crear",
+ "mscs-created": "Nueva categoría creada con éxito",
+ "mscs-sortkey": "Por favor introduce el criterio de ordenación. La
clave de ordenación se utiliza para clasificar el contenido de la categoría."
+}
diff --git a/i18n/nl.json b/i18n/nl.json
new file mode 100644
index 0000000..4deac96
--- /dev/null
+++ b/i18n/nl.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "hrh"
+ ]
+ },
+ "mscs-title": "Categorie",
+ "mscs-untercat": "Nieuwe subcategorie",
+ "mscs-untercat-hinw": "Nieuwe categorie wordt aangemaakt in
bovenstaande categorie, tenzij --- is geselecteerd",
+ "selectcategory-warnnocat": "Deze pagina heeft nog geen categorie.
Definieer een nieuwe of bestaande categorie.",
+ "mscs-cats": "Toegewezen categorieën",
+ "mscs-add": "Toevoegen",
+ "mscs-go": "Aanmaken"
+}
diff --git a/mscatselect.i18n.php b/mscatselect.i18n.php
index 83fe96c..d61449f 100644
--- a/mscatselect.i18n.php
+++ b/mscatselect.i18n.php
@@ -1,94 +1,35 @@
-<?php
-/**
- * Internationalisation file for extension MsCatSelect.
- *
- * @author Martin Schwindl <[email protected]>
- *
- * @licence GNU General Public Licence 2.0 or later
- */
-
-$messages = array();
-
-/** German (Deutsch)
- * @author Martin Schwindl <[email protected]>
- * @author Kghbln
- */
-$messages['de'] = array(
- 'mscs-desc' => 'Ermöglicht das Zuweisen einer Seite zu einer
bestehenden oder neu erstellbaren Kategorie über ein Dropdown-Listenfeld',
- 'mscs-title' => 'Oberkategorie auswählen:',
- 'mscs-untercat' => 'Neue Unterkategorie:',
- 'mscs-untercat-hinw' => 'wird in vorrausgewählter Oberkategorie
erstellt',
- 'mscs-warnnocat' => 'VORSICHT: Diese Seite enthält noch keine
Kategorie. Bitte fügen Sie zuerst eine Kategorie hinzu!',
- 'mscs-cats' => 'Bereits vergebene Kategorien:',
- 'mscs-add' => 'hinzufügen',
- 'mscs-go' => 'erstellen',
- 'mscs-created' => 'Neue Kategorie erfolgreich erstellt',
- 'mscs-sortkey' => 'Hier bitte den Sortierschlüssel eingeben. Der
Sortierschlüssel ist für die Sortierung in der Kategorieübersicht relevant.'
-);
-
-/** Czech (Česky) 1.0
- * @author Neřeknu <[email protected]>
- */
-$messages['cs'] = array(
- 'mscs-desc' => 'Mit dieser Extension kann eine Seite einer
bestehenden oder neuen Kategorie per DropDown zugewiesen werden oder auch neue
Unterkategorien erstellt werden.',
- 'mscs-title' => 'Hlavní kategorie',
- 'mscs-untercat' => 'Nová podkategorie',
- 'mscs-untercat-hinw' => 'bude vytvořena ve výše uvedené kategorii',
- 'mscs-warnnocat' => 'UPOZORNĚNÍ: Tato stránka není zařazena do žádné
kategorie. Prosím zvolte nějakou kategorii!',
- 'mscs-cats' => 'Již přiřazené kategorie',
- 'mscs-add' => 'přidat',
- 'mscs-go' => 'vytvořit',
- 'mscs-created' => 'Neue Kategorie erfolgreich erstellt',
- 'mscs-sortkey' => 'Hier bitte den Sortierschlüssel eingeben. Der
Sortierschlüssel ist für die Sortierung in der Kategorieübersicht relevant.'
-);
-
-/** English
- * @author GabMaster
- * @author Kghbln
- * Note: Warning messages are still defined in German (in "mscatselect.js").
- */
-$messages['en'] = array(
- 'mscs-desc' => 'Allows to add a page to an existing or newly creatable
category via a drop-down list',
- 'mscs-title' => 'Main Category',
- 'mscs-untercat' => 'New subcategory',
- 'mscs-untercat-hinw' => 'will be created in the category selected
above',
- 'mscs-warnnocat' => 'WARNING: This page does not belong to any
category. Please select a category!',
- 'mscs-cats' => 'Assigned categories',
- 'mscs-add' => 'Add',
- 'mscs-go' => 'Create',
- 'mscs-created' => 'New category successfully created',
- 'mscs-sortkey' => 'Please add the default sortkey here. It is used for
sorting within the category overview pages.'
-);
-
-/** Nederlands
- * @author hrh
- */
-$messages['nl'] = array(
- 'mscs-desc' => 'Allows to add a page to an existing or newly
creatable category via a drop-down list',
- 'mscs-title' => 'Categorie',
- 'mscs-untercat' => 'Nieuwe subcategorie',
- 'mscs-untercat-hinw' => 'Nieuwe categorie wordt aangemaakt in
bovenstaande categorie, tenzij --- is geselecteerd',
- 'selectcategory-warnnocat' => 'Deze pagina heeft nog geen categorie.
Definieer een nieuwe of bestaande categorie.',
- 'mscs-cats' => 'Toegewezen categorieën',
- 'mscs-add' => 'Toevoegen',
- 'mscs-go' => 'Aanmaken',
- 'mscs-created' => 'New category successfully created',
- 'mscs-sortkey' => 'Please add the default sortkey here. It is used for
sorting within the category overview pages.'
-);
-
-
-/** Spanish (Español)
- * @author Ángel J. Vico
- */
-$messages['es'] = array(
- 'mscs-desc' => 'Esta extensión permite asignar categorías y
subcategorías a una página escogiéndolas de una lista desplegable. También
permite crear nuevas categorías desde la página de edición.',
- 'mscs-title' => 'Categoría principal',
- 'mscs-untercat' => 'Nueva subcategoría',
- 'mscs-untercat-hinw' => 'se creará en la categoría seleccionada arriba',
- 'mscs-warnnocat' => 'ADVERTENCIA: Esta página no pertenece a ninguna
categoría. Por favor, seleccione una categoría.',
- 'mscs-cats' => 'Categorías asignadas',
- 'mscs-add' => 'Agregar',
- 'mscs-go' => 'Crear',
- 'mscs-created' => 'Nueva categoría creada con éxito',
- 'mscs-sortkey' => 'Por favor introduce el criterio de ordenación. La
clave de ordenación se utiliza para clasificar el contenido de la categoría.'
-);
\ No newline at end of file
+<?php
+/**
+ * This is a backwards-compatibility shim, generated by:
+ *
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
+ *
+ * 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
+ *
+ * This shim maintains compatibility back to MediaWiki 1.17.
+ */
+$messages = array();
+if ( !function_exists( 'wfJsonI18nShim71de45b0e695cd9c' ) ) {
+ function wfJsonI18nShim71de45b0e695cd9c( $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'] );
+ }
+
+ $cachedData['deps'][] = new FileDependency( $fileName );
+ }
+ return true;
+ }
+
+ $GLOBALS['wgHooks']['LocalisationCacheRecache'][] =
'wfJsonI18nShim71de45b0e695cd9c';
+}
diff --git a/mscatselect.php b/mscatselect.php
index c98526b..818fc3c 100644
--- a/mscatselect.php
+++ b/mscatselect.php
@@ -30,14 +30,15 @@
## Register extension setup hook and credits:
$wgExtensionCredits['parserhook'][] = array(
'name' => 'MsCatSelect',
- 'url' => 'http://www.mediawiki.org/wiki/Extension:MsCatSelect',
- 'version' => '5.3',
- 'author' => '[mailto:[email protected] [email protected]] |
[http://www.ratin.de/mscatselect.html Ratin]',
+ 'url' =>
'https://www.mediawiki.org/wiki/Extension:MsCatSelect',
+ 'version' => '5.3.1',
+ 'author' => '[mailto:[email protected]
[email protected]] | [http://www.ratin.de/mscatselect.html Ratin]',
'descriptionmsg' => 'mscs-desc',
);
$dir = dirname(__FILE__) . '/';
-$wgExtensionMessagesFiles['mscatselect'] = $dir . 'mscatselect.i18n.php';
+$wgExtensionMessagesFiles['MsCatSelect'] = $dir . 'mscatselect.i18n.php';
+$wgMessagesDirs['MsCatSelect'] = $dir . 'i18n';
# Hook when starting editing:
$wgHooks['EditPage::showEditForm:initial'][] = array(
'fnSelectCategoryShowHook', false );
--
To view, visit https://gerrit.wikimedia.org/r/169197
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c9eb5669727fce860a0e6fa23a081a1599da1ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MsCatSelect
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits