Skip to content

Commit

Permalink
make script not blind anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed May 28, 2024
1 parent 948cc92 commit ab23bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl App {
self.dialog(
ctx,
"delete_old_data",
"Old version of translation files has been detected. It's better to delete them to avoid conflicts. Delete?",
t!("Old version of translation files has been detected. It's better to delete them to avoid conflicts. Delete?"),
|app| {
app.delete_old_data_show = false;
},
Expand All @@ -228,7 +228,7 @@ impl App {
self.dialog(
ctx,
"delete_data",
"Delete all localization files?",
t!("Delete all localization files?"),
|app| {
app.delete_hook_show = false;
app.selected_language = "English".to_string();
Expand All @@ -249,15 +249,15 @@ impl App {
&mut self,
ctx: &egui::Context,
tag: impl std::fmt::Display,
text: &str,
text: String,
no: impl FnOnce(&mut App),
yes: impl FnOnce(&mut App),
) {
let modal = egui_modal::Modal::new(ctx, tag);
modal.show(|ui| {
modal.title(ui, t!("Warning"));
modal.frame(ui, |ui| {
modal.body_and_icon(ui, t!(text), egui_modal::Icon::Info);
modal.body_and_icon(ui, text, egui_modal::Icon::Info);
});
modal.buttons(ui, |ui| {
if modal.button(ui, t!("No")).clicked() {
Expand Down

0 comments on commit ab23bb0

Please sign in to comment.