From fdfe5aed765be3ab7e15c28290477d29d5076046 Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Sat, 28 Nov 2026 09:55:54 +0100 Subject: [PATCH] i18n: give the file path field its own label (#1688) * Give the file path field its own translation key * Translate the SoundCraft file path label in Portuguese * Translate the SoundCraft folder path label * Use the folder path label for directory prompts --------- Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> --- crates/ui-egui/locales/pt-BR/mod.rs | 2 ++ crates/ui-egui/src/dialogs.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/locales/pt-BR/mod.rs b/crates/ui-egui/locales/pt-BR/mod.rs index 3b9838d55..05b0fbf3d 100644 --- a/crates/ui-egui/locales/pt-BR/mod.rs +++ b/crates/ui-egui/locales/pt-BR/mod.rs @@ -114,6 +114,8 @@ pub(super) fn translate(source: &str) -> Option<&'static str> { "End" => "Fim", "Extract" => "Extrair", "File" => "Arquivo", + "File path" => "Caminho do arquivo", + "Folder path" => "Caminho da pasta", "Format" => "Formato", "Grab bag" => "Diversos", "Grid" => "Grade", diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 87da1cad6..bae8f3c56 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -342,7 +342,8 @@ fn bounce_file_row(app: &mut SoundApp, ui: &mut egui::Ui, path: &mut String, for /// The path prompt's form; the command to run once it is confirmed. fn path_prompt_form(app: &mut SoundApp, ui: &mut egui::Ui, cmd: &str, path: &mut String, key: &str, enter: bool) -> Option<(String, Value)> { - crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), crate::localization::text("Path")); + let label = if key == "dir" { crate::localization::text("Folder path") } else { crate::localization::text("File path") }; + crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), label); let mut picked = None; // Import Audio picks several files at once; every other open dialog takes one. let multi = cmd == "file.import_audio" && app.services.pick_open_many.is_some();