Siebrand has uploaded a new change for review.

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

Change subject: Complete migration to JSON i18n
......................................................................

Complete migration to JSON i18n

In the first pass, one group hadn't been migrated.

Change-Id: If5ca30c5fd95c9f54140d73e66c4758511d289c2
---
M GlobalUserGroups.i18n.php
M GlobalUserGroups.php
R i18n/core/ast.json
R i18n/core/be-tarask.json
R i18n/core/da.json
R i18n/core/de.json
R i18n/core/dsb.json
R i18n/core/en.json
R i18n/core/es.json
R i18n/core/fa.json
R i18n/core/fr.json
R i18n/core/gl.json
R i18n/core/he.json
R i18n/core/hsb.json
R i18n/core/ia.json
R i18n/core/id.json
R i18n/core/ilo.json
R i18n/core/it.json
R i18n/core/ja.json
R i18n/core/ko.json
R i18n/core/ksh.json
R i18n/core/lb.json
R i18n/core/mk.json
R i18n/core/ms.json
R i18n/core/mt.json
R i18n/core/nb.json
R i18n/core/nl.json
R i18n/core/pl.json
R i18n/core/pms.json
R i18n/core/pt-br.json
R i18n/core/qqq.json
R i18n/core/roa-tara.json
R i18n/core/ru.json
R i18n/core/sv.json
R i18n/core/tl.json
R i18n/core/uk.json
R i18n/core/zh-hans.json
R i18n/core/zh-hant.json
38 files changed, 7 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserGroups 
refs/changes/72/123572/1

diff --git a/GlobalUserGroups.i18n.php b/GlobalUserGroups.i18n.php
index eeb2776..004e300 100644
--- a/GlobalUserGroups.i18n.php
+++ b/GlobalUserGroups.i18n.php
@@ -14,7 +14,7 @@
 $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, 
