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:
Stanislav Levin authored and Serhii Tsymbaliuk committed 2018-10-01 10:28:14 +02:00
1 parent 4b60bc3814
commit 234c71ca81
2 files changed
+2 -6

No files matched your search

+1 -5
View File
@@ -709,11 +709,7 @@ exp.entity_builder = IPA.entity_builder = function(entity) {
spec.$factory = spec.$factory || IPA.entity_adder_dialog;
spec.name = spec.name || 'add';
if (!spec.title) {
var title = text.get('@i18n:dialogs.add_title');
var label = entity.metadata.label_singular;
spec.title = title.replace('${entity}', label);
}
spec.title = spec.title || text.get('@i18n:dialogs.add_title_default');
return that.dialog(spec);
};
+1 -1
View File
@@ -264,7 +264,7 @@ class i18n_messages(Command):
"dialogs": {
"add_confirmation": _("${entity} successfully added"),
"add_custom_value": _("Add custom value"),
"add_title": _("Add ${entity}"),
"add_title_default": _("Add"),
"available": _("Available"),
"batch_error_message": _("Some operations failed."),
"batch_error_title": _("Operations Error"),