mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
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:
+5
-2
@@ -89,9 +89,12 @@ String warn_and_identity(const String& key) {
|
||||
queue_message(MESSAGE_WARNING, _("Missing key in locale: ") + key);
|
||||
return key;
|
||||
}
|
||||
String identity(const String& key) {
|
||||
return key;
|
||||
}
|
||||
|
||||
String SubLocale::tr(const String& key, DefaultLocaleFun def) {
|
||||
map<String,String>::const_iterator it = translations.find(key);
|
||||
map<String,String>::const_iterator it = translations.find(canonical_name_form(key));
|
||||
if (it == translations.end()) {
|
||||
return def(key);
|
||||
} else {
|
||||
@@ -99,7 +102,7 @@ String SubLocale::tr(const String& key, DefaultLocaleFun def) {
|
||||
}
|
||||
}
|
||||
String SubLocale::tr(const String& subcat, const String& key, DefaultLocaleFun def) {
|
||||
map<String,String>::const_iterator it = translations.find(subcat + _(" ") + key);
|
||||
map<String,String>::const_iterator it = translations.find(subcat + _("_") + canonical_name_form(key));
|
||||
if (it == translations.end()) {
|
||||
return def(key);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user