Fixed label capitalization

The CSS text-transform sometimes produces incorrect capitalization,
so the code has been modified to use translated labels that already
contain the correct capitalization.

Ticket #1424
This commit is contained in:
Endi S. Dewata 2011-07-13 21:10:47 -05:00 committed by Adam Young
parent a746c613a4
commit 4bd85ceb90
33 changed files with 333 additions and 87 deletions

View File

@ -507,7 +507,7 @@ IPA.association_table_widget = function (spec) {
var label = IPA.metadata.objects[that.other_entity].label;
var title = IPA.messages.association.add;
title = title.replace('${entity}', that.entity_name);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', label);
@ -571,7 +571,6 @@ IPA.association_table_widget = function (spec) {
if (!selected_values.length) {
var message = IPA.messages.dialogs.remove_empty;
message = message.replace('${entity}', that.label);
alert(message);
return;
}
@ -580,7 +579,7 @@ IPA.association_table_widget = function (spec) {
var label = IPA.metadata.objects[that.other_entity].label;
var title = IPA.messages.association.remove;
title = title.replace('${entity}', that.entity_name);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', label);
@ -896,7 +895,7 @@ IPA.association_facet = function (spec) {
var label = IPA.metadata.objects[that.other_entity] ? IPA.metadata.objects[that.other_entity].label : that.other_entity;
var title = IPA.messages.association.add;
title = title.replace('${entity}', that.entity_name);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', label);
@ -948,7 +947,6 @@ IPA.association_facet = function (spec) {
if (!values.length) {
var message = IPA.messages.dialogs.remove_empty;
message = message.replace('${entity}', label);
alert(message);
return;
}
@ -956,7 +954,7 @@ IPA.association_facet = function (spec) {
var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
var title = IPA.messages.association.remove;
title = title.replace('${entity}', that.entity_name);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', label);

View File

@ -845,7 +845,7 @@ IPA.hbacrule_accesstime_widget = function(spec) {
var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
var title = IPA.messages.association.add;
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', that.label);
@ -947,14 +947,13 @@ IPA.hbacrule_accesstime_widget = function(spec) {
var title;
if (!values.length) {
title = IPA.messages.dialogs.remove_empty;
title = title.replace('${entity}', that.label);
alert(title);
return;
}
var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
title = IPA.messages.association.remove;
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label);
title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', that.label);

View File

@ -285,7 +285,7 @@ IPA.host_provisioning_status_widget = function (spec) {
that.show_unprovision_dialog = function() {
var label = IPA.metadata.objects[that.entity_name].label;
var label = IPA.metadata.objects[that.entity_name].label_singular;
var title = IPA.messages.objects.host.unprovision_title;
title = title.replace('${entity}', label);
@ -378,7 +378,7 @@ IPA.host_certificate_status_widget = function (spec) {
that.init = function() {
that.entity_label = IPA.metadata.objects[that.entity_name].label;
that.entity_label = IPA.metadata.objects[that.entity_name].label_singular;
that.get_entity_pkey = function(result) {
var values = result['fqdn'];

View File

@ -459,6 +459,7 @@ div.tabs {
.facet-pkey {
color:black;
text-transform: none;
}
.breadcrumb {
@ -948,10 +949,6 @@ a {
/* ---- Dialog ---- */
.ui-dialog .ui-dialog-title {
text-transform: capitalize;
}
.ui-dialog .ui-dialog-titlebar-close span {
background-color: transparent !important;
}

View File

@ -193,7 +193,6 @@ IPA.search_facet = function(spec) {
var title;
if (!values.length) {
title = IPA.messages.dialogs.remove_empty;
title = title.replace('${entity}', label);
alert(title);
return;
}

View File

@ -266,7 +266,7 @@ IPA.service_provisioning_status_widget = function (spec) {
that.unprovision = function() {
var label = IPA.metadata.objects[that.entity_name].label;
var label = IPA.metadata.objects[that.entity_name].label_singular;
var title = IPA.messages.objects.service.unprovision_title;
title = title.replace('${entity}', label);
@ -323,7 +323,7 @@ IPA.service_certificate_status_widget = function (spec) {
that.init = function() {
that.entity_label = IPA.metadata.objects[that.entity_name].label;
that.entity_label = IPA.metadata.objects[that.entity_name].label_singular;
that.get_entity_pkey = function(result) {
var values = result['krbprincipalname'];

View File

@ -709,7 +709,6 @@ IPA.sudo.options_section = function(spec) {
if (!values.length) {
var message = IPA.messages.dialogs.remove_empty;
message = message.replace('${entity}', label);
alert(message);
return;
}

File diff suppressed because it is too large Load Diff

View File

@ -188,7 +188,7 @@ class automountlocation(LDAPObject):
object_class = ['nscontainer']
default_attributes = ['cn']
label = _('Automount Locations')
label_singular = _('automount location')
label_singular = _('Automount Location')
takes_params = (
Str('cn',
@ -513,7 +513,7 @@ class automountmap(LDAPObject):
)
label = _('Automount Maps')
label_singular = _('automount map')
label_singular = _('Automount Map')
api.register(automountmap)
@ -605,7 +605,7 @@ class automountkey(LDAPObject):
num_parents = 2
label = _('Automount Keys')
label_singular = _('automount key')
label_singular = _('Automount Key')
already_exists_msg = _('The key,info pair must be unique. A key named %(key)s with info %(info)s already exists')
key_already_exists_msg = _('key named %(key)s already exists')
object_not_found_msg = _('The automount key %(key)s with info %(info)s does not exist')

View File

@ -280,7 +280,7 @@ class LDAPObject(Object):
),
}
label = _('Entry')
label_singular = _('entry')
label_singular = _('Entry')
container_not_found_msg = _('container entry (%(container)s) not found')
parent_not_found_msg = _('%(parent)s: %(oname)s not found')

View File

@ -90,7 +90,7 @@ class config(LDAPObject):
]
label = _('Configuration')
label_singular = _('configuration')
label_singular = _('Configuration')
takes_params = (
Int('ipamaxusernamelength?',

View File

@ -100,7 +100,7 @@ class delegation(Object):
object_name = _('delegation')
object_name_plural = _('delegations')
label = _('Delegations')
label_singular = _('delegation')
label_singular = _('Delegation')
takes_params = (
Str('aciname',

View File

@ -286,7 +286,7 @@ class dnszone(LDAPObject):
'idnssoaminimum'
] + _record_attributes
label = _('DNS Zones')
label_singular = _('DNS zone')
label_singular = _('DNS Zone')
takes_params = (
Str('idnsname',
@ -544,7 +544,7 @@ class dnsrecord(LDAPObject):
default_attributes = _record_attributes + ['idnsname']
label = _('DNS Resource Records')
label_singular = _('DNS resource record')
label_singular = _('DNS Resource Record')
takes_params = (
Str('idnsname',

View File

@ -187,7 +187,7 @@ class entitle(LDAPObject):
uuid_attribute = 'ipaentitlementid'
label = _('Entitlements')
label_singular = _('entitlement')
label_singular = _('Entitlement')
"""
def get_dn(self, *keys, **kwargs):

View File

@ -98,7 +98,7 @@ class group(LDAPObject):
rdnattr = 'cn'
label = _('User Groups')
label_singular = _('user group')
label_singular = _('User Group')
takes_params = (
Str('cn',

View File

@ -124,7 +124,7 @@ class hbacrule(LDAPObject):
}
label = _('HBAC Rules')
label_singular = _('HBAC rule')
label_singular = _('HBAC Rule')
takes_params = (
Str('cn',

View File

@ -59,7 +59,7 @@ class hbacsvc(LDAPObject):
uuid_attribute = 'ipauniqueid'
label = _('HBAC Services')
label_singular = _('HBAC service')
label_singular = _('HBAC Service')
takes_params = (
Str('cn',

View File

@ -62,7 +62,7 @@ class hbacsvcgroup(LDAPObject):
}
label = _('HBAC Service Groups')
label_singular = _('HBAC service group')
label_singular = _('HBAC Service Group')
takes_params = (
Str('cn',

View File

@ -244,7 +244,7 @@ class host(LDAPObject):
}
label = _('Hosts')
label_singular = _('host')
label_singular = _('Host')
takes_params = (
Str('fqdn', validate_host,

View File

@ -71,7 +71,7 @@ class hostgroup(LDAPObject):
}
label = _('Host Groups')
label_singular = _('host group')
label_singular = _('Host Group')
takes_params = (
Str('cn',

View File

@ -348,7 +348,7 @@ class i18n_messages(Command):
"dirty_message":_("This page has unsaved changes. Please save or revert."),
"dirty_title":_("Dirty"),
"hide_already_enrolled":_("Hide already enrolled."),
"remove_empty":_("Select ${entity} to be removed."),
"remove_empty":_("Select entries to be removed."),
"remove_title":_("Remove ${entity}"),
"prospective":_("Prospective"),
},

View File

@ -77,7 +77,7 @@ class krbtpolicy(LDAPObject):
limit_object_classes = ['krbticketpolicyaux']
label=_('Kerberos Ticket Policy')
label_singular = _('Kerberos ticket policy')
label_singular = _('Kerberos Ticket Policy')
takes_params = (
Str('uid?',

View File

@ -96,7 +96,7 @@ class netgroup(LDAPObject):
}
label = _('Netgroups')
label_singular = _('netgroup')
label_singular = _('Netgroup')
takes_params = (
Str('cn',

View File

@ -105,7 +105,7 @@ class permission(LDAPObject):
rdnattr='cn'
label = _('Permissions')
label_singular = _('permission')
label_singular = _('Permission')
takes_params = (
Str('cn',

View File

@ -63,7 +63,7 @@ class privilege(LDAPObject):
rdnattr='cn'
label = _('Privileges')
label_singular = _('privilege')
label_singular = _('Privilege')
takes_params = (
Str('cn',

View File

@ -217,7 +217,7 @@ class pwpolicy(LDAPObject):
)
label = _('Password Policies')
label_singular = _('password policy')
label_singular = _('Password Policy')
takes_params = (
Str('cn?',

View File

@ -79,7 +79,7 @@ class role(LDAPObject):
rdnattr='cn'
label = _('Roles')
label_singular = _('role')
label_singular = _('Role')
takes_params = (
Str('cn',

View File

@ -73,7 +73,7 @@ class selfservice(Object):
object_name = _('self service permission')
object_name_plural = _('self service permissions')
label = _('Self Service Permissions')
label_singular = _('self service permission')
label_singular = _('Self Service Permission')
takes_params = (
Str('aciname',

View File

@ -218,7 +218,7 @@ class service(LDAPObject):
}
label = _('Services')
label_singular = _('service')
label_singular = _('Service')
takes_params = (
Str('krbprincipalname', validate_principal,

View File

@ -62,7 +62,7 @@ class sudocmd(LDAPObject):
}
uuid_attribute = 'ipauniqueid'
label = _('Sudo Commands')
label_singular = _('sudo command')
label_singular = _('Sudo Command')
takes_params = (
Str('sudocmd',

View File

@ -63,7 +63,7 @@ class sudocmdgroup(LDAPObject):
}
label = _('Sudo Command Groups')
label_singular = _('sudo command group')
label_singular = _('Sudo Command Group')
takes_params = (
Str('cn',

View File

@ -66,7 +66,7 @@ class sudorule(LDAPObject):
}
label = _('Sudo Rules')
label_singular = _('sudo rule')
label_singular = _('Sudo Rule')
takes_params = (
Str('cn',

View File

@ -114,8 +114,8 @@ class user(LDAPObject):
rdnattr = 'uid'
bindable = True
label_singular = _('user')
label = _('Users')
label_singular = _('User')
takes_params = (
Str('uid',