UI: translate develop tooltips and color control labels

This commit is contained in:
Nigel Ihza Firdausy
2026-10-12 09:20:46 +07:00
parent b05e6a6b86
commit 2a837254b0
+5 -5
View File
@@ -160,7 +160,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
let r = crate::widgets::dropdown(ui, "profile", crate::i18n::profile_label(&d.profile.id, name), t.font(15.0), t.text_label);
egui::Popup::menu(&r).show(|ui| profile_menu(app, ui, &d));
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
if crate::widgets::icon_button(ui, "profileBrowser", Icon::ProfileGrid, vec2(28.0, 28.0), false, true, "Browse Profiles").clicked() {
if crate::widgets::icon_button(ui, "profileBrowser", Icon::ProfileGrid, vec2(28.0, 28.0), false, true, crate::i18n::tr("Browse Profiles")).clicked() {
let _ = app.run("panel.profiles", json!({}));
}
});
@@ -230,7 +230,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
});
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
let active = app.ui.tool == "wbPicker";
if crate::widgets::icon_button(ui, "wbPicker", Icon::Picker, vec2(28.0, 28.0), active, true, "White Balance Selector (W)")
if crate::widgets::icon_button(ui, "wbPicker", Icon::Picker, vec2(28.0, 28.0), active, true, crate::i18n::tr("White Balance Selector (W)"))
.clicked()
{
if active {
@@ -1096,7 +1096,7 @@ fn mixer(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings) {
for (k, label) in items {
let tool = format!("tat:{k}");
let active = app.ui.tool == tool;
if text_button(ui, &format!("tatMixer-{k}"), label, active)
if text_button(ui, &format!("tatMixer-{k}"), crate::i18n::tr(label), active)
.on_hover_text(crate::i18n::tr("Targeted adjustment: drag up/down on the photo to adjust the colours there"))
.clicked()
{
@@ -1149,7 +1149,7 @@ fn point_color(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings)
ui.spacing_mut().item_spacing.x = 5.0;
let active = app.ui.tool == "pointColor";
let full = n >= lightcraft_develop::MAX_POINT_COLORS;
if crate::widgets::icon_button(ui, "pointColorPicker", Icon::Picker, vec2(26.0, 26.0), active, !full, "Sample a colour on the photo")
if crate::widgets::icon_button(ui, "pointColorPicker", Icon::Picker, vec2(26.0, 26.0), active, !full, crate::i18n::tr("Sample a colour on the photo"))
.clicked()
{
app.ui.tool = if active { String::new() } else { "pointColor".into() };
@@ -1234,7 +1234,7 @@ fn grading(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings, phot
ui.horizontal(|ui| {
ui.spacing_mut().item_spacing.x = 4.0;
for (key, tip, icon) in GRADING_TABS {
if crate::widgets::icon_button(ui, &format!("grading-{key}"), icon, vec2(28.0, 28.0), key == mode, true, tip).clicked() {
if crate::widgets::icon_button(ui, &format!("grading-{key}"), icon, vec2(28.0, 28.0), key == mode, true, crate::i18n::tr(tip)).clicked() {
app.ui.grading_mode = key.to_string();
}
}