jenkins-bot has submitted this change and it was merged.

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


Migrate to JSON i18n

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

Change-Id: Ibf6cef837c4fa1921918382c4176047221fa42a5
---
M E3Experiments.i18n.php
M E3Experiments.php
A i18n/ast.json
A i18n/de.json
A i18n/dsb.json
A i18n/en.json
A i18n/fr.json
A i18n/gl.json
A i18n/hsb.json
A i18n/it.json
A i18n/ko.json
A i18n/ksh.json
A i18n/mk.json
A i18n/nl.json
A i18n/qqq.json
A i18n/roa-tara.json
A i18n/tl.json
A i18n/vi.json
A i18n/zh-hans.json
19 files changed, 160 insertions(+), 121 deletions(-)

Approvals:
  Raimond Spekking: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/E3Experiments.i18n.php b/E3Experiments.i18n.php
index 674ffe5..eeb2776 100644
--- a/E3Experiments.i18n.php
+++ b/E3Experiments.i18n.php
@@ -1,127 +1,31 @@
 <?php
 /**
- * Internationalisation for E3Experiments extension
+ * This is a backwards-compatibility shim, generated by:
+ * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
  *
- * @file
- * @ingroup Extensions
+ * 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();
+$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'] );
+               }
 
-/** English
- */
-$messages['en'] = array(
-       'e3experiments-desc' => 'Editor Engagement Experiments Toolkit',
-);
-
-/** Message documentation (Message documentation)
- * @author Raymond
- */
-$messages['qqq'] = array(
-       'e3experiments-desc' => '{{desc|name=E3 
Experiments|url=https://www.mediawiki.org/wiki/Extension:E3_Experiments}}',
-);
-
-/** Asturian (asturianu)
- * @author Xuacu
- */
-$messages['ast'] = array(
-       'e3experiments-desc' => "Ferramientes de los Esperimentos de compromisu 
d'editores (E3)",
-);
-
-/** German (Deutsch)
- * @author Metalhead64
- */
-$messages['de'] = array(
-       'e3experiments-desc' => 'Werkzeuge für die „Editor Engagement 
Experiments“',
-);
-
-/** Lower Sorbian (dolnoserbski)
- * @author Michawiki
- */
-$messages['dsb'] = array(
-       'e3experiments-desc' => 'Rědy za Engagement Experiments',
-);
-
-/** French (français)
- * @author Gomoko
- */
-$messages['fr'] = array(
-       'e3experiments-desc' => 'Boîte à outils expérimentaux d’engagement de 
l’éditeur',
-);
-
-/** Galician (galego)
- * @author Toliño
- */
-$messages['gl'] = array(
-       'e3experiments-desc' => 'Xogo de ferramentas dos experimentos de 
compromiso dos editores',
-);
-
-/** Upper Sorbian (hornjoserbsce)
- * @author Michawiki
- */
-$messages['hsb'] = array(
-       'e3experiments-desc' => 'Nastroje za Engagement Experiments',
-);
-
-/** Italian (italiano)
- * @author Beta16
- */
-$messages['it'] = array(
-       'e3experiments-desc' => 'Strumenti per Editor Engagement Experiments',
-);
-
-/** Korean (한국어)
- * @author 아라
- */
-$messages['ko'] = array(
-       'e3experiments-desc' => '편집자 교전 실험 툴킷',
-);
-
-/** Colognian (Ripoarisch)
- * @author Purodha
- */
-$messages['ksh'] = array(
-       'e3experiments-desc' => 'Heh di ärkzüaschkeß brängg e Jeröß för de 
Metmaacher bei de <i 
lang="en">[https://www.mediawiki.org/wiki/Editor_Engagement_Experiments Editor 
Engagement Experiments]</i> för eijfach jät zom Ußprobeere ze livvere.',
-);
-
-/** Macedonian (македонски)
- * @author Bjankuloski06
- */
-$messages['mk'] = array(
-       'e3experiments-desc' => 'Алатник за привлекување на уредници',
-);
-
-/** Dutch (Nederlands)
- * @author Siebrand
- */
-$messages['nl'] = array(
-       'e3experiments-desc' => 'Raamwerk voor het Editor Engagement 
Experiments',
-);
-
-/** tarandíne (tarandíne)
- * @author Joetaras
- */
-$messages['roa-tara'] = array(
-       'e3experiments-desc' => 'Pacchette de struminde pe le Sperimende de 
cangiamende de le findanzaminde',
-);
-
-/** Tagalog (Tagalog)
- * @author AnakngAraw
- */
-$messages['tl'] = array(
-       'e3experiments-desc' => 'Kalipunan ng mga Kasangkapan na para sa mga 
Eksperimento na Pantawag-pansin ng Patnugot',
-);
-
-/** Vietnamese (Tiếng Việt)
- * @author Minh Nguyen
- */
-$messages['vi'] = array(
-       'e3experiments-desc' => 'Bộ công cụ Thí nghiệm Thu hút Người sửa đổi',
-);
-
-/** Simplified Chinese (中文(简体)‎)
- * @author Yfdyh000
- */
-$messages['zh-hans'] = array(
-       'e3experiments-desc' => '编者参与实验工具包',
-);
+               $cachedData['deps'][] = new FileDependency( $fileName );
+       }
+       return true;
+};
diff --git a/E3Experiments.php b/E3Experiments.php
index 36c31f1..f208718 100644
--- a/E3Experiments.php
+++ b/E3Experiments.php
@@ -19,6 +19,7 @@
 
 // Register files
 $wgAutoloadClasses[ 'E3ExperimentsHooks' ] = __DIR__ . 
