From eb3eba9c5e6ddb8895bb70f20f8076b0148ae495 Mon Sep 17 00:00:00 2001 From: Blakko Date: Mon, 8 Jul 2013 11:40:11 +0200 Subject: [PATCH] Internationalization of the reconciliation part --- .../add-namespaced-service-dialog.html | 10 +++--- .../add-standard-service-dialog.html | 8 ++--- .../reconciliation/freebase-query-panel.html | 12 +++---- .../reconciliation/freebase-query-panel.js | 10 +++++- .../scripts/reconciliation/recon-dialog.html | 9 +++-- .../scripts/reconciliation/recon-dialog.js | 19 +++++++++- .../scripts/reconciliation/recon-manager.js | 6 ++-- .../standard-service-panel.html | 12 +++---- .../reconciliation/standard-service-panel.js | 12 +++++-- main/webapp/modules/langs/translation-en.json | 36 ++++++++++++++++++- 10 files changed, 100 insertions(+), 34 deletions(-) diff --git a/main/webapp/modules/core/scripts/reconciliation/add-namespaced-service-dialog.html b/main/webapp/modules/core/scripts/reconciliation/add-namespaced-service-dialog.html index 032e6644c..f055cedaa 100644 --- a/main/webapp/modules/core/scripts/reconciliation/add-namespaced-service-dialog.html +++ b/main/webapp/modules/core/scripts/reconciliation/add-namespaced-service-dialog.html @@ -1,13 +1,13 @@
-
Add Namespaced Reconciliation Service
+
- + - +
Namespace:
Type of Entities (optional):
\ No newline at end of file diff --git a/main/webapp/modules/core/scripts/reconciliation/add-standard-service-dialog.html b/main/webapp/modules/core/scripts/reconciliation/add-standard-service-dialog.html index 0a28ce775..f1e923a57 100644 --- a/main/webapp/modules/core/scripts/reconciliation/add-standard-service-dialog.html +++ b/main/webapp/modules/core/scripts/reconciliation/add-standard-service-dialog.html @@ -1,11 +1,11 @@
-
Add Standard Reconciliation Service
+
-

Enter the service's URL:

+

\ No newline at end of file diff --git a/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.html b/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.html index b67ace285..0803edbe2 100644 --- a/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.html +++ b/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.html @@ -1,20 +1,20 @@
-

Each cell contains:

+

