Improve POT generator
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user