Migrate to JSON i18n

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

Change-Id: Ie40ebdfcebeb6f590a75b08b358efbbcf1e85f78
This commit is contained in:
Siebrand Mazeland 2014-04-02 19:11:05 +02:00
parent d15f83358b
commit 0cef69bf17
35 changed files with 301 additions and 245 deletions

View file

@ -1,243 +1,31 @@
<?php
/**
* Internationalisation for Tabber 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
* @author Eric Fortin
*/
$messages['en'] = array(
'tabber-desc' => 'Allows to create tabs within a page',
);
/** Message documentation (Message documentation)
* @author Shirayuki
*/
$messages['qqq'] = array(
'tabber-desc' => '{{desc|name=Tabber|url=http://www.mediawiki.org/wiki/Extension:Tabber}}',
);
/** Asturian (asturianu)
* @author Xuacu
*/
$messages['ast'] = array(
'tabber-desc' => "Permite crear llingüetes dientro d'una páxina",
);
/** Belarusian (Taraškievica orthography) (беларуская (тарашкевіца))
* @author Wizardist
*/
$messages['be-tarask'] = array(
'tabber-desc' => 'Дазваляе ствараць закладкі на старонцы',
);
/** Bulgarian (български)
* @author DCLXVI
*/
$messages['bg'] = array(
'tabber-desc' => 'Позволява създаването на табове в страниците',
);
/** Breton (brezhoneg)
* @author Y-M D
*/
$messages['br'] = array(
'tabber-desc' => 'Aotreañ a ra krouiñ ivinelloù war ur bajenn',
);
/** Catalan (català)
* @author BroOk
*/
$messages['ca'] = array(
'tabber-desc' => 'Permet crear tabs dins una pàgina',
);
/** German (Deutsch)
* @author Kghbln
*/
$messages['de'] = array(
'tabber-desc' => 'Ermöglicht das Erstellen von Reitern innerhalb einer Seite',
);
/** Lower Sorbian (dolnoserbski)
* @author Michawiki
*/
$messages['dsb'] = array(
'tabber-desc' => 'Zmóžnja rejtarki w boku napóraś',
);
/** Spanish (español)
* @author Armando-Martin
*/
$messages['es'] = array(
'tabber-desc' => 'Permite para fichas dentro de una página',
);
/** Persian (فارسی)
* @author Armin1392
*/
$messages['fa'] = array(
'tabber-desc' => 'اجازه برای ایجاد تب‌ها درون یک صفحه',
);
/** Finnish (suomi)
* @author Nedergard
* @author Nike
*/
$messages['fi'] = array(
'tabber-desc' => 'Mahdollistaa välilehtien luonnin sivulla',
);
/** French (français)
* @author Wyz
*/
$messages['fr'] = array(
'tabber-desc' => 'Permet de créer des onglets sur une page',
);
/** Galician (galego)
* @author Toliño
*/
$messages['gl'] = array(
'tabber-desc' => 'Permite a creación de lapelas dentro dunha páxina',
);
/** Hebrew (עברית)
* @author Amire80
*/
$messages['he'] = array(
'tabber-desc' => 'אפשרות ליצור לשוניות בדף',
);
/** Upper Sorbian (hornjoserbsce)
* @author Michawiki
*/
$messages['hsb'] = array(
'tabber-desc' => 'Zmóžnja rajtarki znutřka strony wutworić',
);
/** Italian (italiano)
* @author Darth Kule
*/
$messages['it'] = array(
'tabber-desc' => "Permette di creare schede all'interno di una pagina",
);
/** Japanese (日本語)
* @author Shirayuki
*/
$messages['ja'] = array(
'tabber-desc' => 'ページ内にタブを作成できるようにする',
);
/** Korean (한국어)
* @author 아라
*/
$messages['ko'] = array(
'tabber-desc' => '문서 내에서 탭 만들기 허용',
);
/** Colognian (Ripoarisch)
* @author Purodha
*/
$messages['ksh'] = array(
'tabber-desc' => 'Määd et müjjelesch, en Sigge Tabs erin ze maache.', # Fuzzy
);
/** Macedonian (македонски)
* @author Bjankuloski06
*/
$messages['mk'] = array(
'tabber-desc' => 'Овозможува создавање на јазичиња во рамките на една страница',
);
/** Dutch (Nederlands)
* @author SPQRobin
*/
$messages['nl'] = array(
'tabber-desc' => 'Maakt het mogelijk om tabbladen binnen een pagina te maken',
);
/** Polish (polski)
* @author BeginaFelicysym
*/
$messages['pl'] = array(
'tabber-desc' => 'Pozwala na tworzenie zakładek na stronie',
);
/** Piedmontese (Piemontèis)
* @author Borichèt
* @author Dragonòt
*/
$messages['pms'] = array(
'tabber-desc' => 'A përmët ëd creé dle schede drinta a na pàgina',
);
/** Brazilian Portuguese (português do Brasil)
* @author Cainamarques
*/
$messages['pt-br'] = array(
'tabber-desc' => 'Permite a criação de abas dentro de uma página',
);
/** tarandíne (tarandíne)
* @author Joetaras
*/
$messages['roa-tara'] = array(
'tabber-desc' => "Permette de ccrejà le schede jndr'à 'na pàgene",
);
/** Russian (русский)
* @author Lockal
*/
$messages['ru'] = array(
'tabber-desc' => 'Позволяет создавать вкладки внутри страницы',
);
/** Sinhala (සිංහල)
* @author පසිඳු කාවින්ද
*/
$messages['si'] = array(
'tabber-desc' => 'පිටු අතර ටැබයන් තැනීමට ඉඩ දෙයි',
);
/** Swedish (svenska)
* @author WikiPhoenix
*/
$messages['sv'] = array(
'tabber-desc' => 'Gör det möjligt att skapa flikar på en sida',
);
/** Tagalog (Tagalog)
* @author AnakngAraw
*/
$messages['tl'] = array(
'tabber-desc' => 'Nagpapahintulot upang makalikha ng mga laylay sa loob ng isang pahina',
);
/** Ukrainian (українська)
* @author Ата
*/
$messages['uk'] = array(
'tabber-desc' => 'Дозволяє створювати вкладки всередині сторінки',
);
/** Simplified Chinese (中文(简体)‎)
* @author Xiaomingyan
* @author Yfdyh000
*/
$messages['zh-hans'] = array(
'tabber-desc' => '允许在页面内创建标签页',
);
/** Traditional Chinese (中文(繁體)‎)
* @author Justincheng12345
*/
$messages['zh-hant'] = array(
'tabber-desc' => '容許於頁面內創建分頁',
);
$cachedData['deps'][] = new FileDependency( $fileName );
}
return true;
};

