mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Drop concatenated title of 'add' dialog
As for now the default title of 'add' dialog is set to something like 'Add ${entity}', where 'entity' is also translatable text. Such construction is used via method 'adder_dialog' of Entity for the all 'Add' actions. This 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/7707 Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
parent
4b60bc3814
commit
234c71ca81
@ -709,11 +709,7 @@ exp.entity_builder = IPA.entity_builder = function(entity) {
|
|||||||
spec.$factory = spec.$factory || IPA.entity_adder_dialog;
|
spec.$factory = spec.$factory || IPA.entity_adder_dialog;
|
||||||
spec.name = spec.name || 'add';
|
spec.name = spec.name || 'add';
|
||||||
|
|
||||||
if (!spec.title) {
|
spec.title = spec.title || text.get('@i18n:dialogs.add_title_default');
|
||||||
var title = text.get('@i18n:dialogs.add_title');
|
|
||||||
var label = entity.metadata.label_singular;
|
|
||||||
spec.title = title.replace('${entity}', label);
|
|
||||||
}
|
|
||||||
|
|
||||||
return that.dialog(spec);
|
return that.dialog(spec);
|
||||||
};
|
};
|
||||||
|
@ -264,7 +264,7 @@ class i18n_messages(Command):
|
|||||||
"dialogs": {
|
"dialogs": {
|
||||||
"add_confirmation": _("${entity} successfully added"),
|
"add_confirmation": _("${entity} successfully added"),
|
||||||
"add_custom_value": _("Add custom value"),
|
"add_custom_value": _("Add custom value"),
|
||||||
"add_title": _("Add ${entity}"),
|
"add_title_default": _("Add"),
|
||||||
"available": _("Available"),
|
"available": _("Available"),
|
||||||
"batch_error_message": _("Some operations failed."),
|
"batch_error_message": _("Some operations failed."),
|
||||||
"batch_error_title": _("Operations Error"),
|
"batch_error_title": _("Operations Error"),
|
||||||
|
Loading…
Reference in New Issue
Block a user