Merge pull request #398 from FeiLiuEM/ui-i18n
i18n: translate the interface below the menu bar (panels, dialogs, tooltips) # Conflicts: # crates/ui-egui/src/lib.rs # docs/preferences.md
This commit is contained in:
@@ -56,6 +56,7 @@ pub mod viewer_tools;
|
||||
pub mod viewers;
|
||||
pub mod waveform;
|
||||
|
||||
use crate::i18n::tr;
|
||||
use effectcraft_engine::Session;
|
||||
use effectcraft_engine::project::Comp;
|
||||
use effectcraft_engine::time::Tick;
|
||||
@@ -138,17 +139,17 @@ pub fn panel_menu_popup(app: &mut EffectcraftApp, ui: &mut egui::Ui) {
|
||||
let area = egui::Area::new(id.with("area")).order(egui::Order::Foreground).fixed_pos(pos).show(ui.ctx(), |ui| {
|
||||
egui::Frame::popup(ui.style()).show(ui, |ui| {
|
||||
ui.set_min_width(200.0);
|
||||
if ui.button("Close Panel").clicked() {
|
||||
if ui.button(tr("Close Panel")).clicked() {
|
||||
app.close_panel(panel);
|
||||
close = true;
|
||||
}
|
||||
let floating = app.ui.floating.iter().any(|f| f.panels.contains(&panel));
|
||||
if !floating && ui.button("Undock Panel").clicked() {
|
||||
if !floating && ui.button(tr("Undock Panel")).clicked() {
|
||||
let r = crate::dock_ui::default_float_rect(ui.ctx().content_rect());
|
||||
app.edit_layout(|l| l.float(panel, r));
|
||||
close = true;
|
||||
}
|
||||
if !floating && ui.button(if app.ui.maximized == Some(panel) { "Restore Panel Size" } else { "Maximize Panel" }).clicked() {
|
||||
if !floating && ui.button(if app.ui.maximized == Some(panel) { tr("Restore Panel Size") } else { tr("Maximize Panel") }).clicked() {
|
||||
app.toggle_maximize(panel);
|
||||
close = true;
|
||||
}
|
||||
@@ -166,7 +167,7 @@ pub fn panel_menu_popup(app: &mut EffectcraftApp, ui: &mut egui::Ui) {
|
||||
close = true;
|
||||
}
|
||||
}
|
||||
if ui.button("Composition Settings…").clicked() {
|
||||
if ui.button(tr("Composition Settings…")).clicked() {
|
||||
let _ = dialogs::open_comp_settings(app);
|
||||
close = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user