mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Drop concatenated title of remove dialog
As for now the default title of remove dialogs, which are initialized from 'association' facet, is set to something like 'Remove ${other_entity} from ${entity} ${primary_key}', where 'other_entity' and 'entity' are also translatable texts. This construction is used via method 'show_remove_dialog' of 'association' facet for the all 'Delete' actions within details of entities. Such concatenation leads to a bad quality translation and should be changed to an entire sentence. From now a mentioned title is taken from a spec and should be specified explicitly. Fixes: https://pagure.io/freeipa/issue/7702 Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
parent
288fe328d3
commit
ca68848ea4
@ -454,7 +454,7 @@ IPA.association_table_widget = function (spec) {
|
||||
|
||||
that.read_only = spec.read_only === undefined ? false : spec.read_only;
|
||||
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.remove_title = text.get(spec.remove_title);
|
||||
|
||||
that.adder_columns = $.ordered_map();
|
||||
|
||||
@ -931,7 +931,8 @@ exp.association_facet_pre_op = function(spec, context) {
|
||||
}
|
||||
|
||||
spec.add_title = '@i18n:association.add.'+spec.attribute_member;
|
||||
spec.remove_title = '@i18n:association.remove.'+spec.attribute_member;
|
||||
spec.remove_title = spec.remove_title ||
|
||||
'@i18n:association.remove_title_default';
|
||||
|
||||
spec.facet_group = spec.facet_group || spec.attribute_member;
|
||||
|
||||
@ -1049,7 +1050,7 @@ exp.association_facet = IPA.association_facet = function (spec, no_init) {
|
||||
that.remove_method = spec.remove_method || '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.remove_title = text.get(spec.remove_title);
|
||||
|
||||
that.adder_columns = $.ordered_map();
|
||||
|
||||
@ -1272,14 +1273,10 @@ exp.association_facet = IPA.association_facet = function (spec, no_init) {
|
||||
return;
|
||||
}
|
||||
|
||||
var entity_label = that.entity.metadata.label_singular;
|
||||
var pkey = that.get_pkey();
|
||||
var other_entity_label = that.other_entity.metadata.label;
|
||||
|
||||
var title = that.remove_title;
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', pkey);
|
||||
title = title.replace('${other_entity}', other_entity_label);
|
||||
|
||||
var dialog = IPA.association_deleter_dialog({
|
||||
title: title,
|
||||
|
@ -184,15 +184,7 @@ class i18n_messages(Command):
|
||||
"indirect_membership": _("Indirect Membership"),
|
||||
"no_entries": _("No entries."),
|
||||
"paging": _("Showing ${start} to ${end} of ${total} entries."),
|
||||
"remove": {
|
||||
"ipasudorunas": _("Remove RunAs ${other_entity} from ${entity} ${primary_key}"),
|
||||
"ipasudorunasgroup": _("Remove RunAs Groups from ${entity} ${primary_key}"),
|
||||
"managedby": _("Remove ${other_entity} Managing ${entity} ${primary_key}"),
|
||||
"member": _("Remove ${other_entity} from ${entity} ${primary_key}"),
|
||||
"memberallowcmd": _("Remove Allow ${other_entity} from ${entity} ${primary_key}"),
|
||||
"memberdenycmd": _("Remove Deny ${other_entity} from ${entity} ${primary_key}"),
|
||||
"memberof": _("Remove ${entity} ${primary_key} from ${other_entity}"),
|
||||
},
|
||||
"remove_title_default": _("Remove"),
|
||||
"removed": _("${count} item(s) removed"),
|
||||
"show_results": _("Show Results"),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user