From 09296fc0b302d9a105aacad960c295991fa88a1d Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 4 Apr 2013 14:32:47 +0200 Subject: Use text.get for transforming values supplied by spec https://fedorahosted.org/freeipa/ticket/3235 --- install/ui/src/freeipa/aci.js | 4 ++-- install/ui/src/freeipa/add.js | 4 ++-- install/ui/src/freeipa/association.js | 12 +++++------ install/ui/src/freeipa/automember.js | 4 ++-- install/ui/src/freeipa/certificate.js | 7 +++--- install/ui/src/freeipa/details.js | 6 +++--- install/ui/src/freeipa/dialog.js | 6 +++--- install/ui/src/freeipa/dns.js | 5 +++-- install/ui/src/freeipa/entitle.js | 8 +++---- install/ui/src/freeipa/entity.js | 6 +++--- install/ui/src/freeipa/facet.js | 19 +++++++++-------- install/ui/src/freeipa/field.js | 20 +++++++++--------- install/ui/src/freeipa/hbactest.js | 6 +++--- install/ui/src/freeipa/host.js | 4 ++-- install/ui/src/freeipa/ipa.js | 7 +++--- install/ui/src/freeipa/search.js | 4 ++-- install/ui/src/freeipa/service.js | 4 ++-- install/ui/src/freeipa/sudo.js | 4 ++-- install/ui/src/freeipa/user.js | 4 ++-- install/ui/src/freeipa/widget.js | 40 +++++++++++++++++++---------------- 20 files changed, 91 insertions(+), 83 deletions(-) diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js index 0852994fd..92c5cc38f 100644 --- a/install/ui/src/freeipa/aci.js +++ b/install/ui/src/freeipa/aci.js @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -define(['./ipa', './jquery', './details', './search', './association', - './entity'], function(IPA, $) { +define(['./ipa', './jquery', './text', './details', './search', './association', + './entity'], function(IPA, $, text) { IPA.aci = {}; diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js index 551fc1c51..fc14269f5 100644 --- a/install/ui/src/freeipa/add.js +++ b/install/ui/src/freeipa/add.js @@ -19,8 +19,8 @@ * along with this program. If not, see . */ -define(['./ipa', './jquery', './navigation', './field', './widget', './dialog'], - function(IPA, $, navigation) { +define(['./ipa', './jquery', './navigation', './text', './field', './widget', './dialog'], + function(IPA, $, navigation, text) { IPA.entity_adder_dialog = function(spec) { diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js index 5642d64e1..a27b5c944 100644 --- a/install/ui/src/freeipa/association.js +++ b/install/ui/src/freeipa/association.js @@ -22,8 +22,8 @@ /* CURRENTLY ALSO REQUIRES search.js, because it reuses it's code to create * the AssociationList elements; IT NEEDS IT'S OWN CODE! */ -define(['./ipa', './jquery', './navigation', './search', './dialog'], - function(IPA, $, navigation) { +define(['./ipa', './jquery', './navigation', './text', './search', './dialog'], + function(IPA, $, navigation, text) { IPA.associator = function (spec) { @@ -356,8 +356,8 @@ IPA.association_table_widget = function (spec) { that.add_method = spec.add_method || 'add_member'; that.remove_method = spec.remove_method || 'remove_member'; - that.add_title = spec.add_title || IPA.messages.association.add.member; - that.remove_title = spec.remove_title || IPA.messages.association.remove.member; + that.add_title = text.get(spec.add_title || '@i18n:association.add.member'); + that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member'); that.adder_columns = $.ordered_map(); @@ -823,8 +823,8 @@ IPA.association_facet = function (spec, no_init) { that.add_method = spec.add_method || 'add_member'; that.remove_method = spec.remove_method || 'remove_member'; - that.add_title = spec.add_title || IPA.messages.association.add.member; - that.remove_title = spec.remove_title || IPA.messages.association.remove.member; + that.add_title = text.get(spec.add_title || '@i18n:association.add.member'); + that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member'); that.adder_columns = $.ordered_map(); diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js index 92e69a904..8768ec5ce 100644 --- a/install/ui/src/freeipa/automember.js +++ b/install/ui/src/freeipa/automember.js @@ -18,8 +18,8 @@ * along with this program. If not, see . */ -define(['./ipa', './jquery', './navigation', './details', './search', './association', - './entity'], function(IPA, $, navigation) { +define(['./ipa', './jquery', './navigation', './text', './details', './search', + './association', './entity'], function(IPA, $, navigation, text) { IPA.automember = {}; diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js index 4000e5aae..6b3128879 100755 --- a/install/ui/src/freeipa/certificate.js +++ b/install/ui/src/freeipa/certificate.js @@ -19,7 +19,8 @@ * along with this program. If not, see . */ -define(['./ipa', './jquery','dojo/_base/lang', './dialog'], function(IPA, $, lang) { +define(['./ipa', './jquery','dojo/_base/lang', './text', './dialog'], + function(IPA, $, lang, text) { IPA.cert = {}; @@ -388,7 +389,7 @@ IPA.cert.request_dialog = function(spec) { that.width = spec.width || 600; that.height = spec.height || 480; - that.message = spec.message; + that.message = text.get(spec.message); that.request = spec.request; @@ -1205,7 +1206,7 @@ IPA.cert.search_facet = function(spec) { var doc = metadata.doc || ''; $('