aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/file.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers/file.rs')
-rw-r--r--src/handlers/file.rs5
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());
}
}
}