mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
enlgish language stuff for keywords
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@264 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -405,8 +405,12 @@ String KeywordDatabase::expand(const String& text,
|
||||
ctx.setVariable(_("input"), to_script(part));
|
||||
param = kwp.script.invoke(ctx)->toString();
|
||||
}
|
||||
part = _("<param-") + kwp.name + _(">") + part + _("</param-") + kwp.name + _(">");
|
||||
param = _("<param-") + kwp.name + _(">") + param + _("</param-") + kwp.name + _(">");
|
||||
String param_type = replace_all(replace_all(replace_all(kwp.name,
|
||||
_("("),_("-")),
|
||||
_(")"),_("-")),
|
||||
_(" "),_("-"));
|
||||
part = _("<param-") + param_type + _(">") + part + _("</param-") + param_type + _(">");
|
||||
param = _("<param-") + param_type + _(">") + param + _("</param-") + param_type + _(">");
|
||||
ctx.setVariable(String(_("param")) << (int)(j/2), to_script(param));
|
||||
}
|
||||
total += part;
|
||||
|
||||
+12
-2
@@ -16,9 +16,18 @@
|
||||
DECLARE_POINTER_TYPE(KeywordParam);
|
||||
DECLARE_POINTER_TYPE(KeywordMode);
|
||||
DECLARE_POINTER_TYPE(Keyword);
|
||||
DECLARE_POINTER_TYPE(ParamReferenceType);
|
||||
class KeywordTrie;
|
||||
|
||||
// ----------------------------------------------------------------------------- : Keyword components
|
||||
// ----------------------------------------------------------------------------- : Keyword parameters
|
||||
|
||||
class ParamReferenceType {
|
||||
String name; ///< Name of the parameter reference type
|
||||
String description; ///< Description (for status bar)
|
||||
StringScript code; ///< Code to insert into the reminder text script, input is the actual parameter name
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
/// Parameter type of keywords
|
||||
class KeywordParam {
|
||||
@@ -30,7 +39,8 @@ class KeywordParam {
|
||||
bool optional; ///< Can this parameter be left out (a placeholder is then used)
|
||||
String match; ///< Regular expression to match
|
||||
OptionalScript script; ///< Transformation of the value for showing in the reminder text
|
||||
String example; ///< Example for preview dialog
|
||||
String example; ///< Example for the keyword editor
|
||||
vector<ParamReferenceTypeP> refer_script;///< Way to refer to a parameter from the reminder text script
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@ IndexMap<FieldP, ValueP>& Set::stylingDataFor(const StyleSheet& stylesheet) {
|
||||
if (!styling) {
|
||||
styling = new_shared<Styling>();
|
||||
styling->data.init(stylesheet.styling_fields);
|
||||
} else if (!styling->unread_data.empty()) {
|
||||
} else if (!styling->unread_data.empty() || (styling->data.empty()) && !stylesheet.styling_fields.empty()) {
|
||||
// we delayed the reading of the data, read it now
|
||||
styling->data.init(stylesheet.styling_fields);
|
||||
Reader reader(new_shared1<wxStringInputStream>(styling->unread_data), _("styling data of ") + stylesheet.stylesheetName());
|
||||
|
||||
Reference in New Issue
Block a user