Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/122307

Change subject: Migrate to JSON i18n
......................................................................

Migrate to JSON i18n

Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: If27cca890269a31b6ef9627b51cac0866dbd5ded
---
M CreditTab.i18n.php
M CreditTab.php
A i18n/ar.json
A i18n/ast.json
A i18n/be-tarask.json
A i18n/br.json
A i18n/de.json
A i18n/dsb.json
A i18n/en.json
A i18n/es.json
A i18n/fr.json
A i18n/frp.json
A i18n/gl.json
A i18n/he.json
A i18n/hsb.json
A i18n/ia.json
A i18n/it.json
A i18n/ja.json
A i18n/ksh.json
A i18n/lb.json
A i18n/mk.json
A i18n/nl.json
A i18n/pl.json
A i18n/pms.json
A i18n/qqq.json
A i18n/ru.json
A i18n/tl.json
27 files changed, 271 insertions(+), 228 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CreditTab 
refs/changes/07/122307/1

diff --git a/CreditTab.i18n.php b/CreditTab.i18n.php
index 34ce655..eeb2776 100644
--- a/CreditTab.i18n.php
+++ b/CreditTab.i18n.php
@@ -1,232 +1,31 @@
 <?php
-
 /**
- * Messages file for the CreditTab extension
+ * This is a backwards-compatibility shim, generated by:
+ * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
  *
- * @addtogroup Extensions
- */
-
-/**
- * Get all extension messages
+ * 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
  *
- * @return array
+ * This shim maintains compatibility back to MediaWiki 1.17.
  */
 $messages = array();
