Merge pull request #58774 from timothyqiu/file-dialog-filter-i18n-3.x
[3.x] Make name of editor file dialog filters translatable
This commit is contained in:
commit
56310caee2
|
@ -1345,7 +1345,7 @@ EditorAudioBuses::EditorAudioBuses() {
|
|||
List<String> ext;
|
||||
ResourceLoader::get_recognized_extensions_for_type("AudioBusLayout", &ext);
|
||||
for (List<String>::Element *E = ext.front(); E; E = E->next()) {
|
||||
file_dialog->add_filter("*." + E->get() + "; Audio Bus Layout");
|
||||
file_dialog->add_filter(vformat("*.%s; %s", E->get(), TTR("Audio Bus Layout")));
|
||||
}
|
||||
add_child(file_dialog);
|
||||
file_dialog->connect("file_selected", this, "_file_dialog_callback");
|
||||
|
|
|
@ -160,7 +160,7 @@ BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) {
|
|||
|
||||
file_dialog = memnew(EditorFileDialog);
|
||||
file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
|
||||
file_dialog->add_filter("*.lmbake ; LightMap Bake");
|
||||
file_dialog->add_filter("*.lmbake ; " + TTR("LightMap Bake"));
|
||||
file_dialog->set_title(TTR("Select lightmap bake file:"));
|
||||
file_dialog->connect("file_selected", this, "_bake_select_file");
|
||||
bake->add_child(file_dialog);
|
||||
|
|
|
@ -1881,7 +1881,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog() {
|
|||
List<String> ext;
|
||||
ResourceLoader::get_recognized_extensions_for_type("Theme", &ext);
|
||||
for (List<String>::Element *E = ext.front(); E; E = E->next()) {
|
||||
import_another_theme_dialog->add_filter("*." + E->get() + "; Theme Resource");
|
||||
import_another_theme_dialog->add_filter(vformat("*.%s; %s", E->get(), TTR("Theme Resource")));
|
||||
}
|
||||
import_another_file_hb->add_child(import_another_theme_dialog);
|
||||
import_another_theme_dialog->connect("file_selected", this, "_select_another_theme_cbk");
|
||||
|
@ -3281,7 +3281,7 @@ ThemeEditor::ThemeEditor() {
|
|||
List<String> ext;
|
||||
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &ext);
|
||||
for (List<String>::Element *E = ext.front(); E; E = E->next()) {
|
||||
preview_scene_dialog->add_filter("*." + E->get() + "; Scene");
|
||||
preview_scene_dialog->add_filter(vformat("*.%s; %s", E->get(), TTR("Scene")));
|
||||
}
|
||||
main_hs->add_child(preview_scene_dialog);
|
||||
preview_scene_dialog->connect("file_selected", this, "_preview_scene_dialog_cbk");
|
||||
|
|
Loading…
Reference in New Issue