summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-01-19 17:04:06 +0100
committerkobewi <kobewi4e@gmail.com>2022-01-19 17:04:06 +0100
commit74d08a305e84b4636e14c0fb1d711346a2b8975f (patch)
treea25b077f48c4bca334fa1eae3eea0a10e608c9e0 /scene
parent249c60e9d1aacd07d87786db8059f30aed02bb68 (diff)
Fix FileDialog localization issues
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/file_dialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 44ef641cb8..e5bd6f4882 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -110,6 +110,9 @@ void FileDialog::_notification(int p_what) {
show_hidden->set_icon(vbox->get_theme_icon(SNAME("toggle_hidden"), SNAME("FileDialog")));
_theme_changed();
}
+ if (p_what == NOTIFICATION_TRANSLATION_CHANGED) {
+ update_filters();
+ }
}
void FileDialog::unhandled_input(const Ref<InputEvent> &p_event) {
@@ -638,7 +641,7 @@ void FileDialog::update_filters() {
all_filters += ", ...";
}
- filter->add_item(String(TTRC("All Recognized")) + " (" + all_filters + ")");
+ filter->add_item(RTR("All Recognized") + " (" + all_filters + ")");
}
for (int i = 0; i < filters.size(); i++) {
String flt = filters[i].get_slice(";", 0).strip_edges();
@@ -650,7 +653,7 @@ void FileDialog::update_filters() {
}
}
- filter->add_item(TTRC("All Files (*)"));
+ filter->add_item(RTR("All Files") + " (*)");
}
void FileDialog::clear_filters() {