diff options
author | Petr VobornÃk <pvoborni@redhat.com> | 2012-02-03 11:37:09 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2012-02-07 00:48:10 -0600 |
commit | cbd77cae0a2b8b9ee51ff5aced8c215805d7f12e (patch) | |
tree | fbc5a86a479ce3008941e084d8a9890b06bfab8d /install/ui | |
parent | fccea2dca4d384ab2992103916cfe8801be53edd (diff) | |
download | freeipa-cbd77cae0a2b8b9ee51ff5aced8c215805d7f12e.tar.gz freeipa-cbd77cae0a2b8b9ee51ff5aced8c215805d7f12e.tar.xz freeipa-cbd77cae0a2b8b9ee51ff5aced8c215805d7f12e.zip |
Automember UI - Fixed I18n labels
Hard-coded labels in Automember UI have been moved into internal.py to
allow translation.
https://fedorahosted.org/freeipa/ticket/2195
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/automember.js | 33 | ||||
-rw-r--r-- | install/ui/test/data/ipa_init.json | 14 | ||||
-rw-r--r-- | install/ui/webui.js | 6 |
3 files changed, 34 insertions, 19 deletions
diff --git a/install/ui/automember.js b/install/ui/automember.js index e9b48dc87..4a07b4f01 100644 --- a/install/ui/automember.js +++ b/install/ui/automember.js @@ -43,7 +43,7 @@ IPA.automember.entity = function(spec) { factory: IPA.automember.rule_search_facet, name: 'searchgroup', group_type: 'group', - label: 'User group rules', //TODO: translate + label: IPA.messages.objects.automember.usergrouprules, details_facet: 'usergrouprule', columns: [ 'cn', @@ -54,7 +54,7 @@ IPA.automember.entity = function(spec) { factory: IPA.automember.rule_search_facet, name: 'searchhostgroup', group_type: 'hostgroup', - label: 'Host group rules', //TODO: translate + label: IPA.messages.objects.automember.hostgrouprules, details_facet: 'hostgrouprule', columns: [ 'cn', @@ -65,7 +65,7 @@ IPA.automember.entity = function(spec) { factory: IPA.automember.rule_details_facet, name: 'usergrouprule', group_type: 'group', - label: 'User group rule', //TODO: translate + label: IPA.messages.objects.automember.usergrouprule, disable_facet_tabs: true, redirect_info: { tab: 'amgroup' } }). @@ -73,12 +73,13 @@ IPA.automember.entity = function(spec) { factory: IPA.automember.rule_details_facet, name: 'hostgrouprule', group_type: 'hostgroup', - label: 'Host group rule',//TODO: translate + label: IPA.messages.objects.automember.hostgrouprule, disable_facet_tabs: true, redirect_info: { tab: 'amhostgroup' } }). adder_dialog({ factory: IPA.automember.rule_adder_dialog, + title: IPA.messages.objects.automember.add_rule, fields: [ { type: 'entity_select', @@ -218,7 +219,7 @@ IPA.automember.rule_details_facet = function(spec) { { factory: IPA.collapsible_section, name: 'inclusive', - label: 'Inclusive', //TODO:translate + label: IPA.messages.objects.automember.inclusive, widgets: [ { type: 'automember_condition', @@ -227,17 +228,17 @@ IPA.automember.rule_details_facet = function(spec) { add_command: 'add_condition', remove_command: 'remove_condition', adder_dialog: { - title: 'Add Condition to ${pkey}', //TODO: translate + title: IPA.messages.objects.automember.add_condition, fields: [ { name: 'key', type: 'select', options: IPA.automember.get_condition_attributes(spec.group_type), - label: 'Attribute' //TODO: translate + label: IPA.messages.objects.automember.attribute }, { name: 'automemberinclusiveregex', - label: 'Expression' //TODO: translate + label: IPA.messages.objects.automember.expression } ] } @@ -247,7 +248,7 @@ IPA.automember.rule_details_facet = function(spec) { { factory: IPA.collapsible_section, name: 'exclusive', - label: 'Exclusive', //TODO:translate + label: IPA.messages.objects.automember.exclusive, widgets: [ { type: 'automember_condition', @@ -256,17 +257,17 @@ IPA.automember.rule_details_facet = function(spec) { add_command: 'add_condition', remove_command: 'remove_condition', adder_dialog: { - title: 'Add Condition to ${pkey}', //TODO: translate + title: IPA.messages.objects.automember.add_condition, fields: [ { name: 'key', type: 'select', options: IPA.automember.get_condition_attributes(spec.group_type), - label: 'Attribute' //TODO: translate + label: IPA.messages.objects.automember.attribute }, { name: 'automemberexclusiveregex', - label: 'Expression' //TODO: translate + label: IPA.messages.objects.automember.expression } ] } @@ -414,11 +415,11 @@ IPA.automember.condition_widget = function(spec) { spec.columns = $.merge(spec.columns || [], [ { name: 'attribute', - label: 'Attribute'//TODO:translate + label: IPA.messages.objects.automember.attribute }, { name: 'expression', - label: 'Expression'//TODO:translate + label: IPA.messages.objects.automember.expression } ]); @@ -632,9 +633,9 @@ IPA.automember.default_group_widget = function(spec) { that.get_title = function() { if (that.group_type === 'group') { - return 'Default user group'; //TODO: translate + return IPA.messages.objects.automember.default_user_group; } else { - return 'Default host group'; //TODO: translate + return IPA.messages.objects.automember.default_host_group; } }; diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 7b1b0d0a0..37550b2fb 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -115,6 +115,20 @@ "aci": { "attribute": "Attribute" }, + "automember": { + "add_condition": "Add Condition into ${pkey}", + "add_rule": "Add Rule", + "attribute": "Attribute", + "default_host_group": "Default host group", + "default_user_group": "Default user group", + "exclusive": "Exclusive", + "expression": "Expression", + "hostgrouprule": "Host group rule", + "hostgrouprules": "Host group rules", + "inclusive": "Inclusive", + "usergrouprule": "User group rule", + "usergrouprules": "User group rules" + }, "automountkey": {}, "automountlocation": { "identity": "Automount Location Settings" diff --git a/install/ui/webui.js b/install/ui/webui.js index 42a853694..6850ff5aa 100644 --- a/install/ui/webui.js +++ b/install/ui/webui.js @@ -69,12 +69,12 @@ IPA.admin_navigation = function(spec) { {entity: 'pwpolicy'}, {entity: 'krbtpolicy'}, {entity: 'selinuxusermap'}, - {name: 'automember', label: 'Automember', //TODO: translate IPA.messages.tabs.automember + {name: 'automember', label: IPA.messages.tabs.automember, children: [ { name: 'amgroup', entity: 'automember', - facet: 'searchgroup', label: 'User group rules'}, //TODO: translate + facet: 'searchgroup', label: IPA.messages.objects.automember.usergrouprules}, { name: 'amhostgroup', entity: 'automember', - facet: 'searchhostgroup', label: 'Host group rules'} //TODO: translate + facet: 'searchhostgroup', label: IPA.messages.objects.automember.hostgrouprules} ]} ]}, {name: 'ipaserver', label: IPA.messages.tabs.ipaserver, children: [ |