From ea6867afffb29c39aa07c9f882c10a15e6602a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 28 Aug 2015 13:32:18 +0200 Subject: [PATCH] Feature #3748: Fix tr() calls without the Locale prefix --- .../public/app/tabs/datastores-tab/form-panels/create.js | 2 +- .../public/app/tabs/oneflow-services-tab/panels/roles.js | 6 +++--- src/sunstone/public/app/tabs/secgroups-tab/utils/common.js | 2 +- src/sunstone/public/app/tabs/vms-tab/datatable.js | 2 +- src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js | 2 +- src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js | 2 +- src/sunstone/public/app/tabs/vnets-tab/dialogs/update-ar.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js index 60310d93dd..e0a10abcb9 100644 --- a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js +++ b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js @@ -254,7 +254,7 @@ define(function(require) { var cluster_id = $(".resource_list_select", $('#datastore_cluster_raw', dialog)).val(); if (!cluster_id) { - Notifier.notifyError(tr("Please select a cluster for this datastore")); + Notifier.notifyError(Locale.tr("Please select a cluster for this datastore")); return false; } diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/roles.js b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/roles.js index 88287b5888..6f7ccbfa5f 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/roles.js +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/roles.js @@ -198,10 +198,10 @@ define(function(require) { if (that.element.TEMPLATE.BODY.ready_status_gate) { if (vm_info.VM.USER_TEMPLATE.READY == "YES") { - info.push(''); + info.push(''); } else { - info.push(''); + info.push(''); } } else { info.push(""); @@ -236,7 +236,7 @@ define(function(require) { Vnc.lock(); Sunstone.runAction("VM.startvnc_action", vmId); } else { - Notifier.notifyError(tr("VNC Connection in progress")); + Notifier.notifyError(Locale.tr("VNC Connection in progress")); } return false; diff --git a/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js b/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js index 15f68a531a..785b4b052a 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js +++ b/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js @@ -103,7 +103,7 @@ define(function(require) { function _icmpToSt(icmp_type){ switch( icmp_type ){ - case "": return tr("All"); + case "": return Locale.tr("All"); case "0": return "0: Echo Reply"; case "3": return "3: Destination Unreachable"; case "4": return "4: Source Quench"; diff --git a/src/sunstone/public/app/tabs/vms-tab/datatable.js b/src/sunstone/public/app/tabs/vms-tab/datatable.js index a18349c3ad..640f81205f 100644 --- a/src/sunstone/public/app/tabs/vms-tab/datatable.js +++ b/src/sunstone/public/app/tabs/vms-tab/datatable.js @@ -139,7 +139,7 @@ define(function(require) { Vnc.lock(); Sunstone.runAction("VM.startvnc_action", vmId); } else { - Notifier.notifyError(tr("VNC Connection in progress")) + Notifier.notifyError(Locale.tr("VNC Connection in progress")) } return false; diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js index 8e68bd8a70..c3a32b90c9 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js @@ -71,7 +71,7 @@ define(function(require) { if ($("#selected_resource_id_deploy_vm", context).val()) { extra_info['host_id'] = $("#selected_resource_id_deploy_vm", context).val(); } else { - Notifier.notifyError(tr("You have not selected a host")); + Notifier.notifyError(Locale.tr("You have not selected a host")); return false; } diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js index 80f316fe8d..21bd98b902 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js @@ -74,7 +74,7 @@ define(function(require) { if ($("#selected_resource_id_migrate_vm", context).val()) { extra_info['host_id'] = $("#selected_resource_id_migrate_vm", context).val(); } else { - notifyError(tr("You have not selected a host")); + notifyError(Locale.tr("You have not selected a host")); return false; } diff --git a/src/sunstone/public/app/tabs/vnets-tab/dialogs/update-ar.js b/src/sunstone/public/app/tabs/vnets-tab/dialogs/update-ar.js index 618e0b3531..934853c1b4 100644 --- a/src/sunstone/public/app/tabs/vnets-tab/dialogs/update-ar.js +++ b/src/sunstone/public/app/tabs/vnets-tab/dialogs/update-ar.js @@ -55,7 +55,7 @@ define(function(require) { that.arTab.setup(context, "update_ar"); $('#update_ar_form',context).on('invalid.fndtn.abide', function () { - Notifier.notifyError(tr("One or more required fields are missing.")); + Notifier.notifyError(Locale.tr("One or more required fields are missing.")); }).on('valid.fndtn.abide', function () { var data = that.arTab.retrieve();