From 32a48518cbd0ab65b28e90afe3149d065fb5d6ad Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Mon, 5 Oct 2015 19:19:17 +0200 Subject: [PATCH 1/7] moving i18n files to json format (wiothout any backwardcompatibility thus raising bar to mediawiki ~1.23) --- Bugzilla.i18n.php | 14 -------------- i18n/de.json | 8 ++++++++ i18n/en.json | 5 +++++ i18n/qqq.json | 7 +++++++ 4 files changed, 20 insertions(+), 14 deletions(-) delete mode 100644 Bugzilla.i18n.php create mode 100644 i18n/de.json create mode 100644 i18n/en.json create mode 100644 i18n/qqq.json diff --git a/Bugzilla.i18n.php b/Bugzilla.i18n.php deleted file mode 100644 index 0647599..0000000 --- a/Bugzilla.i18n.php +++ /dev/null @@ -1,14 +0,0 @@ - 'This extension allows read-only integration with Bugzilla via the REST API', -); - -$messages['qqq'] = array( - 'bugzilla-desc' => '{{desc}}', -); diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..3d7c0a8 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Dennis Roczek" + ] + }, + 'bugzilla-desc' => 'Diese Erweiterung erlaubt die lesende Integration mit Bugzilla's REST API' +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..9b12a91 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,5 @@ +{ + "@metadata": { + }, + 'bugzilla-desc' => 'This extension allows read-only integration with Bugzilla via the REST API' +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..fcc16f9 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,7 @@ +{ + "@metadata": { + }, + 'bugzilla-desc' => '[[Special:Version]] description' +} + + From 8806e4c33f2437ccab94e5d83acc86f8207922ae Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Mon, 5 Oct 2015 19:25:34 +0200 Subject: [PATCH 2/7] using double quotes --- i18n/de.json | 2 +- i18n/en.json | 2 +- i18n/qqq.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/de.json b/i18n/de.json index 3d7c0a8..3bb4466 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -4,5 +4,5 @@ "Dennis Roczek" ] }, - 'bugzilla-desc' => 'Diese Erweiterung erlaubt die lesende Integration mit Bugzilla's REST API' + "bugzilla-desc" => "Diese Erweiterung erlaubt die lesende Integration mit Bugzilla's REST API" } \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json index 9b12a91..03f44dd 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,5 +1,5 @@ { "@metadata": { }, - 'bugzilla-desc' => 'This extension allows read-only integration with Bugzilla via the REST API' + "bugzilla-desc" => "This extension allows read-only integration with Bugzilla via the REST API" } diff --git a/i18n/qqq.json b/i18n/qqq.json index fcc16f9..f024e33 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,7 +1,7 @@ { "@metadata": { }, - 'bugzilla-desc' => '[[Special:Version]] description' + "bugzilla-desc" => "[[Special:Version]] description" } From 795909f8fc78173caae17fc2a7aa006cf6c3e221 Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Mon, 5 Oct 2015 19:31:29 +0200 Subject: [PATCH 3/7] update to correct github url --- Bugzilla.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bugzilla.php b/Bugzilla.php index 2c48a59..67b9b25 100755 --- a/Bugzilla.php +++ b/Bugzilla.php @@ -21,7 +21,7 @@ $wgExtensionCredits['other'][] = array( 'name' => 'Bugzilla', 'author' => 'Christian Legnitto', - 'url' => 'https://github.com/LegNeato/mediawiki-bugzilla', + 'url' => 'https://github.com/mozilla/mediawiki-bugzilla', 'descriptionmsg' => 'bugzilla-desc', 'license-name' => 'MPL2' ); From d2b73c7e151e89ecd6e8f90e2622c15bd49621f0 Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Mon, 5 Oct 2015 19:33:49 +0200 Subject: [PATCH 4/7] missed i18n reference deprecated since 1.23, see https://www.mediawiki.org/wiki/Manual:$wgExtensionMessagesFiles --- Bugzilla.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Bugzilla.php b/Bugzilla.php index 67b9b25..b4b9685 100755 --- a/Bugzilla.php +++ b/Bugzilla.php @@ -43,8 +43,6 @@ $cwd = dirname(__FILE__); // We don't need to do this more than once! -$wgExtensionMessagesFiles['Bugzilla'] = "$cwd/Bugzilla.i18n.php"; - $wgAutoloadClasses['Bugzilla'] = $cwd . '/Bugzilla.class.php'; $wgAutoloadClasses['BugzillaQuery'] = $cwd . '/BugzillaQuery.class.php'; $wgAutoloadClasses['BugzillaOutput'] = $cwd . '/BugzillaOutput.class.php'; From 91e8640a9aef1105c546ff991374f7ca1b49c2fe Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Mon, 5 Oct 2015 23:46:49 +0200 Subject: [PATCH 5/7] add a TODO for replace i18n strings --- web/js/jquery.dataTables.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/js/jquery.dataTables.js b/web/js/jquery.dataTables.js index 4c445b1..b013a79 100644 --- a/web/js/jquery.dataTables.js +++ b/web/js/jquery.dataTables.js @@ -964,6 +964,7 @@ * Notes: The words in the format _VAR_ are variables which are dynamically replaced * by javascript */ + //TODO: replace these entries with the i18n keywords this.oLanguage = { "sProcessing": "Processing...", "sLengthMenu": "Show _MENU_ entries", From 91aa8ee9bdc58e8ee909bc7ea76767b9c97abc3e Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Wed, 7 Oct 2015 13:30:01 +0200 Subject: [PATCH 6/7] add missing wgmessagesdirs variable --- Bugzilla.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Bugzilla.php b/Bugzilla.php index b4b9685..97ae0d0 100755 --- a/Bugzilla.php +++ b/Bugzilla.php @@ -42,6 +42,7 @@ */ $cwd = dirname(__FILE__); // We don't need to do this more than once! +$wgMessagesDirs['Bugzilla'] = __DIR__ . '/i18n'; $wgAutoloadClasses['Bugzilla'] = $cwd . '/Bugzilla.class.php'; $wgAutoloadClasses['BugzillaQuery'] = $cwd . '/BugzillaQuery.class.php'; From b5db318e19471d89e4164bedced2e1085d85e6ac Mon Sep 17 00:00:00 2001 From: dennisroczek Date: Wed, 7 Oct 2015 13:34:56 +0200 Subject: [PATCH 7/7] fix json format --- i18n/de.json | 4 ++-- i18n/en.json | 2 +- i18n/qqq.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/de.json b/i18n/de.json index 3bb4466..5af0d1f 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -4,5 +4,5 @@ "Dennis Roczek" ] }, - "bugzilla-desc" => "Diese Erweiterung erlaubt die lesende Integration mit Bugzilla's REST API" -} \ No newline at end of file + "bugzilla-desc": "Diese Erweiterung erlaubt die lesende Integration mit Bugzilla's REST API" +} diff --git a/i18n/en.json b/i18n/en.json index 03f44dd..76e7108 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,5 +1,5 @@ { "@metadata": { }, - "bugzilla-desc" => "This extension allows read-only integration with Bugzilla via the REST API" + "bugzilla-desc": "This extension allows read-only integration with Bugzilla via the REST API" } diff --git a/i18n/qqq.json b/i18n/qqq.json index f024e33..3c727c3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,7 +1,7 @@ { "@metadata": { }, - "bugzilla-desc" => "[[Special:Version]] description" + "bugzilla-desc": "[[Special:Version]] description" }