Do not convert a title word to the lower case

Japanese marketing wish to keep "Playbook" as the title format.
The idea is if the translations of "playbook" and "Playbook" are
same, do not convert the title word to the lower case.

Signed-off-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
This commit is contained in:
Takao Fujiwara 2017-05-24 12:13:58 +09:00
parent f3a8042b1a
commit 1c81b5fe6e

View File

@ -1094,8 +1094,13 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += ">\n";
if(!field.multiSelect && !field.disableChooseOption){
html += "<option value=\"\">";
// Add a custom default select 'value' (default text)
html += (field.defaultText) ? field.defaultText : i18n.sprintf(i18n._("Choose a %s"), field.label.toLowerCase());
// some languages use "Playbook" as a proper noun
var chosen_item = field.label;
if (i18n._("playbook") !== i18n._("Playbook")) {
chosen_item = label.toLowerCase();
}
// Add a custom default select 'value' (default text)
html += (field.defaultText) ? field.defaultText : i18n.sprintf(i18n._("Choose a %s"), chosen_item);
html += "</option>\n";
}