Use underscores instead of spaces for all internal names. And renamed some script functions at the same time.

* cannocial_name_form now outputs "_", where it used to use " "
* this simplifies reflectio and scripting code, because now C++ names are also MSE internal names
* added 'caption' property to fields. This is used instead of the name in NativeLookEditor, since the latter will now contain underscores.
* renamed text related script functions for consistency, since we were touching that part of the code anyway.
This commit is contained in:
Twan van Laarhoven
2020-04-22 23:33:06 +02:00
parent be4bb8d8ed
commit 713a9e4a40
33 changed files with 240 additions and 197 deletions
+4 -4
View File
@@ -96,8 +96,8 @@ SCRIPT_FUNCTION(check_spelling) {
assert_tagged(input);
if (!settings.stylesheetSettingsFor(*stylesheet).card_spellcheck_enabled)
SCRIPT_RETURN(input);
SCRIPT_OPTIONAL_PARAM_N_(String,_("extra dictionary"),extra_dictionary);
SCRIPT_OPTIONAL_PARAM_N_(ScriptValueP,_("extra match"),extra_match);
SCRIPT_OPTIONAL_PARAM_(String, extra_dictionary);
SCRIPT_OPTIONAL_PARAM_(ScriptValueP, extra_match);
// remove old spelling error tags
input = remove_tag(input, _("<error-spelling"));
// no language -> spelling checking
@@ -176,6 +176,6 @@ SCRIPT_FUNCTION(check_spelling_word) {
// ----------------------------------------------------------------------------- : Init
void init_script_spelling_functions(Context& ctx) {
ctx.setVariable(_("check spelling"), script_check_spelling);
ctx.setVariable(_("check spelling word"), script_check_spelling_word);
ctx.setVariable(_("check_spelling"), script_check_spelling);
ctx.setVariable(_("check_spelling_word"), script_check_spelling_word);
}