+$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, 
&$cachedData ) {
+       $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+       foreach ( $codeSequence as $csCode ) {
+               $fileName = __DIR__ . "/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(
-       'credits-desc' => 'Adds a link to credits',
-       'credits-tab' => 'Credits',
-       'credits-tab-title' => 'Credits for this page',
-);
-
-/** Message documentation (Message documentation) */
-$messages['qqq'] = array(
-       'credits-desc' => 'Description for Special:Version',
-       'credits-tab' => 'Label of the tab that is shown by this extension',
-       'credits-tab-title' => 'Tool tip of the link shown in the "credits" 
tab',
-);
-
-/** Arabic (العربية)
- * @author روخو
- */
-$messages['ar'] = array(
-       'credits-tab' => 'ائتمانات',
-);
-
-/** Asturian (asturianu)
- * @author Xuacu
- */
-$messages['ast'] = array(
-       'credits-desc' => 'Amiesta un enllaz a los créditos',
-       'credits-tab' => 'Créditos',
-       'credits-tab-title' => "Créditos d'esta páxina",
-);
-
-/** Belarusian (Taraškievica orthography) (‪беларуская (тарашкевіца)‬)
- * @author Wizardist
- */
-$messages['be-tarask'] = array(
-       'credits-desc' => 'Дадае спасылку да сьпісу аўтараў',
-       'credits-tab' => 'Аўтары',
-       'credits-tab-title' => 'Аўтары гэтай старонкі',
-);
-
-/** Breton (brezhoneg)
- * @author Fulup
- */
-$messages['br'] = array(
-       'credits-tab' => 'Kredoù',
-       'credits-tab-title' => 'Kredoù evit ar bajenn-mañ',
-);
-
-/** German (Deutsch)
- * @author Kghbln
- */
-$messages['de'] = array(
-       'credits-desc' => 'Ergänzt einen Reiter zur Anzeige der Autoren einer 
Seite',
-       'credits-tab' => 'Autoren',
-       'credits-tab-title' => 'Autoren dieser Seite',
-);
-
-/** Lower Sorbian (dolnoserbski)
- * @author Michawiki
- */
-$messages['dsb'] = array(
-       'credits-desc' => 'Pśidawa wótkaz k lisćinje awtorow',
-       'credits-tab' => 'Awtory',
-       'credits-tab-title' => 'Awtory toś togo boka',
-);
-
-/** Spanish (español)
- * @author Armando-Martin
- */
-$messages['es'] = array(
-       'credits-desc' => 'Agrega un enlace a los créditos',
-       'credits-tab' => 'Créditos',
-       'credits-tab-title' => 'Créditos para esta página',
-);
-
-/** French (français)
- * @author Gomoko
- */
-$messages['fr'] = array(
-       'credits-desc' => 'Ajoute un lien aux remerciements',
-       'credits-tab' => 'Remerciements',
-       'credits-tab-title' => 'Remerciements pour cette page',
-);
-
-/** Franco-Provençal (arpetan)
- * @author ChrisPtDe
- */
-$messages['frp'] = array(
-       'credits-tab' => 'Remarciements',
-       'credits-tab-title' => 'Remarciements por cela pâge',
-);
-
-/** Galician (galego)
- * @author Toliño
- */
-$messages['gl'] = array(
-       'credits-desc' => 'Engade unha ligazón aos créditos',
-       'credits-tab' => 'Créditos',
-       'credits-tab-title' => 'Créditos desta páxina',
-);
-
-/** Hebrew (עברית)
- * @author Deror avi
- */
-$messages['he'] = array(
-       'credits-desc' => 'להוספת קישור לקרדיטים',
-       'credits-tab' => 'קרדיטים',
-       'credits-tab-title' => 'קרדיטים לדף זה',
-);
-
-/** Upper Sorbian (hornjoserbsce)
- * @author Michawiki
- */
-$messages['hsb'] = array(
-       'credits-desc' => 'Přidawa wotkaz k lisćinje awtorow',
-       'credits-tab' => 'Awtorojo',
-       'credits-tab-title' => 'Awtorojo tuteje strony',
-);
-
-/** Interlingua (interlingua)
- * @author McDutchie
- */
-$messages['ia'] = array(
-       'credits-desc' => 'Insere un ligamine al creditos',
-       'credits-tab' => 'Creditos',
-       'credits-tab-title' => 'Creditos pro iste pagina',
-);
-
-/** Italian (italiano)
- * @author Beta16
- */
-$messages['it'] = array(
-       'credits-desc' => 'Aggiunge un collegamento ai crediti',
-       'credits-tab' => 'Crediti',
-       'credits-tab-title' => 'Crediti per questa pagina',
-);
-
-/** Japanese (日本語)
- * @author Shirayuki
- */
-$messages['ja'] = array(
-       'credits-desc' => '帰属表示へのリンクを追加する',
-       'credits-tab' => '帰属',
-       'credits-tab-title' => 'このページの帰属情報',
-);
-
-/** Colognian (Ripoarisch)
- * @author Purodha
- */
-$messages['ksh'] = array(
-       'credits-desc' => 'Donn Lenks op Danksaarunge derbei.',
-       'credits-tab' => 'Danksarunge',
-       'credits-tab-title' => 'Danksaarunge för heh di Sigg',
-);
-
-/** Luxembourgish (Lëtzebuergesch)
- * @author Robby
- */
-$messages['lb'] = array(
-       'credits-desc' => "Setzt e Link op d'Bedeelegungen derbäi",
-       'credits-tab' => 'Bedeelegungen',
-       'credits-tab-title' => 'Bedeelegt un dëser Säit',
-);
-
-/** Macedonian (македонски)
- * @author Bjankuloski06
- */
-$messages['mk'] = array(
-       'credits-desc' => 'Додава врска во „Заслуги“',
-       'credits-tab' => 'Заслуги',
-       'credits-tab-title' => 'Заслуги за страницава',
-);
-
-/** Dutch (Nederlands)
- * @author Siebrand
- */
-$messages['nl'] = array(
-       'credits-desc' => 'Voegt een verwijzing toe aan naamsvermeldingen',
-       'credits-tab' => 'Vermeldingen',
-       'credits-tab-title' => 'Vermeldingen voor deze pagina',
-);
-
-/** Polish (polski)
- * @author Woytecr
- */
-$messages['pl'] = array(
-       'credits-desc' => 'Dodaje link do listy autorów',
-       'credits-tab' => 'Autorzy',
-       'credits-tab-title' => 'Autorzy tej strony',
-);
-
-/** Piedmontese (Piemontèis)
- * @author Borichèt
- * @author Dragonòt
- */
-$messages['pms'] = array(
-       'credits-desc' => "A gionta un colegament a j'arconossiment",
-       'credits-tab' => 'Arconossiment',
-       'credits-tab-title' => 'Arconossiment për costa pàgina',
-);
-
-/** Russian (русский)
- * @author Express2000
- */
-$messages['ru'] = array(
-       'credits-desc' => 'Добавляет ссылку на сведения об авторах',
-       'credits-tab' => 'Создатели',
-       'credits-tab-title' => 'Сведения об авторах для этой страницы',
-);
-
-/** Tagalog (Tagalog)
- * @author AnakngAraw
- */
-$messages['tl'] = array(
-       'credits-desc' => 'Nagdaragdag ng isang kawing sa mga 
banggit-pagkilala',
-       'credits-tab' => 'Mga banggit-pagkilala',
-       'credits-tab-title' => 'Mga banggit-pagkilala para sa pahinang ito',
-);
-
+               $cachedData['deps'][] = new FileDependency( $fileName );
+       }
+       return true;
+};
diff --git a/CreditTab.php b/CreditTab.php
index 097ed51..b4a6da1 100644
--- a/CreditTab.php
+++ b/CreditTab.php
@@ -1,6 +1,6 @@
 <?php