View file

@ -9,11 +9,12 @@ $wgExtensionCredits['parserhook'][] = array(
'author' => 'Eric Fortin',
'url' => 'https://www.mediawiki.org/wiki/Extension:Tabber',
'descriptionmsg' => 'tabber-desc',
'version' => '1.2'
'version' => '1.3.0'
);
$dir = dirname(__FILE__) . '/';
# Internationalisation file
$wgMessagesDirs['Tabber'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['Tabber'] = $dir . 'Tabber.i18n.php';
$wgExtensionFunctions[] = "wfTabber";
@ -27,17 +28,17 @@ function wfTabber() {
function renderTabber( $paramstring, $params = array() ){
global $wgParser, $wgScriptPath;
$wgParser->disableCache();
$path = $wgScriptPath . '/extensions/Tabber/';
$htmlHeader = '<script type="text/javascript" src="'.$path.'Tabber.js"></script>'
. '<link rel="stylesheet" href="'.$path.'Tabber.css" TYPE="text/css" MEDIA="screen">'
. '<div class="tabber">';
$htmlFooter = '</div>';
$htmlTabs = '';
$arr = explode("|-|", $paramstring);
foreach($arr as $tab){
$htmlTabs .= buildTab($tab);
@ -48,13 +49,13 @@ function renderTabber( $paramstring, $params = array() ){
function buildTab($tab){
global $wgParser;
if( trim($tab) == '' ) return '';
$arr = preg_split("/=/",$tab);
$tabName = array_shift( $arr );
$tabBody = $wgParser->recursiveTagParse( implode("=",$arr) );
$tab = '<div class="tabbertab" title="'.htmlspecialchars($tabName).'">'
. '<p>'.$tabBody.'</p>'
. '</div>';

8
i18n/ast.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Xuacu"
]
},
"tabber-desc": "Permite crear llingüetes dientro d'una páxina"
}

8
i18n/be-tarask.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Wizardist"
]
},
"tabber-desc": "Дазваляе ствараць закладкі на старонцы"
}

