mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 13:49:54 +00:00
Improve POT generator
This commit is contained in:
parent
b79fe2e020
commit
8179eb6f9b
2 changed files with 4 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path,
|
|||
if (EditorTranslationParser::get_singleton()->can_parse(extension)) {
|
||||
EditorTranslationParser::get_singleton()->get_parser(extension)->parse_file(s->get_path(), r_translations);
|
||||
}
|
||||
} else if (node_type == "FileDialog" && property_name == "filters") {
|
||||
} else if ((node_type == "FileDialog" || node_type == "EditorFileDialog") && property_name == "filters") {
|
||||
// Extract FileDialog's filters property with values in format "*.png ; PNG Images","*.gd ; GDScript Files".
|
||||
Vector<String> str_values = property_value;
|
||||
for (int k = 0; k < str_values.size(); k++) {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ TranslationTemplateGenerator::MessageMap TranslationTemplateGenerator::parse(con
|
|||
|
||||
for (const Vector<String> &entry : parsed_from_file) {
|
||||
ERR_CONTINUE(entry.is_empty());
|
||||
if (entry[0].is_empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const String &msgctxt = (entry.size() > 1) ? entry[1] : String();
|
||||
const String &msgid_plural = (entry.size() > 2) ? entry[2] : String();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue