jenkins-bot has submitted this change and it was merged.
Change subject: Always load Citoid type map from data module
......................................................................
Always load Citoid type map from data module
Message must be forced to be in the content language.
Bug: T138855
Change-Id: I6779ab778f873b9603bfb9a725bc915b0ffc767a
(cherry picked from commit 6edea1596d4999286503fead50e06c5ea0db817c)
---
M CitoidDataModule.php
M extension.json
M modules/ve.ui.CiteFromIdInspector.js
M modules/ve.ui.Citoid.init.js
4 files changed, 4 insertions(+), 11 deletions(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CitoidDataModule.php b/CitoidDataModule.php
index 6c04b85..af8a62d 100644
--- a/CitoidDataModule.php
+++ b/CitoidDataModule.php
@@ -22,7 +22,7 @@
public function getScript( ResourceLoaderContext $context ) {
return 've.init.platform.addMessages(' . FormatJson::encode(
[
- 'citoid-template-type-map-backup.json' =>
+ 'citoid-template-type-map.json' =>
$context->msg(
'citoid-template-type-map.json' )
->inContentLanguage()
->plain(),
diff --git a/extension.json b/extension.json
index 53c9ce0..6d771d4 100644
--- a/extension.json
+++ b/extension.json
@@ -61,7 +61,6 @@
"citoid-citefromidtool-title-othergroup",
"citoid-referencecontextitem-convert-button",
"citoid-referencecontextitem-convert-message",
- "citoid-template-type-map.json",
"citoid-unknown-error"
],
"targets": [
diff --git a/modules/ve.ui.CiteFromIdInspector.js
b/modules/ve.ui.CiteFromIdInspector.js
index 7c81342..1e1dea7 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -86,9 +86,7 @@
try {
this.templateTypeMap = JSON.parse( mw.message(
'citoid-template-type-map.json' ).plain() );
- } catch ( e ) {
- this.templateTypeMap = JSON.parse( mw.message(
'citoid-template-type-map-backup.json' ).plain() );
- }
+ } catch ( e ) { }
// Get the available tools for their titles and icons
try {
// Must use mw.message to avoid JSON being parsed as Wikitext
diff --git a/modules/ve.ui.Citoid.init.js b/modules/ve.ui.Citoid.init.js
index 881ec74..8fcf29b 100644
--- a/modules/ve.ui.Citoid.init.js
+++ b/modules/ve.ui.Citoid.init.js
@@ -4,12 +4,8 @@
// Don't create tool unless the configuration message is present
try {
map = JSON.parse( mw.message( 'citoid-template-type-map.json'
).plain() );
- } catch ( e ) {
- // Temporary hack for T93800
- try {
- map = JSON.parse( mw.message(
'citoid-template-type-map-backup.json' ).plain() );
- } catch ( e2 ) {}
- }
+ } catch ( e ) { }
+
if ( !map ) {
// Unregister the tool
ve.ui.toolFactory.unregister( ve.ui.CiteFromIdInspectorTool );
--
To view, visit https://gerrit.wikimedia.org/r/298327
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6779ab778f873b9603bfb9a725bc915b0ffc767a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: wmf/1.28.0-wmf.9
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits