summaryrefslogtreecommitdiffstats
path: root/install/ui/webui.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-01-25 19:39:08 -0500
committerAdam Young <ayoung@redhat.com>2011-01-26 10:07:21 -0500
commit2b8cdb2c8d2dc2d115a120604267de7ad54e2c7c (patch)
treef03bef3aac100ad4b6f5cca8d410d7ef00221fa5 /install/ui/webui.js
parent6cca48cb59951db833ac517aaa1274c19e40c8d8 (diff)
downloadfreeipa-2b8cdb2c8d2dc2d115a120604267de7ad54e2c7c.tar.gz
freeipa-2b8cdb2c8d2dc2d115a120604267de7ad54e2c7c.tar.xz
freeipa-2b8cdb2c8d2dc2d115a120604267de7ad54e2c7c.zip
Tab I18N
Makes the values for the Top level tabs internationizable, and no longer just passes through their names Also uses the I18N values for SUDO and HBAC as the static text in the Action p[anel title
Diffstat (limited to 'install/ui/webui.js')
-rw-r--r--install/ui/webui.js80
1 files changed, 41 insertions, 39 deletions
diff --git a/install/ui/webui.js b/install/ui/webui.js
index 1f45f0b1e..b1097f63a 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -26,43 +26,46 @@
/* tabs definition for IPA webUI */
-var admin_tab_set = [
- {name:'identity', children:[
- {name:'user', entity:'user'},
- {name:'group', entity:'group'},
- {name:'host', entity:'host'},
- {name:'hostgroup', entity:'hostgroup'},
- {name:'netgroup', entity:'netgroup'},
- {name:'service', entity:'service'}
- ]},
- {name:'policy', children:[
- {name:'dnszone', entity:'dnszone'},
- {name:'hbacrule', entity:'hbacrule', children:[
- {name:'hbacsvc', entity:'hbacsvc'},
- {name:'hbacsvcgroup', entity:'hbacsvcgroup'}
+IPA.admin_tab_set = function () {
+ return [
+ {name:'identity', label: IPA.messages.tabs.identity, children:[
+ {name:'user', entity:'user'},
+ {name:'group', entity:'group'},
+ {name:'host', entity:'host'},
+ {name:'hostgroup', entity:'hostgroup'},
+ {name:'netgroup', entity:'netgroup'},
+ {name:'service', entity:'service'}
]},
- {name:'sudorule', entity:'sudorule',children:[
- {name:'sudocmd', entity:'sudocmd'},
- {name:'sudocmdgroup', entity:'sudocmdgroup'}
+ {name:'policy', label: IPA.messages.tabs.policy, children:[
+ {name:'dnszone', entity:'dnszone'},
+ {name:'hbacrule', label: IPA.messages.tabs.hbac ,
+ entity:'hbacrule', children:[
+ {name:'hbacsvc', entity:'hbacsvc'},
+ {name:'hbacsvcgroup', entity:'hbacsvcgroup'}
+ ]},
+ {name:'sudorule', label: IPA.messages.tabs.sudo,
+ entity:'sudorule',children:[
+ {name:'sudocmd', entity:'sudocmd'},
+ {name:'sudocmdgroup', entity:'sudocmdgroup'}
+ ]},
+ {name:'pwpolicy', entity:'pwpolicy'},
+ {name:'krbtpolicy', entity:'krbtpolicy'}
]},
- {name:'pwpolicy', entity:'pwpolicy'},
- {name:'krbtpolicy', entity:'krbtpolicy'}
- ]},
- {name:'ipaserver', children: [
- {name:'role',entity:'role' ,children:[
- {name:'privilege',entity:'privilege' },
- {name:'permission', entity:'permission'}
- ]},
- {name:'selfservice' ,entity:'selfservice'},
- {name:'delegation' ,entity:'delegation'},
- {name:'config', entity:'config'}
- ]}
-];
+ {name:'ipaserver', label: IPA.messages.tabs.ipaserver, children: [
+ {name:'role',entity:'role' ,children:[
+ {name:'privilege',entity:'privilege' },
+ {name:'permission', entity:'permission'}
+ ]},
+ {name:'selfservice' ,entity:'selfservice'},
+ {name:'delegation' ,entity:'delegation'},
+ {name:'config', entity:'config'}
+ ]}];
+};
-var self_serv_tab_set =
- [
- { name:'identity', children: [
- {name:'user', entity:'user'}]}];
+IPA.self_serv_tab_set = function(){
+ return [ { name:'identity',
+ children: [ {name:'user', entity:'user'}]}];
+};
IPA.tab_state = function(entity_name){
@@ -133,11 +136,11 @@ $(function() {
var navigation = $('#navigation');
if (should_show_all_ui()){
- IPA.tab_set = admin_tab_set;
- nav_create(admin_tab_set, navigation, 'tabs');
+ IPA.tab_set = IPA.admin_tab_set();
+ nav_create(IPA.tab_set, navigation, 'tabs');
} else {
- IPA.tab_set = self_serv_tab_set;
- nav_create(self_serv_tab_set, navigation, 'tabs');
+ IPA.tab_set = self_serv_tab_set();
+ nav_create(IPA.tab_set, navigation, 'tabs');
var state = {'user-pkey':IPA.whoami_pkey ,
'user-facet': $.bbq.getState('user-facet') ||
@@ -169,4 +172,3 @@ function window_hashchange(evt){
function unimplemented_tab(jobj){
jobj.text('Not implemented yet!');
}
-