Robert Vogel has submitted this change and it was merged.

Change subject: Implemented changes for translatewiki
......................................................................


Implemented changes for translatewiki

Moved php i18n files into languages folder
Moved to Json i18n files
Fixed Typo

Change-Id: Id8a5ebd928b96f66199ecb992b4a2ff4debac2df
---
D NamespaceCss/NamespaceCss.i18n.php
M NamespaceCss/NamespaceCss.setup.php
A NamespaceCss/i18n/de.json
A NamespaceCss/i18n/en.json
A NamespaceCss/i18n/qqq.json
A NamespaceCss/languages/NamespaceCss.i18n.php
6 files changed, 63 insertions(+), 34 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve



diff --git a/NamespaceCss/NamespaceCss.i18n.php 
b/NamespaceCss/NamespaceCss.i18n.php
deleted file mode 100644
index 2fc15b0..0000000
--- a/NamespaceCss/NamespaceCss.i18n.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * Internationalisation file for PagesVisited
- *
- * Part of BlueSpice for MediaWiki
- *
- * @author     Stephan Muggli <[email protected]>
-
- * @package    BlueSpice_Extensions
- * @subpackage PagesVisited
- * @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['en'] = array(
-       'bs-namespacecss-extension-description' => 'NameSpace SkinSwitch.',
-       'prefs-NamespaceCss'                    => 'NameSpace SkinSwitch',
-       'bs-namespacecss-pref-Use_NSC'          => 'Use NameSpace SkinSwitch?',
-);
-
-$messages['de'] = array(
-       'bs-namespacecss-extension-description' => 'Namensraum Skinweiche.',
-       'prefs-NamespaceCss'                    => 'Namensraum Skinweiche',
-       'bs-namespacecss-pref-Use_NSC'          => 'Namensraum Skinweiche 
aktivieren?',
-);
-
-$messages['de-formal'] = array();
-
-$messages['qqq'] = array();
\ No newline at end of file
diff --git a/NamespaceCss/NamespaceCss.setup.php 
b/NamespaceCss/NamespaceCss.setup.php
index 1568e89..6c8c9e6 100644
--- a/NamespaceCss/NamespaceCss.setup.php
+++ b/NamespaceCss/NamespaceCss.setup.php
@@ -1,5 +1,7 @@
 <?php
 
-BsExtensionManager::registerExtension('NamespaceCss', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE);
+BsExtensionManager::registerExtension( 'NamespaceCss', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE );
 
-$wgExtensionMessagesFiles['NamespaceCss'] = __DIR__ . '/NamespaceCss.i18n.php';
\ No newline at end of file
+$wgMessagesDirs['NamespaceCss'] = __DIR__ . '/i18n';
+
+$wgExtensionMessagesFiles['NamespaceCss'] = __DIR__ . 
'/languages/NamespaceCss.i18n.php';
\ No newline at end of file
diff --git a/NamespaceCss/i18n/de.json b/NamespaceCss/i18n/de.json
new file mode 100644
index 0000000..b05818d
--- /dev/null
+++ b/NamespaceCss/i18n/de.json
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Stephan Muggli <[email protected]>"
+               ]
+       },
+       "bs-namespacecss-desc": "Namensraum spezifisches Aussehen"
+}
diff --git a/NamespaceCss/i18n/en.json b/NamespaceCss/i18n/en.json
new file mode 100644
index 0000000..c16e218
--- /dev/null
+++ b/NamespaceCss/i18n/en.json
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Stephan Muggli <[email protected]>"
+               ]
+       },
+       "bs-namespacecss-desc": "Namespace specific styling"
+}
diff --git a/NamespaceCss/i18n/qqq.json b/NamespaceCss/i18n/qqq.json
new file mode 100644
index 0000000..4bc18df
--- /dev/null
+++ b/NamespaceCss/i18n/qqq.json
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Stephan Muggli <[email protected]>"
+               ]
+       },
+       "bs-namespacecss-desc": "Used in 
[[Special:Wiki_Admin&mode=ExtensionInfo]], description of namespace css 
extension"
+}
diff --git a/NamespaceCss/languages/NamespaceCss.i18n.php 
b/NamespaceCss/languages/NamespaceCss.i18n.php
new file mode 100644
index 0000000..61f480f
--- /dev/null
+++ b/NamespaceCss/languages/NamespaceCss.i18n.php
@@ -0,0 +1,35 @@
+<?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( 'wfJsonI18nShim7d1g51281835fe92a' ) ) {
+       function wfJsonI18nShim7d1g51281835fe92a( $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'][] = 
'wfJsonI18nShim7d1g51281835fe92a';
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8a5ebd928b96f66199ecb992b4a2ff4debac2df
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pigpen <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>

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

Reply via email to