&$cachedData ) {
        $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
        foreach ( $codeSequence as $csCode ) {
-               $fileName = __DIR__ . "/i18n/$csCode.json";
+               $fileName = __DIR__ . "/i18n/core/$csCode.json";
                if ( is_readable( $fileName ) ) {
                        $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                        foreach ( array_keys( $data ) as $key ) {
diff --git a/GlobalUserGroups.php b/GlobalUserGroups.php
index d874ca2..ce745ba 100644
--- a/GlobalUserGroups.php
+++ b/GlobalUserGroups.php
@@ -23,16 +23,15 @@
        'url' => 'https://www.mediawiki.org/wiki/Extension:GlobalUserGroups',
        'author' => 'Tim Weyer',
        'descriptionmsg' => 'globalusergroups-desc',
-       'version' => '1.1.0',
+       'version' => '1.1.1',
 );
 
 // Use extra translations for various user group names
 $wgGlobalUserGroupsUseEMWT = true;
 
 // Translations
-$dir = dirname( __FILE__ ) . '/';
-$wgMessagesDirs['GlobalUserGroups'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['GlobalUserGroups'] = $dir . 
'GlobalUserGroups.i18n.php';
+$wgMessagesDirs['GlobalUserGroups'] = __DIR__ . '/i18n/core';
+$wgExtensionMessagesFiles['GlobalUserGroups'] = __DIR__ . 
'/GlobalUserGroups.i18n.php';
 
 // Hooks
 $wgHooks['UserRights'][] = 'efManageGlobalUserGroups';
@@ -89,11 +88,10 @@
 }
 
 function efGlobalUserGroupsEMWT() {
-       global $wgGlobalUserGroupsUseEMWT, $wgExtensionMessagesFiles;
-
-       $dir = dirname( __FILE__ ) . '/';
+       global $wgGlobalUserGroupsUseEMWT, $wgExtensionMessagesFiles, 
$wgMessagesDirs;
 
        if ( $wgGlobalUserGroupsUseEMWT ) {
-               $wgExtensionMessagesFiles['GlobalUserGroupsExtras'] = $dir . 
'GlobalUserGroups.i18n.groups.php';
+               $wgMessagesDirs['GlobalUserGroupsExtras'] = __DIR__ . 
'/i18n/groups';
+               $wgExtensionMessagesFiles['GlobalUserGroupsExtras'] = __DIR__ . 
'/GlobalUserGroups.i18n.groups.php';
        }
 }
diff --git a/i18n/ast.json b/i18n/core/ast.json
similarity index 100%
rename from i18n/ast.json
rename to i18n/core/ast.json
diff --git a/i18n/be-tarask.json b/i18n/core/be-tarask.json
similarity index 100%
rename from i18n/be-tarask.json
rename to i18n/core/be-tarask.json
diff --git a/i18n/da.json b/i18n/core/da.json
similarity index 100%
rename from i18n/da.json
rename to i18n/core/da.json
diff --git a/i18n/de.json b/i18n/core/de.json
similarity index 100%
rename from i18n/de.json
rename to i18n/core/de.json
diff --git a/i18n/dsb.json b/i18n/core/dsb.json
similarity index 100%
rename from i18n/dsb.json
rename to i18n/core/dsb.json
diff --git a/i18n/en.json b/i18n/core/en.json
similarity index 100%
rename from i18n/en.json
rename to i18n/core/en.json
diff --git a/i18n/es.json b/i18n/core/es.json
similarity index 100%
rename from i18n/es.json
rename to i18n/core/es.json
diff --git a/i18n/fa.json b/i18n/core/fa.json
similarity index 100%
rename from i18n/fa.json
rename to i18n/core/fa.json
diff --git a/i18n/fr.json b/i18n/core/fr.json
similarity index 100%
rename from i18n/fr.json
rename to i18n/core/fr.json
diff --git a/i18n/gl.json b/i18n/core/gl.json
similarity index 100%
rename from i18n/gl.json
rename to i18n/core/gl.json
diff --git a/i18n/he.json b/i18n/core/he.json
similarity index 100%
rename from i18n/he.json
rename to i18n/core/he.json
diff --git a/i18n/hsb.json b/i18n/core/hsb.json
similarity index 100%
rename from i18n/hsb.json
rename to i18n/core/hsb.json
diff --git a/i18n/ia.json b/i18n/core/ia.json
similarity index 100%
rename from i18n/ia.json
rename to i18n/core/ia.json
diff --git a/i18n/id.json b/i18n/core/id.json
similarity index 100%
rename from i18n/id.json
rename to i18n/core/id.json
diff --git a/i18n/ilo.json b/i18n/core/ilo.json
similarity index 100%
rename from i18n/ilo.json
rename to i18n/core/ilo.json
diff --git a/i18n/it.json b/i18n/core/it.json
similarity index 100%
rename from i18n/it.json
rename to i18n/core/it.json
diff --git a/i18n/ja.json b/i18n/core/ja.json
similarity index 100%
rename from i18n/ja.json
rename to i18n/core/ja.json
diff --git a/i18n/ko.json b/i18n/core/ko.json
similarity index 100%
rename from i18n/ko.json
rename to i18n/core/ko.json
diff --git a/i18n/ksh.json b/i18n/core/ksh.json
similarity index 100%
rename from i18n/ksh.json
rename to i18n/core/ksh.json
diff --git a/i18n/lb.json b/i18n/core/lb.json
similarity index 100%
rename from i18n/lb.json
rename to i18n/core/lb.json
diff --git a/i18n/mk.json b/i18n/core/mk.json
similarity index 100%
rename from i18n/mk.json
rename to i18n/core/mk.json
diff --git a/i18n/ms.json b/i18n/core/ms.json
similarity index 100%
rename from i18n/ms.json
rename to i18n/core/ms.json
diff --git a/i18n/mt.json b/i18n/core/mt.json
similarity index 100%
rename from i18n/mt.json
rename to i18n/core/mt.json
diff --git a/i18n/nb.json b/i18n/core/nb.json
similarity index 100%
rename from i18n/nb.json
rename to i18n/core/nb.json
diff --git a/i18n/nl.json b/i18n/core/nl.json
similarity index 100%
rename from i18n/nl.json
rename to i18n/core/nl.json
diff --git a/i18n/pl.json b/i18n/core/pl.json
similarity index 100%
rename from i18n/pl.json
rename to i18n/core/pl.json
diff --git a/i18n/pms.json b/i18n/core/pms.json
similarity index 100%
rename from i18n/pms.json
rename to i18n/core/pms.json
diff --git a/i18n/pt-br.json b/i18n/core/pt-br.json
similarity index 100%
rename from i18n/pt-br.json
rename to i18n/core/pt-br.json
diff --git a/i18n/qqq.json b/i18n/core/qqq.json
similarity index 100%
rename from i18n/qqq.json
rename to i18n/core/qqq.json
diff --git a/i18n/roa-tara.json b/i18n/core/roa-tara.json
similarity index 100%
rename from i18n/roa-tara.json
rename to i18n/core/roa-tara.json
diff --git a/i18n/ru.json b/i18n/core/ru.json
similarity index 100%
rename from i18n/ru.json
rename to i18n/core/ru.json
diff --git a/i18n/sv.json b/i18n/core/sv.json
similarity index 100%
rename from i18n/sv.json
rename to i18n/core/sv.json
diff --git a/i18n/tl.json b/i18n/core/tl.json
similarity index 100%
rename from i18n/tl.json
rename to i18n/core/tl.json
diff --git a/i18n/uk.json b/i18n/core/uk.json
similarity index 100%
rename from i18n/uk.json
rename to i18n/core/uk.json
diff --git a/i18n/zh-hans.json b/i18n/core/zh-hans.json
similarity index 100%
rename from i18n/zh-hans.json
rename to i18n/core/zh-hans.json
diff --git a/i18n/zh-hant.json b/i18n/core/zh-hant.json
similarity index 100%
rename from i18n/zh-hant.json
rename to i18n/core/zh-hant.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5ca30c5fd95c9f54140d73e66c4758511d289c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserGroups
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to