8
i18n/bg.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"DCLXVI"
]
},
"tabber-desc": "Позволява създаването на табове в страниците"
}

8
i18n/br.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Y-M D"
]
},
"tabber-desc": "Aotreañ a ra krouiñ ivinelloù war ur bajenn"
}

8
i18n/ca.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"BroOk"
]
},
"tabber-desc": "Permet crear tabs dins una pàgina"
}

8
i18n/de.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Kghbln"
]
},
"tabber-desc": "Ermöglicht das Erstellen von Reitern innerhalb einer Seite"
}

8
i18n/dsb.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Michawiki"
]
},
"tabber-desc": "Zmóžnja rejtarki w boku napóraś"
}

8
i18n/en.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Eric Fortin"
]
},
"tabber-desc": "Allows to create tabs within a page"
}

8
i18n/es.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Armando-Martin"
]
},
"tabber-desc": "Permite para fichas dentro de una página"
}

8
i18n/fa.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Armin1392"
]
},
"tabber-desc": "اجازه برای ایجاد تب‌ها درون یک صفحه"
}

9
i18n/fi.json Normal file
View file

@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Nedergard",
"Nike"
]
},
"tabber-desc": "Mahdollistaa välilehtien luonnin sivulla"
}

8
i18n/fr.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Wyz"
]
},
"tabber-desc": "Permet de créer des onglets sur une page"
}

8
i18n/gl.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Toliño"
]
},
"tabber-desc": "Permite a creación de lapelas dentro dunha páxina"
}

8
i18n/he.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Amire80"
]
},
"tabber-desc": "אפשרות ליצור לשוניות בדף"
}

8
i18n/hsb.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Michawiki"
]
},
"tabber-desc": "Zmóžnja rajtarki znutřka strony wutworić"
}

8
i18n/it.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Darth Kule"
]
},
"tabber-desc": "Permette di creare schede all'interno di una pagina"
}

8
i18n/ja.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Shirayuki"
]
},
"tabber-desc": "ページ内にタブを作成できるようにする"
}

8
i18n/ko.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"아라"
]
},
"tabber-desc": "문서 내에서 탭 만들기 허용"
}

8
i18n/ksh.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Purodha"
]
},
"tabber-desc": "Määd et müjjelesch, en Sigge Tabs erin ze maache."
}

8
i18n/mk.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Bjankuloski06"
]
},
"tabber-desc": "Овозможува создавање на јазичиња во рамките на една страница"
}

8
i18n/nl.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"SPQRobin"
]
},
"tabber-desc": "Maakt het mogelijk om tabbladen binnen een pagina te maken"
}

8
i18n/pl.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"BeginaFelicysym"
]
},
"tabber-desc": "Pozwala na tworzenie zakładek na stronie"
}

9
i18n/pms.json Normal file
View file

@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Borichèt",
"Dragonòt"
]
},
"tabber-desc": "A përmët ëd creé dle schede drinta a na pàgina"
}

8
i18n/pt-br.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Cainamarques"
]
},
"tabber-desc": "Permite a criação de abas dentro de uma página"
}

8
i18n/qqq.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Shirayuki"
]
},
"tabber-desc": "{{desc|name=Tabber|url=http://www.mediawiki.org/wiki/Extension:Tabber}}"
}

8
i18n/roa-tara.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Joetaras"
]
},
"tabber-desc": "Permette de ccrejà le schede jndr'à 'na pàgene"
}

8
i18n/ru.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Lockal"
]
},
"tabber-desc": "Позволяет создавать вкладки внутри страницы"
}

8
i18n/si.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"පසිඳු කාවින්ද"
]
},
"tabber-desc": "පිටු අතර ටැබයන් තැනීමට ඉඩ දෙයි"
}

8
i18n/sv.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"WikiPhoenix"
]
},
"tabber-desc": "Gör det möjligt att skapa flikar på en sida"
}

8
i18n/tl.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"AnakngAraw"
]
},
"tabber-desc": "Nagpapahintulot upang makalikha ng mga laylay sa loob ng isang pahina"
}

8
i18n/uk.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Ата"
]
},
"tabber-desc": "Дозволяє створювати вкладки всередині сторінки"
}

9
i18n/zh-hans.json Normal file
View file

@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Xiaomingyan",
"Yfdyh000"
]
},
"tabber-desc": "允许在页面内创建标签页"
}

8
i18n/zh-hant.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Justincheng12345"
]
},
"tabber-desc": "容許於頁面內創建分頁"
}