Skip to content

Commit 8179eb6

Browse files
committed
Improve POT generator
1 parent b79fe2e commit 8179eb6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

editor/translations/packed_scene_translation_parser_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path,
178178
if (EditorTranslationParser::get_singleton()->can_parse(extension)) {
179179
EditorTranslationParser::get_singleton()->get_parser(extension)->parse_file(s->get_path(), r_translations);
180180
}
181-
} else if (node_type == "FileDialog" && property_name == "filters") {
181+
} else if ((node_type == "FileDialog" || node_type == "EditorFileDialog") && property_name == "filters") {
182182
// Extract FileDialog's filters property with values in format "*.png ; PNG Images","*.gd ; GDScript Files".
183183
Vector<String> str_values = property_value;
184184
for (int k = 0; k < str_values.size(); k++) {

editor/translations/template_generator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ TranslationTemplateGenerator::MessageMap TranslationTemplateGenerator::parse(con
4747

4848
for (const Vector<String> &entry : parsed_from_file) {
4949
ERR_CONTINUE(entry.is_empty());
50+
if (entry[0].is_empty()) {
51+
continue;
52+
}
5053

5154
const String &msgctxt = (entry.size() > 1) ? entry[1] : String();
5255
const String &msgid_plural = (entry.size() > 2) ? entry[2] : String();

0 commit comments

Comments
 (0)