'/E3Experiments.hooks.php';
+$wgMessagesDirs['E3Experiments'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles[ 'E3Experiments' ] = __DIR__ . 
'/E3Experiments.i18n.php';
 
 // Register APIs
diff --git a/i18n/ast.json b/i18n/ast.json
new file mode 100644
index 0000000..d0af786
--- /dev/null
+++ b/i18n/ast.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Xuacu"
+        ]
+    },
+    "e3experiments-desc": "Ferramientes de los Esperimentos de compromisu 
d'editores (E3)"
+}
\ No newline at end of file
diff --git a/i18n/de.json b/i18n/de.json
new file mode 100644
index 0000000..da3ea10
--- /dev/null
+++ b/i18n/de.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Metalhead64"
+        ]
+    },
+    "e3experiments-desc": "Werkzeuge für die „Editor Engagement Experiments“"
+}
\ No newline at end of file
diff --git a/i18n/dsb.json b/i18n/dsb.json
new file mode 100644
index 0000000..a5d1752
--- /dev/null
+++ b/i18n/dsb.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Michawiki"
+        ]
+    },
+    "e3experiments-desc": "Rědy za Engagement Experiments"
+}
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..4415a92
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,6 @@
+{
+    "@metadata": {
+        "authors": []
+    },
+    "e3experiments-desc": "Editor Engagement Experiments Toolkit"
+}
\ No newline at end of file
diff --git a/i18n/fr.json b/i18n/fr.json
new file mode 100644
index 0000000..0fcc6c9
--- /dev/null
+++ b/i18n/fr.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Gomoko"
+        ]
+    },
+    "e3experiments-desc": "Boîte à outils expérimentaux d’engagement de 
l’éditeur"
+}
\ No newline at end of file
diff --git a/i18n/gl.json b/i18n/gl.json
new file mode 100644
index 0000000..d94428d
--- /dev/null
+++ b/i18n/gl.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Toliño"
+        ]
+    },
+    "e3experiments-desc": "Xogo de ferramentas dos experimentos de compromiso 
dos editores"
+}
\ No newline at end of file
diff --git a/i18n/hsb.json b/i18n/hsb.json
new file mode 100644
index 0000000..8093781
--- /dev/null
+++ b/i18n/hsb.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Michawiki"
+        ]
+    },
+    "e3experiments-desc": "Nastroje za Engagement Experiments"
+}
\ No newline at end of file
diff --git a/i18n/it.json b/i18n/it.json
new file mode 100644
index 0000000..262b91d
--- /dev/null
+++ b/i18n/it.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Beta16"
+        ]
+    },
+    "e3experiments-desc": "Strumenti per Editor Engagement Experiments"
+}
\ No newline at end of file
diff --git a/i18n/ko.json b/i18n/ko.json
new file mode 100644
index 0000000..012ca93
--- /dev/null
+++ b/i18n/ko.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "아라"
+        ]
+    },
+    "e3experiments-desc": "편집자 교전 실험 툴킷"
+}
\ No newline at end of file
diff --git a/i18n/ksh.json b/i18n/ksh.json
new file mode 100644
index 0000000..dcbf55e
--- /dev/null
+++ b/i18n/ksh.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Purodha"
+        ]
+    },
+    "e3experiments-desc": "Heh di ärkzüaschkeß brängg e Jeröß för de 
Metmaacher bei de <i 
lang=\"en\">[https://www.mediawiki.org/wiki/Editor_Engagement_Experiments 
Editor Engagement Experiments]</i> för eijfach jät zom Ußprobeere ze livvere."
+}
\ No newline at end of file
diff --git a/i18n/mk.json b/i18n/mk.json
new file mode 100644
index 0000000..e0f60e5
--- /dev/null
+++ b/i18n/mk.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Bjankuloski06"
+        ]
+    },
+    "e3experiments-desc": "Алатник за привлекување на уредници"
+}
\ No newline at end of file
diff --git a/i18n/nl.json b/i18n/nl.json
new file mode 100644
index 0000000..a03175b
--- /dev/null
+++ b/i18n/nl.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Siebrand"
+        ]
+    },
+    "e3experiments-desc": "Raamwerk voor het Editor Engagement Experiments"
+}
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..1af3d08
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Raymond"
+        ]
+    },
+    "e3experiments-desc": "{{desc|name=E3 
Experiments|url=https://www.mediawiki.org/wiki/Extension:E3_Experiments}}";
+}
\ No newline at end of file
diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json
new file mode 100644
index 0000000..f044784
--- /dev/null
+++ b/i18n/roa-tara.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Joetaras"
+        ]
+    },
+    "e3experiments-desc": "Pacchette de struminde pe le Sperimende de 
cangiamende de le findanzaminde"
+}
\ No newline at end of file
diff --git a/i18n/tl.json b/i18n/tl.json
new file mode 100644
index 0000000..0e632f3
--- /dev/null
+++ b/i18n/tl.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "AnakngAraw"
+        ]
+    },
+    "e3experiments-desc": "Kalipunan ng mga Kasangkapan na para sa mga 
Eksperimento na Pantawag-pansin ng Patnugot"
+}
\ No newline at end of file
diff --git a/i18n/vi.json b/i18n/vi.json
new file mode 100644
index 0000000..4147def
--- /dev/null
+++ b/i18n/vi.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Minh Nguyen"
+        ]
+    },
+    "e3experiments-desc": "Bộ công cụ Thí nghiệm Thu hút Người sửa đổi"
+}
\ No newline at end of file
diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json
new file mode 100644
index 0000000..03a8b02
--- /dev/null
+++ b/i18n/zh-hans.json
@@ -0,0 +1,8 @@
+{
+    "@metadata": {
+        "authors": [
+            "Yfdyh000"
+        ]
+    },
+    "e3experiments-desc": "编者参与实验工具包"
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf6cef837c4fa1921918382c4176047221fa42a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/E3Experiments
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Raimond Spekking <raimond.spekk...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to