mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 21:33:12 +00:00
Don't show warning for untranslated text that start with '!' on widgets
This commit is contained in:
parent
9da4b76976
commit
c73d745245
@ -418,10 +418,10 @@
|
||||
pref="scripts.show_run_script_alert" />
|
||||
<hbox>
|
||||
<label text="@.image_format_alerts" />
|
||||
<check id="gif_options_alert" text="gif" pref="gif.show_alert" />
|
||||
<check id="jpeg_options_alert" text="jpeg" pref="jpeg.show_alert" />
|
||||
<check id="svg_options_alert" text="svg" pref="svg.show_alert" />
|
||||
<check id="tga_options_alert" text="tga" pref="tga.show_alert" />
|
||||
<check id="gif_options_alert" text="!gif" pref="gif.show_alert" />
|
||||
<check id="jpeg_options_alert" text="!jpeg" pref="jpeg.show_alert" />
|
||||
<check id="svg_options_alert" text="!svg" pref="svg.show_alert" />
|
||||
<check id="tga_options_alert" text="!tga" pref="tga.show_alert" />
|
||||
</hbox>
|
||||
<separator horizontal="true" />
|
||||
<hbox>
|
||||
|
@ -21,12 +21,14 @@ std::string XmlTranslator::operator()(const TiXmlElement* elem,
|
||||
const char* value = elem->Attribute(attrName);
|
||||
if (!value)
|
||||
return std::string();
|
||||
else if (value[0] == '@') {
|
||||
else if (value[0] == '@') { // Translate string
|
||||
if (value[1] == '.')
|
||||
return Strings::instance()->translate((m_stringIdPrefix + (value+1)).c_str());
|
||||
else
|
||||
return Strings::instance()->translate(value+1);
|
||||
}
|
||||
else if (value[0] == '!') // Raw string
|
||||
return std::string(value+1);
|
||||
else
|
||||
return std::string(value);
|
||||
}
|
||||
|
@ -210,7 +210,8 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (has_alpha_char(text) &&
|
||||
else if (text[0] != '!' &&
|
||||
has_alpha_char(text) &&
|
||||
!is_email(text)) {
|
||||
std::cerr << elem->GetDocument()->Value() << ":"
|
||||
<< elem->Row() << ":"
|
||||
|
Loading…
x
Reference in New Issue
Block a user