Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/122704
Change subject: Migrate to JSON i18n ...................................................................... Migrate to JSON i18n Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: Ie0e7f9f1a8732e6c59775aae4fc8f4954c32ebc1 --- M MSSQLBackCompat.i18n.php M MSSQLBackCompat.php A i18n/ast.json A i18n/de.json A i18n/en.json A i18n/es.json A i18n/fa.json A i18n/fr.json A i18n/gl.json A i18n/ja.json A i18n/ko.json A i18n/mk.json A i18n/nl.json A i18n/qqq.json A i18n/roa-tara.json A i18n/ru.json A i18n/sl.json A i18n/uk.json A i18n/zh-hans.json A i18n/zh-hant.json 20 files changed, 173 insertions(+), 129 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MSSQLBackCompat refs/changes/04/122704/1 diff --git a/MSSQLBackCompat.i18n.php b/MSSQLBackCompat.i18n.php index 3f786c4..eeb2776 100644 --- a/MSSQLBackCompat.i18n.php +++ b/MSSQLBackCompat.i18n.php @@ -1,133 +1,31 @@ <?php - -// Internationalisation file for MSSQLBackCompat extension. - -$messages = array(); - /** - * English - * @author Sam Reed + * 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['en'] = array( - 'mssqlbackcompat-desc' => 'Back compat hack for those that need non core MSSQL support (SMW, ED or something)', -); +$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'] ); + } -/** Message documentation (Message documentation) - * @author Raymond - * @author Shirayuki - */ -$messages['qqq'] = array( - 'mssqlbackcompat-desc' => '{{desc|name=MSSQL Back Compat|url=http://www.mediawiki.org/wiki/Extension:MSSQLBackCompat}}', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'mssqlbackcompat-desc' => '«Hack» de compatibilidá con versiones anteriores pa los que necesiten sofitu secundariu de MSSQL (SMW, ED o daqué asemeyao)', -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'mssqlbackcompat-desc' => 'Back-Compat-Hack für diejenigen, die einen Nicht-Core-MSSQL-Support benötigen (SMW, ED etc.)', -); - -/** Spanish (español) - * @author Fitoschido - */ -$messages['es'] = array( - 'mssqlbackcompat-desc' => "«Hack» de retrocompatibilidad para quienes necesitan compatibilidad ''non-core'' con MSSQL (SMW, ED o algo así)", -); - -/** Persian (فارسی) - * @author Ebraminio - */ -$messages['fa'] = array( - 'mssqlbackcompat-desc' => 'هک پشتیبانی عقبرو برای آنهای که نیاز به پشتیبانی غیر موجود در هسته MSSQL دارند (SMW، ED یا چیز دیگری)', -); - -/** French (français) - * @author Gomoko - */ -$messages['fr'] = array( - 'mssqlbackcompat-desc' => 'Verrue de rétro-compatibilité pour ceux ayant besoin de support de MSSQL hors noyau (SMW, ED ou autres)', -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'mssqlbackcompat-desc' => 'Arranxo de compatibilidade con versións anteriores para aqueles que necesitan soporte MSSQL secundario (SMW, ED ou outro)', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'mssqlbackcompat-desc' => 'MSSQL 対応が必要な拡張機能 (SMQ、ED、など) 用の後方互換性ハック', -); - -/** Korean (한국어) - * @author Priviet - */ -$messages['ko'] = array( - 'mssqlbackcompat-desc' => '비 코어 MSSQL 지원이 필요 없는 확장 기능을 위한 후방 호환성 해킹', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'mssqlbackcompat-desc' => 'Прилагодување за оние што имаат потреба од нејадрена поддршка за MSSQL (SMW, ED и сл.)', -); - -/** Dutch (Nederlands) - * @author Siebrand - */ -$messages['nl'] = array( - 'mssqlbackcompat-desc' => 'Ondersteuning voor niet-coregebruik van MSSQL (Semantic MediaWiki, ExternalData en dergelijke)', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'mssqlbackcompat-desc' => "Tuèrne a l'ause combatte pe chiste ca non g'onne abbesògne d'u supporte de MSSQL (SMW, ED o otre)", -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'mssqlbackcompat-desc' => 'Хак обратной совместимости для тех, кому нужна непрофильная поддержка MSSQL (SMW, ED или что-то подобное)', -); - -/** Slovenian (slovenščina) - * @author Eleassar - */ -$messages['sl'] = array( - 'mssqlbackcompat-desc' => 'Povratno združljiva rešitev za tiste, ki potrebuje nejedrno podporo MSSQL (SMW, ED ali podobno)', -); - -/** Ukrainian (українська) - * @author Andriykopanytsia - */ -$messages['uk'] = array( - 'mssqlbackcompat-desc' => 'Хак зворотньої сумісності для тих, кому потрібна підтримка не ядра MSSQL (SMW, ED чи щось інше)', -); - -/** Simplified Chinese (中文(简体)) - * @author Liuxinyu970226 - */ -$messages['zh-hans'] = array( - 'mssqlbackcompat-desc' => '为那些需要非核心MSSQL支持的程序(SMW、ED或其他一些)而向下兼容', -); - -/** Traditional Chinese (中文(繁體)) - * @author Liuxinyu970226 - */ -$messages['zh-hant'] = array( - 'mssqlbackcompat-desc' => '為需要非核心MSSQL兼容程式『SMW、ED或其他』而向後兼容', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/MSSQLBackCompat.php b/MSSQLBackCompat.php index f1e21ab..2fbfb94 100644 --- a/MSSQLBackCompat.php +++ b/MSSQLBackCompat.php @@ -9,6 +9,7 @@ ); $dir = dirname( __FILE__ ) . '/'; +$wgMessagesDirs['MSSQLBackCompat'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['MSSQLBackCompat'] = $dir . 'MSSQLBackCompat.i18n.php'; $wgAutoloadClasses['DatabaseMssqlold'] = $dir . 'DatabaseMssqlOld.php'; $wgAutoloadClasses['MSSQLOldField'] = $dir . 'DatabaseMssqlOld.php'; diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..d2a5af5 --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "mssqlbackcompat-desc": "«Hack» de compatibilidá con versiones anteriores pa los que necesiten sofitu secundariu de MSSQL (SMW, ED o daqué asemeyao)" +} \ No newline at end of file diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..3ef6c71 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Metalhead64" + ] + }, + "mssqlbackcompat-desc": "Back-Compat-Hack für diejenigen, die einen Nicht-Core-MSSQL-Support benötigen (SMW, ED etc.)" +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..aac915d --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Sam Reed" + ] + }, + "mssqlbackcompat-desc": "Back compat hack for those that need non core MSSQL support (SMW, ED or something)" +} \ No newline at end of file diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..d4b8894 --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Fitoschido" + ] + }, + "mssqlbackcompat-desc": "«Hack» de retrocompatibilidad para quienes necesitan compatibilidad ''non-core'' con MSSQL (SMW, ED o algo así)" +} \ No newline at end of file diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..52a0d93 --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Ebraminio" + ] + }, + "mssqlbackcompat-desc": "هک پشتیبانی عقبرو برای آنهای که نیاز به پشتیبانی غیر موجود در هسته MSSQL دارند (SMW، ED یا چیز دیگری)" +} \ No newline at end of file diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..355ffa6 --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gomoko" + ] + }, + "mssqlbackcompat-desc": "Verrue de rétro-compatibilité pour ceux ayant besoin de support de MSSQL hors noyau (SMW, ED ou autres)" +} \ No newline at end of file diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..fa83b2a --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "mssqlbackcompat-desc": "Arranxo de compatibilidade con versións anteriores para aqueles que necesitan soporte MSSQL secundario (SMW, ED ou outro)" +} \ No newline at end of file diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..d13c122 --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "mssqlbackcompat-desc": "MSSQL 対応が必要な拡張機能 (SMQ、ED、など) 用の後方互換性ハック" +} \ No newline at end of file diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..816e6bc --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Priviet" + ] + }, + "mssqlbackcompat-desc": "비 코어 MSSQL 지원이 필요 없는 확장 기능을 위한 후방 호환성 해킹" +} \ No newline at end of file diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..0e05bed --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "mssqlbackcompat-desc": "Прилагодување за оние што имаат потреба од нејадрена поддршка за MSSQL (SMW, ED и сл.)" +} \ No newline at end of file diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..a233e52 --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Siebrand" + ] + }, + "mssqlbackcompat-desc": "Ondersteuning voor niet-coregebruik van MSSQL (Semantic MediaWiki, ExternalData en dergelijke)" +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..6e4feb5 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Raymond", + "Shirayuki" + ] + }, + "mssqlbackcompat-desc": "{{desc|name=MSSQL Back Compat|url=http://www.mediawiki.org/wiki/Extension:MSSQLBackCompat}}" +} \ No newline at end of file diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..f92dd5e --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "mssqlbackcompat-desc": "Tuèrne a l'ause combatte pe chiste ca non g'onne abbesògne d'u supporte de MSSQL (SMW, ED o otre)" +} \ No newline at end of file diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..aa1b594 --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "mssqlbackcompat-desc": "Хак обратной совместимости для тех, кому нужна непрофильная поддержка MSSQL (SMW, ED или что-то подобное)" +} \ No newline at end of file diff --git a/i18n/sl.json b/i18n/sl.json new file mode 100644 index 0000000..b3ce238 --- /dev/null +++ b/i18n/sl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Eleassar" + ] + }, + "mssqlbackcompat-desc": "Povratno združljiva rešitev za tiste, ki potrebuje nejedrno podporo MSSQL (SMW, ED ali podobno)" +} \ No newline at end of file diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..84b1866 --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Andriykopanytsia" + ] + }, + "mssqlbackcompat-desc": "Хак зворотньої сумісності для тих, кому потрібна підтримка не ядра MSSQL (SMW, ED чи щось інше)" +} \ No newline at end of file diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..86a03f5 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Liuxinyu970226" + ] + }, + "mssqlbackcompat-desc": "为那些需要非核心MSSQL支持的程序(SMW、ED或其他一些)而向下兼容" +} \ No newline at end of file diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json new file mode 100644 index 0000000..c54a574 --- /dev/null +++ b/i18n/zh-hant.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Liuxinyu970226" + ] + }, + "mssqlbackcompat-desc": "為需要非核心MSSQL兼容程式『SMW、ED或其他』而向後兼容" +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0e7f9f1a8732e6c59775aae4fc8f4954c32ebc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MSSQLBackCompat Gerrit-Branch: master Gerrit-Owner: Siebrand <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