- - + + diff --git a/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.js b/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.js index 29caa6675..2038c2fb8 100644 --- a/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.js +++ b/main/webapp/modules/core/scripts/reconciliation/freebase-query-panel.js @@ -60,6 +60,14 @@ ReconFreebaseQueryPanel.prototype._constructUI = function() { var self = this; this._panel = $(DOM.loadHTML("core", "scripts/reconciliation/freebase-query-panel.html")).appendTo(this._container); this._elmts = DOM.bind(this._panel); + + this._elmts.or_recon_contain.html($.i18n._('core-recon')["cell-contains"]); + this._elmts.or_recon_fbId.html($.i18n._('core-recon')["fb-id"]); + this._elmts.or_recon_fbGuid.html($.i18n._('core-recon')["fb-guid"]); + this._elmts.or_recon_fbKey.html($.i18n._('core-recon')["fb-key"]); + this._elmts.or_recon_fbEnNs.html($.i18n._('core-recon')["fb-en-ns"]); + this._elmts.or_recon_thisNs.html($.i18n._('core-recon')["this-ns"]); + this._wireEvents(); }; @@ -84,7 +92,7 @@ ReconFreebaseQueryPanel.prototype.start = function() { if (namespaceChoice.value == "other") { var suggest = this._elmts.strictNamespaceInput.data("data.suggest"); if (!suggest) { - alert("Please specify a namespace."); + alert($.i18n._('core-recon')["specify-ns"]); return; } namespace = { diff --git a/main/webapp/modules/core/scripts/reconciliation/recon-dialog.html b/main/webapp/modules/core/scripts/reconciliation/recon-dialog.html index 0cb4eb06f..a9060ebd8 100644 --- a/main/webapp/modules/core/scripts/reconciliation/recon-dialog.html +++ b/main/webapp/modules/core/scripts/reconciliation/recon-dialog.html @@ -7,19 +7,18 @@
a Freebase ID, e.g., /en/solar_system
a Freebase GUID, e.g., #9202a8c04000641f80000000000354ae
- + - + - +
a Freebase key in
the Wikipedia English namespace
this namespace:
- Pick a Service or Extension on Left
diff --git a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js index 27a328749..4784d9dc0 100644 --- a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js +++ b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js @@ -82,6 +82,14 @@ ReconStandardServicePanel.prototype._constructUI = function() { var self = this; this._panel = $(DOM.loadHTML("core", "scripts/reconciliation/standard-service-panel.html")).appendTo(this._container); this._elmts = DOM.bind(this._panel); + + this._elmts.or_proc_access.html("» "+$.i18n._('core-recon')["access"]); + this._elmts.rawServiceLink.html($.i18n._('core-recon')["service-api"]); + this._elmts.or_proc_cellType.html($.i18n._('core-recon')["cell-type"]+":"); + this._elmts.or_proc_colDetail.html($.i18n._('core-recon')["col-detail"]+":"); + this._elmts.or_proc_againsType.html($.i18n._('core-recon')["against-type"]+":"); + this._elmts.or_proc_noType.html($.i18n._('core-recon')["no-type"]); + this._elmts.or_proc_autoMatch.html($.i18n._('core-recon')["auto-match"]); this._elmts.rawServiceLink.attr("href", this._service.url); @@ -157,7 +165,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() { } else { $('
') .addClass("recon-dialog-standard-service-panel-message") - .text("Sorry, we can't suggest any type for your data. Please specify a type yourself below.") + .text($.i18n._('core-recon')["warning-type-sugg"]) .appendTo(this._elmts.typeContainer); this._panel @@ -176,7 +184,7 @@ ReconStandardServicePanel.prototype._populatePanel = function() { var detailTable = $( '' + - '' + + '' + '
ColumnInclude?As Property
'+$.i18n._('core-recon')["column"]+''+$.i18n._('core-recon')["include"]+'?'+$.i18n._('core-recon')["as-property"]+'
' ).appendTo(detailTableContainer)[0]; diff --git a/main/webapp/modules/langs/translation-en.json b/main/webapp/modules/langs/translation-en.json index 521edc59f..6969e2659 100644 --- a/main/webapp/modules/langs/translation-en.json +++ b/main/webapp/modules/langs/translation-en.json @@ -320,6 +320,36 @@ "continue-remaining": "Continue with the remaining operations", "undo": "Undo" }, + "core-recon": { + "access": "Access", + "service-api": "Service API", + "cell-type": "Reconcile each cell to an entity of one of these types", + "col-detail": "Also use relevant details from other columns", + "against-type": "Reconcile against type", + "no-type": "Reconcile against no particular type", + "auto-match": "Auto-match candidates with high confidence", + "warning-type-sugg": "Sorry, we can't suggest any type for your data. Please specify a type yourself below.", + "column": "Column", + "include": "Include", + "as-property": "As Property", + "contact-service": "Contacting reconciliation service", + "error-contact": "Error contacting recon service", + "fb-recon": "Freebase Query-based Reconciliation", + "recon-col": "Reconcile column", + "pick-service": "Pick a Service or Extension on Left", + "add-recon-srv": "Add Namespaced Reconciliation Service", + "namespace": "Namespace", + "ent-type": "Type of Entities (optional)", + "add-std-srv": "Add Standard Reconciliation Service", + "enter-url": "Enter the service's URL", + "specify-ns": "Please specify a namespace.", + "cell-contains": "Each cell contains:", + "fb-id": "a Freebase ID, e.g., /en/solar_system", + "fb-guid": "a Freebase GUID, e.g., #9202a8c04000641f80000000000354ae", + "fb-key": "a Freebase key in", + "fb-en-ns": "the Wikipedia English namespace", + "this-ns": "this namespace:" + }, "core-buttons": { "cancel": "Cancel", "ok": "  OK  ", @@ -351,6 +381,10 @@ "refresh": "Refresh", "reset-all": "Reset All", "remove-all": "Remove All", - "perform-op": "Perform Operations" + "perform-op": "Perform Operations", + "add-std-svc": "Add Standard Service", + "add-named-svc": "Add Namespaced Service", + "start-recon": "Start Reconciling", + "add-service": "Add Service" } } \ No newline at end of file