diff options
| author | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-17 00:36:49 +0100 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-17 02:43:21 +0100 |
| commit | 17898fbabde35ab346c133114e78614e707c0eca (patch) | |
| tree | 90f0fd36211c036a507a0af092aac3c5fb8e7ac8 /src/handlers/file.rs | |
| parent | 90b12c34debaa4aa816d4e6862cdb4e39c7181e4 (diff) | |
Add localization
Diffstat (limited to 'src/handlers/file.rs')
| -rw-r--r-- | src/handlers/file.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/handlers/file.rs b/src/handlers/file.rs index 615a1f7..bd501e8 100644 --- a/src/handlers/file.rs +++ b/src/handlers/file.rs @@ -23,6 +23,7 @@ use crate::actions::Action; use crate::constants; use crate::dialogs; use crate::file_registry; +use crate::tr; /// Loads a file into the current document, updating the file registry. pub fn load_file(model: &mut AppModel, path: PathBuf) { @@ -35,7 +36,7 @@ pub fn load_file(model: &mut AppModel, path: PathBuf) { model.modified = false; } Err(error) => { - dialogs::show_error(&model.window, "Error Opening File", &error.to_string()); + dialogs::show_error(&model.window, &tr!("errors.file.open"), &error.to_string()); } } } @@ -58,7 +59,7 @@ pub fn save_to_file(model: &mut AppModel, path: PathBuf, close_after: bool) { } } Err(error) => { - dialogs::show_error(&model.window, "Error Saving File", &error.to_string()); + dialogs::show_error(&model.window, &tr!("errors.file.save"), &error.to_string()); } } } |