From 5d8d37224451001b408aae1d8e6f6237550eff3e Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Tue, 7 Feb 2017 23:59:12 +0000 Subject: [PATCH] Simpler version --- .../core/langs/translation-default.json | 1 - .../modules/core/langs/translation-en.json | 1 - .../modules/core/langs/translation-es.json | 1 - .../modules/core/langs/translation-fr.json | 1 - .../modules/core/langs/translation-it.json | 1 - .../modules/core/langs/translation-jp.json | 1 - .../modules/core/langs/translation-zh.json | 1 - .../scripts/reconciliation/recon-manager.js | 31 +++---------------- 8 files changed, 4 insertions(+), 34 deletions(-) diff --git a/main/webapp/modules/core/langs/translation-default.json b/main/webapp/modules/core/langs/translation-default.json index df4405c5f..ed2f48c33 100644 --- a/main/webapp/modules/core/langs/translation-default.json +++ b/main/webapp/modules/core/langs/translation-default.json @@ -350,7 +350,6 @@ "as-property": "As Property", "contact-service": "Contacting reconciliation service", "error-contact": "Error contacting recon service", - "wd-recon": "Wikidata Reconciliation", "wd-recon-lang": "en", "recon-col": "Reconcile column", "pick-service": "Pick a Service or Extension on Left", diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json index a70b84cd0..b8a3fef78 100644 --- a/main/webapp/modules/core/langs/translation-en.json +++ b/main/webapp/modules/core/langs/translation-en.json @@ -350,7 +350,6 @@ "as-property": "As Property", "contact-service": "Contacting reconciliation service", "error-contact": "Error contacting recon service", - "wd-recon": "Wikidata Reconciliation", "wd-recon-lang": "en", "recon-col": "Reconcile column", "pick-service": "Pick a Service or Extension on Left", diff --git a/main/webapp/modules/core/langs/translation-es.json b/main/webapp/modules/core/langs/translation-es.json index 368060fc8..898d50396 100644 --- a/main/webapp/modules/core/langs/translation-es.json +++ b/main/webapp/modules/core/langs/translation-es.json @@ -350,7 +350,6 @@ "as-property": "Como propiedad", "contact-service": "Contactando al servicio", "error-contact": "Error contactando al servicio", - "wd-recon": "Wikidata", "wd-recon-lang": "es", "recon-col": "Cotejar columna", "pick-service": "Seleccione un servicio o extensión a la izquierda", diff --git a/main/webapp/modules/core/langs/translation-fr.json b/main/webapp/modules/core/langs/translation-fr.json index 1b19457b7..dc7079c97 100644 --- a/main/webapp/modules/core/langs/translation-fr.json +++ b/main/webapp/modules/core/langs/translation-fr.json @@ -350,7 +350,6 @@ "as-property": "Comme propriété", "contact-service": "Connexion au service de réconciliation", "error-contact": "Erreur lors de la connexion au service de réconciliation", - "wd-recon": "Réconciliation Wikidata", "wd-recon-lang": "fr", "recon-col": "Réconcilier la colonne", "pick-service": "Choisir un service ou une extension à gauche", diff --git a/main/webapp/modules/core/langs/translation-it.json b/main/webapp/modules/core/langs/translation-it.json index 37457a582..8e7f5e6d7 100644 --- a/main/webapp/modules/core/langs/translation-it.json +++ b/main/webapp/modules/core/langs/translation-it.json @@ -350,7 +350,6 @@ "as-property": "Come Proprietà", "contact-service": "Contattando il servizio di riconciliazione", "error-contact": "Errore durante il contatto del servizio di riconciliazione", - "wd-recon": "Riconciliazione Wikidata", "wd-recon-lang": "it", "recon-col": "Riconcilia la colonna", "pick-service": "Seleziona un Servizio o Estensione sulla Sinistra", diff --git a/main/webapp/modules/core/langs/translation-jp.json b/main/webapp/modules/core/langs/translation-jp.json index 110880dc2..86ca6b8c7 100644 --- a/main/webapp/modules/core/langs/translation-jp.json +++ b/main/webapp/modules/core/langs/translation-jp.json @@ -350,7 +350,6 @@ "as-property": "プロパティ", "contact-service": "名寄せサービスにコンタクト中", "error-contact": "名寄せサービスのコンタクトにエラー", - "wd-recon": "Wikidata Reconciliation", "wd-recon-lang": "jp", "recon-col": "カラムを名寄せ", "pick-service": "左からサービスかエクステンションを選択", diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json index 8ae6a3849..4eaace1ee 100644 --- a/main/webapp/modules/core/langs/translation-zh.json +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -350,7 +350,6 @@ "as-property": "作为属性", "contact-service": "正在访问搭配服务", "error-contact": "在访问搭配服务时出现异常", - "wd-recon": "基于query的Wikidata搭配", "wd-recon-lang": "zh", "recon-col": "搭配列", "pick-service": "在左侧选择一个服务或扩展", diff --git a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js index a1c0ea412..11d36ac08 100644 --- a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js +++ b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js @@ -141,27 +141,6 @@ ReconciliationManager.save = function(f) { (function() { var lang = $.i18n._('core-recon')["wd-recon-lang"]; - ReconciliationManager.customServices.push( - {"suggest": - {"property": - {"service_url": "https://tools.wmflabs.org/openrefine-wikidata", - "service_path": "/"+lang+"/suggest/property"}, - "type": - {"service_url": "https://tools.wmflabs.org/openrefine-wikidata", - "service_path": "/"+lang+"/suggest/type"}, - "entity": {"service_url": "https://tools.wmflabs.org/openrefine-wikidata", - "service_path": "/"+lang+"/suggest/entity"}}, - "view": - {"url": "https://www.wikidata.org/wiki/{{id}}"}, - "preview": - {"height": 90, - "url": "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/preview?id={{id}}", - "width": 320}, - "name": $.i18n._('core-recon')["wd-recon"], - "url" : "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/api", - "ui" : { "handler": "ReconStandardServicePanel" }, - }); - var cs = ReconciliationManager.customServices; $.ajax({ async: false, @@ -169,15 +148,13 @@ ReconciliationManager.save = function(f) { name: "reconciliation.standardServices" }), success: function(data) { - if (data.value && data.value != "null") { + if (data.value && data.value != "null" && data.value != "[]") { ReconciliationManager.standardServices = JSON.parse(data.value); ReconciliationManager._rebuildMap(); } else { - // FIXME: Standard recon service needs to be replaced -// ReconciliationManager.registerStandardService( -// "http://reconcile.freebaseapps.com/reconcile" -// "http://standard-reconcile.freebaseapps.com/reconcile" -// ); + ReconciliationManager.registerStandardService( + "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/api" + ); } }, dataType: "json"