-/** 
-* @addtogroup Extensions 
+/**
+* @addtogroup Extensions
 */
 // Check environment
 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -15,7 +15,7 @@
        'path' => __FILE__,
        'name' => 'CreditTab',
        'author' => '[http://www.dasch-tour.de DaSch]',
-       'version' =>  '1.5.0',
+       'version' =>  '1.6.0',
        'descriptionmsg' => 'credits-desc',
        'url' => 'https://www.mediawiki.org/wiki/Extension:CreditTab',
 );
@@ -23,6 +23,7 @@
 $dir = dirname( __FILE__ ) . '/';
 
 // Internationalization
+$wgMessagesDirs['CreditTab'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['CreditTab'] = $dir . 'CreditTab.i18n.php';
 
 $wgAutoloadClasses['CreditTabHooks'] = $dir . 'CreditTab.hooks.php';
diff --git a/i18n/ar.json b/i18n/ar.json
new file mode 100644
index 0000000..c91e299
--- /dev/null
+++ b/i18n/ar.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "روخو"
+        ]
+    },
+    "credits-tab": "ائتمانات"
+}
\ No newline at end of file
diff --git a/i18n/ast.json b/i18n/ast.json
new file mode 100644
index 0000000..d1e1483
--- /dev/null
+++ b/i18n/ast.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Xuacu"
+        ]
+    },
+    "credits-desc": "Amiesta un enllaz a los créditos",
+    "credits-tab": "Créditos",
+    "credits-tab-title": "Créditos d'esta páxina"
+}
\ No newline at end of file
diff --git a/i18n/be-tarask.json b/i18n/be-tarask.json
new file mode 100644
index 0000000..6b73de2
--- /dev/null
+++ b/i18n/be-tarask.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Wizardist"
+        ]
+    },
+    "credits-desc": "Дадае спасылку да сьпісу аўтараў",
+    "credits-tab": "Аўтары",
+    "credits-tab-title": "Аўтары гэтай старонкі"
+}
\ No newline at end of file
diff --git a/i18n/br.json b/i18n/br.json
new file mode 100644
index 0000000..659ec25
--- /dev/null
+++ b/i18n/br.json
@@ -0,0 +1,9 @@
+{
+    "@metadata": {
+        "authors": [
+            "Fulup"
+        ]
+    },
+    "credits-tab": "Kredoù",
+    "credits-tab-title": "Kredoù evit ar bajenn-mañ"
+}
\ No newline at end of file
diff --git a/i18n/de.json b/i18n/de.json
new file mode 100644
index 0000000..b8e3208
--- /dev/null
+++ b/i18n/de.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Kghbln"
+        ]
+    },
+    "credits-desc": "Ergänzt einen Reiter zur Anzeige der Autoren einer Seite",
+    "credits-tab": "Autoren",
+    "credits-tab-title": "Autoren dieser Seite"
+}
\ No newline at end of file
diff --git a/i18n/dsb.json b/i18n/dsb.json
new file mode 100644
index 0000000..3c20b78
--- /dev/null
+++ b/i18n/dsb.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Michawiki"
+        ]
+    },
+    "credits-desc": "Pśidawa wótkaz k lisćinje awtorow",
+    "credits-tab": "Awtory",
+    "credits-tab-title": "Awtory toś togo boka"
+}
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..3f3df7b
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": []
+    },
+    "credits-desc": "Adds a link to credits",
+    "credits-tab": "Credits",
+    "credits-tab-title": "Credits for this page"
+}
\ No newline at end of file
diff --git a/i18n/es.json b/i18n/es.json
new file mode 100644
index 0000000..f5305ba
--- /dev/null
+++ b/i18n/es.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Armando-Martin"
+        ]
+    },
+    "credits-desc": "Agrega un enlace a los créditos",
+    "credits-tab": "Créditos",
+    "credits-tab-title": "Créditos para esta página"
+}
\ No newline at end of file
diff --git a/i18n/fr.json b/i18n/fr.json
new file mode 100644
index 0000000..f78f18e
--- /dev/null
+++ b/i18n/fr.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Gomoko"
+        ]
+    },
+    "credits-desc": "Ajoute un lien aux remerciements",
+    "credits-tab": "Remerciements",
+    "credits-tab-title": "Remerciements pour cette page"
+}
\ No newline at end of file
diff --git a/i18n/frp.json b/i18n/frp.json
new file mode 100644
index 0000000..6b08443
--- /dev/null
+++ b/i18n/frp.json
@@ -0,0 +1,9 @@
+{
+    "@metadata": {
+        "authors": [
+            "ChrisPtDe"
+        ]
+    },
+    "credits-tab": "Remarciements",
+    "credits-tab-title": "Remarciements por cela pâge"
+}
\ No newline at end of file
diff --git a/i18n/gl.json b/i18n/gl.json
new file mode 100644
index 0000000..24905a7
--- /dev/null
+++ b/i18n/gl.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Toliño"
+        ]
+    },
+    "credits-desc": "Engade unha ligazón aos créditos",
+    "credits-tab": "Créditos",
+    "credits-tab-title": "Créditos desta páxina"
+}
\ No newline at end of file
diff --git a/i18n/he.json b/i18n/he.json
new file mode 100644
index 0000000..ed6abca
--- /dev/null
+++ b/i18n/he.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Deror avi"
+        ]
+    },
+    "credits-desc": "להוספת קישור לקרדיטים",
+    "credits-tab": "קרדיטים",
+    "credits-tab-title": "קרדיטים לדף זה"
+}
\ No newline at end of file
diff --git a/i18n/hsb.json b/i18n/hsb.json
new file mode 100644
index 0000000..be8b6dc
--- /dev/null
+++ b/i18n/hsb.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Michawiki"
+        ]
+    },
+    "credits-desc": "Přidawa wotkaz k lisćinje awtorow",
+    "credits-tab": "Awtorojo",
+    "credits-tab-title": "Awtorojo tuteje strony"
+}
\ No newline at end of file
diff --git a/i18n/ia.json b/i18n/ia.json
new file mode 100644
index 0000000..056b68f
--- /dev/null
+++ b/i18n/ia.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "McDutchie"
+        ]
+    },
+    "credits-desc": "Insere un ligamine al creditos",
+    "credits-tab": "Creditos",
+    "credits-tab-title": "Creditos pro iste pagina"
+}
\ No newline at end of file
diff --git a/i18n/it.json b/i18n/it.json
new file mode 100644
index 0000000..f479c2d
--- /dev/null
+++ b/i18n/it.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Beta16"
+        ]
+    },
+    "credits-desc": "Aggiunge un collegamento ai crediti",
+    "credits-tab": "Crediti",
+    "credits-tab-title": "Crediti per questa pagina"
+}
\ No newline at end of file
diff --git a/i18n/ja.json b/i18n/ja.json
new file mode 100644
index 0000000..f0a2bb4
--- /dev/null
+++ b/i18n/ja.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Shirayuki"
+        ]
+    },
+    "credits-desc": "帰属表示へのリンクを追加する",
+    "credits-tab": "帰属",
+    "credits-tab-title": "このページの帰属情報"
+}
\ No newline at end of file
diff --git a/i18n/ksh.json b/i18n/ksh.json
new file mode 100644
index 0000000..22e7e2e
--- /dev/null
+++ b/i18n/ksh.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Purodha"
+        ]
+    },
+    "credits-desc": "Donn Lenks op Danksaarunge derbei.",
+    "credits-tab": "Danksarunge",
+    "credits-tab-title": "Danksaarunge för heh di Sigg"
+}
\ No newline at end of file
diff --git a/i18n/lb.json b/i18n/lb.json
new file mode 100644
index 0000000..271e877
--- /dev/null
+++ b/i18n/lb.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Robby"
+        ]
+    },
+    "credits-desc": "Setzt e Link op d'Bedeelegungen derbäi",
+    "credits-tab": "Bedeelegungen",
+    "credits-tab-title": "Bedeelegt un dëser Säit"
+}
\ No newline at end of file
diff --git a/i18n/mk.json b/i18n/mk.json
new file mode 100644
index 0000000..684a71a
--- /dev/null
+++ b/i18n/mk.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Bjankuloski06"
+        ]
+    },
+    "credits-desc": "Додава врска во „Заслуги“",
+    "credits-tab": "Заслуги",
+    "credits-tab-title": "Заслуги за страницава"
+}
\ No newline at end of file
diff --git a/i18n/nl.json b/i18n/nl.json
new file mode 100644
index 0000000..a21da3f
--- /dev/null
+++ b/i18n/nl.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Siebrand"
+        ]
+    },
+    "credits-desc": "Voegt een verwijzing toe aan naamsvermeldingen",
+    "credits-tab": "Vermeldingen",
+    "credits-tab-title": "Vermeldingen voor deze pagina"
+}
\ No newline at end of file
diff --git a/i18n/pl.json b/i18n/pl.json
new file mode 100644
index 0000000..7cbc231
--- /dev/null
+++ b/i18n/pl.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Woytecr"
+        ]
+    },
+    "credits-desc": "Dodaje link do listy autorów",
+    "credits-tab": "Autorzy",
+    "credits-tab-title": "Autorzy tej strony"
+}
\ No newline at end of file
diff --git a/i18n/pms.json b/i18n/pms.json
new file mode 100644
index 0000000..e811620
--- /dev/null
+++ b/i18n/pms.json
@@ -0,0 +1,11 @@
+{
+    "@metadata": {
+        "authors": [
+            "Borichèt",
+            "Dragonòt"
+        ]
+    },
+    "credits-desc": "A gionta un colegament a j'arconossiment",
+    "credits-tab": "Arconossiment",
+    "credits-tab-title": "Arconossiment për costa pàgina"
+}
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..e611a60
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": []
+    },
+    "credits-desc": "Description for Special:Version",
+    "credits-tab": "Label of the tab that is shown by this extension",
+    "credits-tab-title": "Tool tip of the link shown in the \"credits\" tab"
+}
\ No newline at end of file
diff --git a/i18n/ru.json b/i18n/ru.json
new file mode 100644
index 0000000..550c1ca
--- /dev/null
+++ b/i18n/ru.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "Express2000"
+        ]
+    },
+    "credits-desc": "Добавляет ссылку на сведения об авторах",
+    "credits-tab": "Создатели",
+    "credits-tab-title": "Сведения об авторах для этой страницы"
+}
\ No newline at end of file
diff --git a/i18n/tl.json b/i18n/tl.json
new file mode 100644
index 0000000..cfb1226
--- /dev/null
+++ b/i18n/tl.json
@@ -0,0 +1,10 @@
+{
+    "@metadata": {
+        "authors": [
+            "AnakngAraw"
+        ]
+    },
+    "credits-desc": "Nagdaragdag ng isang kawing sa mga banggit-pagkilala",
+    "credits-tab": "Mga banggit-pagkilala",
+    "credits-tab-title": "Mga banggit-pagkilala para sa pahinang ito"
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/122307
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If27cca890269a31b6ef9627b51cac0866dbd5ded
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CreditTab
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@kitano.nl>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to