Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

i18n(cs): translate the dynamic labels the Czech catalog was missing (#3454)

Daniel Lošák72bf3e13b6c8
diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md
index a02e682da..bed05a8ae 100644
--- a/ATTRIBUTION.md
+++ b/ATTRIBUTION.md
@@ -18,6 +18,7 @@ next to them.
| `crates/ui-egui/src/i18n/pl.tsv` | Polish UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/pt-br.tsv` | Brazilian Portuguese UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/uk.tsv` | Ukrainian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
+| `crates/ui-egui/src/i18n/cs.tsv` | Czech UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `assets/fonts/Inter-Regular.ttf`, `Inter-Medium.ttf`, `Inter-SemiBold.ttf` | Inter 4.001 (UI font) | The Inter Project Authors (Rasmus Andersson) | <https://github.com/rsms/inter> | SIL OFL 1.1, [`assets/fonts/OFL-Inter.txt`](assets/fonts/OFL-Inter.txt) |
| `assets/fonts/JetBrainsMono-Regular.ttf` | JetBrains Mono 2.305 (numeric font) | The JetBrains Mono Project Authors | <https://github.com/JetBrains/JetBrainsMono> | SIL OFL 1.1, [`assets/fonts/OFL-JetBrainsMono.txt`](assets/fonts/OFL-JetBrainsMono.txt) |
| `assets/icons/*.svg` except `slice-knife.svg`, `sampler.svg`, `artboard.svg`, `perspective-crop.svg`, `frame-placeholder.svg`, `type-mask.svg`, `type-mask-vertical.svg`, `clip-below.svg`, `clip-release.svg`, `layer-mask.svg`, `adjustment-layer.svg`, `brush-replace.svg`, `eraser-background.svg`, `eraser-magic.svg`, `lasso-magnetic.svg`, `direct-select.svg`, `convert-point.svg`, `pen-add-anchor.svg`, `pen-delete-anchor.svg`, `pen-freeform.svg`, `pen-curvature.svg`, `bandage-sparkle.svg`, `painting-symmetry.svg`, `symmetry-*.svg` and `marquee-{row,column}.svg` (113 files; `star-filled.svg` is `star.svg` with a solid fill) | Lucide icons | Lucide Icons and Contributors | <https://github.com/lucide-icons/lucide> (`icons/<name>.svg`; `align-*` are now named `text-align-*` upstream) | ISC, [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) |
diff --git a/contributors/people.toml b/contributors/people.toml
index 0c8aa6fb0..914c9ce30 100644
--- a/contributors/people.toml
+++ b/contributors/people.toml
@@ -106,3 +106,6 @@ display_name = "SyntaxError"
[people.axlecoffee]
sync_github_name = true
+
+[people.Losminek]
+sync_github_name = true
diff --git a/crates/ui-egui/src/actions.rs b/crates/ui-egui/src/actions.rs
index cf0694022..b486e2536 100644
--- a/crates/ui-egui/src/actions.rs
+++ b/crates/ui-egui/src/actions.rs
@@ -179,14 +179,15 @@ fn begin_recording(app: &mut PhotocraftApp, append: bool) {
pub(crate) fn report_play(app: &mut PhotocraftApp, v: &Value) {
let Some(failed) = v.get("failed").filter(|f| f.is_object()) else {
let ran = v.get("ran").and_then(Value::as_u64).unwrap_or(0);
- app.ui.status = format!("Played {ran} steps");
+ app.ui.status = crate::i18n::trn(crate::i18n::current(), ran, "Played {n} step", "Played {n} steps");
app.ui.status_error = false;
return;
};
let step = failed.get("step").and_then(Value::as_u64).unwrap_or(0);
let id = failed.get("id").and_then(Value::as_str).unwrap_or("");
let error = failed.get("error").and_then(Value::as_str).unwrap_or("");
- app.ui.status = format!("Step {} ({id}) failed: {error}", step + 1);
+ let template = "Step {step} ({id}) failed: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("step", &(step + 1).to_string()), ("id", id), ("error", error)]);
app.ui.status_error = true;
}
@@ -196,7 +197,12 @@ fn visible_steps(app: &PhotocraftApp, action: usize) -> Vec<(String, Value)> {
/// "3 steps", or "2/3 steps" when some are switched off (Photoshop shows a red partial check).
fn step_count(steps: usize, disabled: usize) -> String {
- if disabled == 0 { format!("{steps} steps") } else { format!("{}/{steps} steps", steps.saturating_sub(disabled)) }
+ if disabled == 0 {
+ crate::i18n::trn(crate::i18n::current(), steps as u64, "{n} step", "{n} steps")
+ } else {
+ let count = crate::i18n::trn(crate::i18n::current(), steps as u64, "{n} step", "{n} steps");
+ format!("{}/{count}", steps.saturating_sub(disabled))
+ }
}
fn paint_check(ui: &egui::Ui, rect: Rect, on: bool, t: &Tokens) {
@@ -312,7 +318,8 @@ fn rename_field(app: &mut PhotocraftApp, ui: &mut egui::Ui, index: usize, rect:
fn rename_action(app: &mut PhotocraftApp, index: usize, name: String) {
if let Err(e) = app.run("actions.rename", json!({"action": index, "name": name})) {
- app.ui.status = format!("Could not rename the action: {e}");
+ let template = "Could not rename the action: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
app.ui.status_error = true;
}
}
@@ -530,7 +537,8 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
match app.run("actions.play", json!({"action": i})) {
Ok(v) => report_play(app, &v),
Err(e) => {
- app.ui.status = format!("Action playback failed: {e}");
+ let template = "Action playback failed: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
app.ui.status_error = true;
}
}
diff --git a/crates/ui-egui/src/adjust_editors.rs b/crates/ui-egui/src/adjust_editors.rs
index 53964d893..abfc83cce 100644
--- a/crates/ui-egui/src/adjust_editors.rs
+++ b/crates/ui-egui/src/adjust_editors.rs
@@ -1352,7 +1352,8 @@ pub fn layer_editor(app: &mut PhotocraftApp, ui: &mut egui::Ui, id: LayerId, adj
return;
}
Adjustment::Unsupported { psd_key, .. } => {
- ui.label(RichText::new(format!("This adjustment ({psd_key}) is kept as imported and can't be edited yet.")).color(t.text_faint));
+ let template = "This adjustment ({key}) is kept as imported and can't be edited yet.";
+ ui.label(RichText::new(crate::i18n::fmt(tl!(template), &[("key", psd_key)])).color(t.text_faint));
return;
}
_ => {}
diff --git a/crates/ui-egui/src/analysis_ui.rs b/crates/ui-egui/src/analysis_ui.rs
index 949d23e28..b0ad27bdd 100644
--- a/crates/ui-egui/src/analysis_ui.rs
+++ b/crates/ui-egui/src/analysis_ui.rs
@@ -782,7 +782,9 @@ fn notes_panel(app: &mut PhotocraftApp, ctx: &egui::Context) {
if ui.add_enabled_ui(n > 1, |ui| crate::icons::button(ui, "chevrons-right", 22.0, false, tl!("Next note"))).inner.clicked() {
sel = sel.map(|i| (i + 1) % n);
}
- ui.label(RichText::new(sel.map_or("0 of 0".into(), |i| format!("{} of {n}", i + 1))).color(t.text_dim).size(11.0));
+ let template = "{index} of {total}";
+ let position = crate::i18n::fmt(tl!(template), &[("index", &sel.map_or(0, |i| i + 1).to_string()), ("total", &n.to_string())]);
+ ui.label(RichText::new(position).color(t.text_dim).size(11.0));
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
if ui.add_enabled_ui(sel.is_some(), |ui| crate::icons::button(ui, "trash", 22.0, false, tl!("Delete note"))).inner.clicked() {
delete = true;
diff --git a/crates/ui-egui/src/brush_picker.rs b/crates/ui-egui/src/brush_picker.rs
index 03024cffc..8a7ec9d47 100644
--- a/crates/ui-egui/src/brush_picker.rs
+++ b/crates/ui-egui/src/brush_picker.rs
@@ -189,7 +189,8 @@ pub fn open_settings(app: &mut PhotocraftApp, ctx: &egui::Context) {
/// (Photoshop's "Toggle the Brush Settings panel"). It runs Window › Brush Settings (F5).
pub fn settings_toggle(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let on = app.ui.panels.brush_settings;
- if named(icons::button(ui, "sliders-horizontal", 24.0, on, "Toggle the Brush Settings panel (F5)"), "Toggle the Brush Settings panel").clicked()
+ let tooltip = "Toggle the Brush Settings panel (F5)";
+ if named(icons::button(ui, "sliders-horizontal", 24.0, on, tl!(tooltip)), "Toggle the Brush Settings panel").clicked()
&& let Err(e) = crate::menus::invoke(app, ui.ctx(), "window.panel.brushSettings", json!({}))
{
app.ui.status = e;
@@ -198,7 +199,7 @@ pub fn settings_toggle(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
/// An icon button's accessible name (icon buttons have only a tooltip).
pub(crate) fn named(resp: egui::Response, label: &str) -> egui::Response {
- resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, label));
+ resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, tl!(label)));
resp
}
@@ -269,11 +270,12 @@ pub fn body(
);
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
gear_menu(ui, current, presets, st, &mut picks);
- if named(icons::button(ui, "square-plus", 24.0, false, "Create new brush preset from the current settings"), "New Brush Preset").clicked() {
+ let new_tip = "Create new brush preset from the current settings";
+ let settings_tip = "Brush Settings… (F5): every option of this brush";
+ if named(icons::button(ui, "square-plus", 24.0, false, tl!(new_tip)), "New Brush Preset").clicked() {
picks.push(Pick::NewPreset);
}
- if named(icons::button(ui, "sliders-horizontal", 24.0, false, "Brush Settings… (F5): every option of this brush"), "Brush Settings…").clicked()
- {
+ if named(icons::button(ui, "sliders-horizontal", 24.0, false, tl!(settings_tip)), "Brush Settings…").clicked() {
picks.push(Pick::OpenSettings);
}
});
diff --git a/crates/ui-egui/src/brushes_tab.rs b/crates/ui-egui/src/brushes_tab.rs
index 5fcff67cb..59b3ba6df 100644
--- a/crates/ui-egui/src/brushes_tab.rs
+++ b/crates/ui-egui/src/brushes_tab.rs
@@ -895,10 +895,12 @@ pub fn show(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
ui.add(egui::TextEdit::singleline(&mut app.ui.brushes_panel.filter).hint_text(tl!("Search Brushes")).desired_width(WIDTH - 120.0));
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
let view = &mut app.ui.brushes_panel.view;
- if icons::button(ui, "grid-2x2", 24.0, *view == BrushesView::Grid, "Grid view").clicked() {
+ let grid_tip = "Grid view";
+ let list_tip = "List view";
+ if icons::button(ui, "grid-2x2", 24.0, *view == BrushesView::Grid, tl!(grid_tip)).clicked() {
*view = BrushesView::Grid;
}
- if icons::button(ui, "align-justify", 24.0, *view == BrushesView::List, "List view").clicked() {
+ if icons::button(ui, "align-justify", 24.0, *view == BrushesView::List, tl!(list_tip)).clicked() {
*view = BrushesView::List;
}
});
@@ -910,7 +912,9 @@ pub fn show(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
widgets::hairline(ui);
ui.add_space(4.0);
ui.horizontal(|ui| {
- ui.label(RichText::new(format!("{} presets", app.session.tools.presets.len())).color(t.text_faint));
+ ui.label(
+ RichText::new(crate::i18n::trn(crate::i18n::current(), app.session.tools.presets.len() as u64, "{n} preset", "{n} presets")).color(t.text_faint),
+ );
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
// The current preset by identity: editing the brush after picking must not deselect it.
let current = app.session.tools.current_preset.clone().filter(|n| app.session.tools.presets.iter().any(|p| p.name.eq_ignore_ascii_case(n)));
diff --git a/crates/ui-egui/src/camera_raw_ui.rs b/crates/ui-egui/src/camera_raw_ui.rs
index a3a7d7fbb..8b77e7a08 100644
--- a/crates/ui-egui/src/camera_raw_ui.rs
+++ b/crates/ui-egui/src/camera_raw_ui.rs
@@ -404,7 +404,7 @@ pub fn on_redevelop_event(app: &mut PhotocraftApp, e: &photocraft_engine::jobs::
match &e.outcome {
photocraft_engine::jobs::JobOutcome::Done(v) => match finish_redevelop(app, &pending.params, &pending.raw, v) {
Ok(_) => {
- app.ui.status = format!("Opened {}", pending.raw.name);
+ app.ui.status = crate::i18n::fmt(tl!("Opened {name}"), &[("name", &pending.raw.name)]);
app.ui.status_error = false;
}
Err(err) => crate::notices::error(app, format!("{}: {err}", e.label)),
diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs
index 6778becf8..d8631a1e5 100644
--- a/crates/ui-egui/src/canvas.rs
+++ b/crates/ui-egui/src/canvas.rs
@@ -2430,7 +2430,8 @@ fn sync_display_lut(app: &mut PhotocraftApp, doc: &photocraft_doc::Document, key
0
}
Err(e) => {
- app.ui.status = format!("Color management: {e}");
+ let template = "Color management: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e.to_string())]);
gpu.set_display_lut(key, output, DISPLAY_LUT as u32, None);
0
}
diff --git a/crates/ui-egui/src/comps_ui.rs b/crates/ui-egui/src/comps_ui.rs
index 73b12bc01..d6dc3e8d8 100644
--- a/crates/ui-egui/src/comps_ui.rs
+++ b/crates/ui-egui/src/comps_ui.rs
@@ -104,7 +104,9 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
action = Some(("layerComp.setOptions", json!({"comp": c.id, *key: !on})));
}
if hov {
- resp.clone().on_hover_text(format!("Apply {tip}: {}", if *on { "on" } else { "off" }));
+ let template = "Apply {option}: {state}";
+ let state = if *on { "on" } else { "off" };
+ resp.clone().on_hover_text(crate::i18n::fmt(tl!(template), &[("option", tip), ("state", tl!(state))]));
}
x -= 22.0;
}
@@ -114,7 +116,12 @@ pub fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let r = Rect::from_center_size(pos2(name_x + 7.0, rect.center().y), vec2(14.0, 14.0));
crate::icons::paint(ui, r, "triangle-alert", 12.0, t.warning);
if ui.rect_contains_pointer(r) {
- resp.clone().on_hover_text(format!("{missing} layer(s) recorded by this comp were deleted. Update the comp, or clear the warning."));
+ resp.clone().on_hover_text(crate::i18n::trn(
+ crate::i18n::current(),
+ missing as u64,
+ "{n} layer recorded by this comp was deleted. Update the comp, or clear the warning.",
+ "{n} layers recorded by this comp were deleted. Update the comp, or clear the warning.",
+ ));
if resp.clicked() {
toggle_hit = true;
action = Some(("layerComp.updateWarnings", json!({"clear": true})));
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs
index 4a79a0066..4a83a8f8b 100644
--- a/crates/ui-egui/src/dialogs.rs
+++ b/crates/ui-egui/src/dialogs.rs
@@ -198,13 +198,13 @@ pub fn show(app: &mut PhotocraftApp, ctx: &egui::Context) {
}
}
DialogKind::About if fields.get("systemInfo").and_then(Value::as_bool) == Some(true) => {
- let lines = crate::gpu_status::system_info(app);
+ let lines = crate::gpu_status::system_info_ui(app);
for l in &lines {
ui.add(egui::Label::new(egui::RichText::new(l).font(crate::theme::mono(12.0))).selectable(true));
}
ui.add_space(8.0);
if crate::widgets::secondary_button(ui, tl!("Copy"), 84.0).clicked() {
- ui.ctx().copy_text(lines.join("\n"));
+ ui.ctx().copy_text(crate::gpu_status::system_info(app).join("\n"));
}
}
DialogKind::About => {
diff --git a/crates/ui-egui/src/export_dialog.rs b/crates/ui-egui/src/export_dialog.rs
index b250957c8..67d21b6f5 100644
--- a/crates/ui-egui/src/export_dialog.rs
+++ b/crates/ui-egui/src/export_dialog.rs
@@ -275,9 +275,12 @@ pub fn confirm(app: &mut PhotocraftApp, f: &Map<String, Value>) -> Result<Value,
let (bytes, warnings) = export(&out, &path, &settings)?;
let write = app.services.write.as_mut().ok_or("no writer configured")?;
write(&path, &bytes)?;
- app.ui.status = format!("Exported {path} ({})", crate::sizing::human_bytes(bytes.len() as f64));
+ let template = "Exported {path} ({size})";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("path", &path), ("size", &crate::sizing::human_bytes(bytes.len() as f64))]);
app.ui.status_error = false;
- crate::notices::io_warnings(app, &format!("Exported {}", crate::file_open::display_name(&path)), &warnings);
+ let template = "Exported {path}";
+ let what = crate::i18n::fmt(tl!(template), &[("path", &crate::file_open::display_name(&path))]);
+ crate::notices::io_warnings(app, &what, &warnings);
Ok(json!({"path": path, "bytes": bytes.len(), "warnings": warnings}))
})
}
@@ -312,7 +315,8 @@ pub fn quick_export_png(app: &mut PhotocraftApp) -> Result<Value, String> {
/// Runs Quick Export with `p` (an explicit `path`, or none for the document's folder).
fn quick_export(app: &mut PhotocraftApp, p: Value) -> Result<Value, String> {
let r = app.run("file.export.quickExport", p)?;
- app.ui.status = format!("Exported {}", r["path"].as_str().unwrap_or_default());
+ let template = "Exported {path}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("path", r["path"].as_str().unwrap_or_default())]);
Ok(r)
}
diff --git a/crates/ui-egui/src/file_open.rs b/crates/ui-egui/src/file_open.rs
index 9b052dda7..785d234d0 100644
--- a/crates/ui-egui/src/file_open.rs
+++ b/crates/ui-egui/src/file_open.rs
@@ -133,7 +133,10 @@ impl PhotocraftApp {
/// Show "Couldn't open <name>: <error>" as an error (status bar + notice).
pub fn open_failed(&mut self, name: &str, err: &str) {
- self.failed(format!("Couldn't open {name}: {err}"));
+ self.failed({
+ let template = "Couldn't open {name}: {error}";
+ crate::i18n::fmt(tl!(template), &[("name", name), ("error", err)])
+ });
}
/// Log `msg` and show it as an error (status bar + notice).
diff --git a/crates/ui-egui/src/file_ui.rs b/crates/ui-egui/src/file_ui.rs
index 1db52eeb8..8b96a51a3 100644
--- a/crates/ui-egui/src/file_ui.rs
+++ b/crates/ui-egui/src/file_ui.rs
@@ -92,7 +92,8 @@ pub fn invoke(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: &V
return Some(app.pick_file_bytes_filtered(SCRIPT_EXTENSIONS, |app, name, bytes| {
let r = app.run("file.scripts.browse", json!({"script": String::from_utf8_lossy(&bytes)}));
if r.is_ok() {
- app.ui.status = format!("Ran script {name}");
+ let template = "Ran script {name}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("name", &name)]);
}
r
}));
@@ -489,7 +490,7 @@ fn web_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String, Valu
let nslices = photocraft_doc::slices::resolve(&doc).len();
if !doc.slices.is_empty() {
ui.add_space(6.0);
- ui.label(egui::RichText::new(format!("{nslices} slices")).color(t.text_dim));
+ ui.label(egui::RichText::new(crate::i18n::trn(crate::i18n::current(), nslices as u64, "{n} slice", "{n} slices")).color(t.text_dim));
check(ui, f, "html", tl!("Save HTML and Images"), true);
dropdown_str(ui, "web-slices", f, "slices", &[("all", tl!("All Slices")), ("user", tl!("All User Slices"))], 150.0);
}
@@ -542,7 +543,8 @@ fn save_for_web(app: &mut PhotocraftApp, p: Value) -> Result<Value, String> {
app.ui.status_error = true;
})?;
app.sync_views();
- app.ui.status = format!("Saved for Web: {} file(s)", r["files"].as_array().map_or(0, Vec::len));
+ app.ui.status =
+ crate::i18n::trn(crate::i18n::current(), r["files"].as_array().map_or(0, Vec::len) as u64, "Saved for Web: {n} file", "Saved for Web: {n} files");
app.ui.status_error = false;
Ok(r)
}
@@ -839,9 +841,11 @@ fn print_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String, Va
fn print_confirm(app: &mut PhotocraftApp, f: &Map<String, Value>) -> Result<Value, String> {
let r = app.run("file.print", params(f))?;
app.ui.status = if r["sent"] == json!(true) {
- format!("Sent to the printer ({})", r["spooler"].as_str().unwrap_or(""))
+ let template = "Sent to the printer ({spooler})";
+ crate::i18n::fmt(tl!(template), &[("spooler", r["spooler"].as_str().unwrap_or(""))])
} else {
- format!("Printed to {}", r["pdf"].as_str().unwrap_or(""))
+ let template = "Printed to {path}";
+ crate::i18n::fmt(tl!(template), &[("path", r["pdf"].as_str().unwrap_or(""))])
};
Ok(r)
}
diff --git a/crates/ui-egui/src/gpu_canvas.rs b/crates/ui-egui/src/gpu_canvas.rs
index 8f002c33e..702970dac 100644
--- a/crates/ui-egui/src/gpu_canvas.rs
+++ b/crates/ui-egui/src/gpu_canvas.rs
@@ -908,30 +908,55 @@ impl GpuInfo {
/// Human-readable lines for Help › System Info.
pub fn lines(&self) -> Vec<String> {
- let or = |s: &str, d: &str| if s.is_empty() { d.to_string() } else { s.to_string() };
+ let or = |s: &str, d: &str| if s.is_empty() || (s == "auto" && d == "auto") { tl!(d).to_string() } else { s.to_string() };
let mut v = vec![
- format!("Graphics adapter: {}", or(&self.adapter, "unknown")),
- format!("Backend: {} ({})", or(&self.backend, "unknown"), or(&self.device_type, "unknown type")),
- format!("Driver: {}", or(&self.driver, "unknown")),
- format!("GPU backend preference: {}", or(&self.preference, "auto")),
- format!("Selected at launch: {}", or(&self.selected, "auto")),
- format!("Image compositor: {}", if self.canvas == "gpu" { "GPU" } else { "CPU" }),
- format!(
- "Window renderer: {}",
- if self.device_type == "cpu" {
+ {
+ let template = "Graphics adapter: {adapter}";
+ crate::i18n::fmt(tl!(template), &[("adapter", &or(&self.adapter, "unknown"))])
+ },
+ {
+ let template = "Backend: {backend} ({type})";
+ crate::i18n::fmt(tl!(template), &[("backend", &or(&self.backend, "unknown")), ("type", &or(&self.device_type, "unknown type"))])
+ },
+ {
+ let template = "Driver: {driver}";
+ crate::i18n::fmt(tl!(template), &[("driver", &or(&self.driver, "unknown"))])
+ },
+ {
+ let template = "GPU backend preference: {backend}";
+ crate::i18n::fmt(tl!(template), &[("backend", &or(&self.preference, "auto"))])
+ },
+ {
+ let template = "Selected at launch: {backend}";
+ crate::i18n::fmt(tl!(template), &[("backend", &or(&self.selected, "auto"))])
+ },
+ {
+ let template = "Image compositor: {processor}";
+ crate::i18n::fmt(tl!(template), &[("processor", if self.canvas == "gpu" { "GPU" } else { "CPU" })])
+ },
+ {
+ let template = "Window renderer: {renderer}";
+ let renderer = if self.device_type == "cpu" {
"Software adapter"
} else if self.adapter.is_empty() {
"Unknown"
} else {
"Graphics adapter"
- }
- ),
+ };
+ crate::i18n::fmt(tl!(template), &[("renderer", tl!(renderer))])
+ },
];
if let Some(f) = &self.fallback {
- v.push(format!("Fallback: {f}"));
+ v.push({
+ let template = "Fallback: {reason}";
+ crate::i18n::fmt(tl!(template), &[("reason", f)])
+ });
}
if let Some(l) = &self.lost {
- v.push(format!("This session: {l}"));
+ v.push({
+ let template = "This session: {reason}";
+ crate::i18n::fmt(tl!(template), &[("reason", l)])
+ });
}
v
}
diff --git a/crates/ui-egui/src/gpu_status.rs b/crates/ui-egui/src/gpu_status.rs
index 181ac01c1..bbbc997fc 100644
--- a/crates/ui-egui/src/gpu_status.rs
+++ b/crates/ui-egui/src/gpu_status.rs
@@ -54,14 +54,21 @@ pub fn fall_back(app: &mut PhotocraftApp, fault: &photocraft_gpu::Fault) {
app.perf.gpu_info.lost = Some(fault.to_string());
let title = if fault.is_lost() { LOST_MESSAGE } else { ERROR_MESSAGE };
queue_fallback_notice(app, fault.to_string());
- app.ui.status = title.to_string();
+ app.ui.status = tl!(title).to_string();
app.ui.status_error = true;
}
-/// Help › System Info: version, platform and the graphics state.
+/// English diagnostics for issue reports (Copy and the control API), independent of UI language.
pub fn system_info(app: &PhotocraftApp) -> Vec<String> {
- let mut v =
- vec![format!("PhotoCraft {}", photocraft_engine::build_info::long_version()), format!("Platform: {} {}", std::env::consts::OS, std::env::consts::ARCH)];
+ crate::i18n::with_language(crate::i18n::Lang::EN, || system_info_ui(app))
+}
+
+/// Help › System Info's on-screen text: version, platform and the graphics state.
+pub fn system_info_ui(app: &PhotocraftApp) -> Vec<String> {
+ let mut v = vec![format!("PhotoCraft {}", photocraft_engine::build_info::long_version()), {
+ let template = "Platform: {os} {arch}";
+ crate::i18n::fmt(tl!(template), &[("os", std::env::consts::OS), ("arch", std::env::consts::ARCH)])
+ }];
v.extend(app.perf.gpu_info.lines());
v.extend(crate::monitor_status::summary_lines(app));
v
@@ -148,6 +155,41 @@ pub fn show_fallback(app: &mut PhotocraftApp, ctx: &egui::Context) {
mod tests {
use super::*;
+ #[test]
+ fn system_info_copy_and_api_stay_english_in_czech_ui() {
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ app.perf.gpu_info.adapter = "Test GPU".into();
+ app.perf.gpu_info.preference = "auto".into();
+ let english = crate::i18n::with_language(crate::i18n::Lang::EN, || system_info(&app));
+ crate::i18n::with_language(crate::i18n::Lang::from_code("cs").unwrap(), || {
+ assert_eq!(system_info(&app), english, "clipboard diagnostics include English monitor profiles too");
+ let result = crate::menus::invoke(&mut app, &egui::Context::default(), "help.systemInfo", json!({})).unwrap();
+ assert_eq!(result["info"]["lines"], json!(english));
+ assert_eq!(crate::i18n::current().code(), "cs", "diagnostics restore the drawing language");
+ let screen = system_info_ui(&app);
+ assert!(screen.iter().any(|line| line == "Grafický adaptér: Test GPU"), "{screen:?}");
+ assert!(screen.iter().any(|line| line.starts_with("Profil monitoru:")), "{screen:?}");
+ assert!(english.iter().any(|line| line == "GPU backend preference: auto"));
+ });
+ }
+
+ #[test]
+ fn system_info_translates_empty_and_stored_auto_only_for_display() {
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ // Hardware names are opaque even when they happen to match a lookup key.
+ app.perf.gpu_info.adapter = "auto".into();
+ crate::i18n::with_language(crate::i18n::Lang::from_code("cs").unwrap(), || {
+ let empty = system_info_ui(&app);
+ app.perf.gpu_info.preference = "auto".into();
+ app.perf.gpu_info.selected = "auto".into();
+ assert_eq!(system_info_ui(&app), empty);
+ assert!(empty.iter().any(|line| line == "Grafický adaptér: auto"));
+ assert!(empty.iter().any(|line| line == "Preferovaný backend GPU: automaticky"), "{empty:?}");
+ assert_eq!(app.perf.gpu_info.preference, "auto");
+ assert_eq!(app.perf.gpu_info.selected, "auto");
+ });
+ }
+
#[test]
fn fallback_warning_keeps_reason_in_inspectable_state() {
let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
diff --git a/crates/ui-egui/src/i18n/LICENSE-translations.txt b/crates/ui-egui/src/i18n/LICENSE-translations.txt
index 60b036be9..bf2f8caaa 100644
--- a/crates/ui-egui/src/i18n/LICENSE-translations.txt
+++ b/crates/ui-egui/src/i18n/LICENSE-translations.txt
@@ -1,4 +1,4 @@
-PhotoCraft's Korean, German, Brazilian Portuguese, Italian, Ukrainian and Dutch UI translation catalogs are
+PhotoCraft's Korean, German, Brazilian Portuguese, Italian, Ukrainian, Dutch and Czech UI translation catalogs are
licensed under MIT OR Apache-2.0, at your option. The full license texts are in ../../../../LICENSE-MIT
and ../../../../LICENSE-APACHE.
@@ -19,3 +19,6 @@ PhotoCraft's English labels; no proprietary translation resources were used.
Dutch translations: PhotoCraft contributors, original translations of
PhotoCraft's English labels; no proprietary translation resources were used.
+
+Czech translations: PhotoCraft contributors, original translations of
+PhotoCraft's English labels; no proprietary translation resources were used.
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 1723b29dc..260a77080 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -1222,7 +1222,7 @@
Logical Length: Logická délka:
Logical Units: Logické jednotky:
Luminance Luminance
- Luminance Detail Detail luminance
+ Luminance Detail Detail jasu
Magenta Purpurová
Magenta · Green Purpurová · zelená
Maintain aspect ratio Zachovat poměr stran
@@ -2575,6 +2575,857 @@ cameraData Lens Objektiv
Snap to Origin Přichytit k počátku
Search settings… Hledat nastavení…
No matching settings Žádná odpovídající nastavení
+
+# Dynamic labels the tl! literal scanner cannot see: filter and Filter Gallery parameter names and
+# choices (humanized from their keys), Camera Raw controls, render filters (Flame, Picture Frame, Tree),
+# measurement columns, file info fields and the macOS application menu. Translated the same way as
+# above, from the plain meaning of the English label.
+ 32-bit Preview Options Možnosti 32bitového náhledu
+ 3D 3D
+ About {app} O aplikaci {app}
+ Accented Edges Zvýrazněné okraje
+ Accurate Přesné
+ Actual Pixels Skutečné pixely
+ Adaptive Wide Angle Adaptivní širokoúhlý objektiv
+ Add Noise Přidat šum
+ Add to Přidat k
+ Adjust Interval For Loops Upravit interval pro smyčky
+ Adjustment Korekce
+ Adjustment Layers Korekční vrstvy
+ Adjustment Properties Vlastnosti korekce
+ Adobe RGB (1998) Adobe RGB (1998)
+ Advanced Blending Pokročilé prolnutí
+ After Po
+ Alpha Alfa
+ Alternative Alternativní
+ Ambience Okolní světlo
+ Ambient Okolní
+ Amplitude Max Max. amplituda
+ Amplitude Min Min. amplituda
+ Angled Strokes Šikmé tahy
+ Anisotropic Anizotropní
+ Aperture Clona
+ Apply Data Set Použít datovou sadu
+ Apply Image Použít obraz
+ Apply Layer Comp Použít kompozici vrstev
+ Apply Mask Použít masku
+ Arbitrary Libovolně
+ Arc Oblouk
+ Arch Klenba
+ Area Plocha
+ Around Center Kolem středu
+ Arrangement Uspořádání
+ Artboard from Group Kreslicí plocha ze skupiny
+ Artboard from Layers Kreslicí plocha z vrstev
+ Artboards Kreslicí plochy
+ Artist Autor snímku
+ Artistic Umělecké
+ Assign Profile Přiřadit profil
+ At Pozice
+ Author Autor
+ Auto Scale Automatické měřítko
+ Auto-Align Layers Automaticky zarovnat vrstvy
+ Auto-Blend Layers Automaticky prolnout vrstvy
+ Back Zpět
+ Background Level Úroveň pozadí
+ Bamboo Bambus
+ Bas Relief Basreliéf
+ Base Tree Type Základní typ stromu
+ Baseline Shift Posun účaří
+ Batch Dávka
+ Before Před
+ Berries Bobule
+ Best Nejlepší
+ Black Clip Oříznutí černé
+ Black Intensity Intenzita černé
+ Blade Curvature Zakřivení lamel
+ Blast Vichřice
+ Bleach Bypass Bleach bypass
+ Blend Prolnutí
+ Blocks Bloky
+ Blue Yellow Modrá–žlutá
+ Blur Angle Úhel rozostření
+ Bold Italic Tučná kurzíva
+ Border Okraj
+ Border Thickness Tloušťka okraje
+ Box Blur Rámečkové rozostření
+ Branches Color Barva větví
+ Branches Height Výška větví
+ Branches Thickness Tloušťka větví
+ Brick Cihla
+ Bristle Detail Detail štětin
+ Browse Procházet
+ Brush Detail Detail štětce
+ Brush Size Velikost štětce
+ Brush Strokes Tahy štětce
+ Brush Type Typ štětce
+ Bulge Vyboulení
+ Burlap Pytlovina
+ Burn Ztmavení
+ Calculations Výpočty
+ Camera Calibration Kalibrace fotoaparátu
+ Camera Raw Camera Raw
+ Camera Raw Filter Filtr Camera Raw
+ Candle Light Plamen svíčky
+ Canvas Size Velikost plátna
+ Caption Popisek
+ Category Kategorie
+ Cell Size Velikost buňky
+ Center X Střed X
+ Center Y Střed Y
+ Chalk & Charcoal Křída a uhel
+ Chalk Area Plocha křídy
+ Channel Kanál
+ Channel1 Kanál 1
+ Channel2 Kanál 2
+ Channel3 Kanál 3
+ Channel4 Kanál 4
+ Charcoal Uhel
+ Charcoal Area Plocha uhlu
+ Charcoal Thickness Tloušťka uhlu
+ Chrome Chrom
+ Circle Kruh
+ Circularity Kruhovitost
+ Cleanliness Čistota
+ Clear Amount Míra čistých oblastí
+ Clear Selection Zrušit výběr
+ Clipping Path Ořezová cesta
+ Clone Klonovat
+ Clone Stamp Klonovací razítko
+ Close Window Zavřít okno
+ Clumped Shlukované
+ Coarse Dots Hrubé tečky
+ Color Decontaminate Odstranit barevný lem
+ Color Halftone Barevný polotón
+ Color Lookup Tables Převodní tabulky barev
+ Color Picker Výběr barvy
+ Color Profile Barevný profil
+ Color Range Rozsah barev
+ Color Settings Nastavení barev
+ Color Swatches Vzorník barev
+ Color Table Tabulka barev
+ Color indicates Barva označuje
+ Colored Pencil Pastelka
+ Compare Porovnat
+ Compatibility Kompatibilita
+ Compose Skládat
+ Compression Komprese
+ Condensed Zúžené
+ Conditional Mode Change Podmíněná změna režimu
+ Confirm Potvrdit
+ Constraints Omezení
+ Content-Aware Fill Výplň s ohledem na obsah
+ Content-Aware Move Přesun s ohledem na obsah
+ Continue Pokračovat
+ Contract Zúžit
+ Contrasty Kontrastní
+ Conté Crayon Křída Conté
+ Convert to Linked Převést na propojený
+ Convert to Profile Převést do profilu
+ Cool Studený
+ Cooling L B B Ochlazovací (LBB)
+ Cooling80 Ochlazovací 80
+ Cooling82 Ochlazovací 82
+ Copyright Status Stav autorských práv
+ Copyrighted Chráněno autorským právem
+ Correct C A Korigovat chromatickou aberaci
+ Correct Distortion Korigovat zkreslení
+ Correct Vignette Korigovat vinětaci
+ Crack Brightness Jas prasklin
+ Crack Depth Hloubka prasklin
+ Crack Spacing Rozestup prasklin
+ Craquelure Krakeláž
+ Create By Vytvořit pomocí
+ Cross Kříž
+ Cross Process Křížové vyvolání
+ Crosshatch Křížové šrafování
+ Crystallize Krystalizace
+ Current Aktuální
+ Curve Darks Tmavé tóny křivky
+ Curve Highlights Světla křivky
+ Curve Lights Světlé tóny křivky
+ Curve Shadows Stíny křivky
+ Curve Splits Rozdělení křivky
+ Custom Branch Color Vlastní barva větví
+ Cutout Vystřihovánka
+ Daisies Sedmikrásky
+ Dark Intensity Intenzita tmy
+ Dark Rough Tmavý hrubý
+ Dark Strokes Tmavé tahy
+ Darken Only Pouze ztmavit
+ Darkness Tmavost
+ Data Data
+ Date Datum
+ Date and Time Datum a čas
+ Day For Night Americká noc
+ De-Interlace Odstranit prokládání
+ Deep Blue Sytě modrý
+ Deep Emerald Sytě smaragdový
+ Deep Red Sytě červený
+ Deep Yellow Sytě žlutý
+ Default Foreground and Background Colors Výchozí barvy popředí a pozadí
+ Default Leaves Výchozí listy
+ Defaults Výchozí
+ Define Brush Preset Definovat přednastavení štětce
+ Define Custom Shape Definovat vlastní tvar
+ Define Pattern Definovat vzorek
+ Definition Definice
+ Defringe Odstranit třásně
+ Degrees Stupně
+ Delete Path Odstranit cestu
+ Depth Map Mapa hloubky
+ Depth Mode Režim hloubky
+ Diameter Průměr
+ Diffuse Difuze
+ Diffuse Glow Rozptýlená záře
+ Digits Číslice
+ Direction Balance Vyvážení směru
+ Disable Vypnout
+ Disabled Vypnuto
+ Displace Přemístění
+ Display Zobrazení
+ Distortion Zkreslení
+ Distribution Rozložení
+ Documentation Dokumentace
+ Documents Dokumenty
+ Dodge Zesvětlení
+ Dot Tečka
+ Double Line Dvojitá čára
+ Draft Koncept
+ Dry Brush Suchý štětec
+ Duplicate Duplikovat
+ Duplicate Layer Duplikovat vrstvu
+ Duplicate Layer Comp Duplikovat kompozici vrstev
+ Duplicate Layers Duplikovat vrstvy
+ Duplicate Path Duplikovat cestu
+ Duplication Duplikace
+ Duration Doba trvání
+ Dust & Scratches Prach a škrábance
+ Dynamics Dynamika
+ EXIF EXIF
+ Edge Brightness Jas okrajů
+ Edge Extension Rozšíření okraje
+ Edge Fidelity Věrnost okrajů
+ Edge Intensity Intenzita okrajů
+ Edge Only Pouze okraje
+ Edge Simplicity Zjednodušení okrajů
+ Edge Thickness Tloušťka okrajů
+ Edge Width Šířka okrajů
+ Elevation Elevace
+ Eliminate Odstranit
+ Enable Zapnout
+ End X Konec X
+ End Y Konec Y
+ Enlarged Zvětšené
+ Errors Chyby
+ Even Fields Sudé půlsnímky
+ Export As Exportovat jako
+ Export Contents Exportovat obsah
+ Export Options Možnosti exportu
+ Export Preferences Předvolby exportu
+ Export Settings Nastavení exportu
+ Export/Import Presets Export/import přednastavení
+ Extensions Rozšíření
+ Extra Bold Extra tučné
+ Extra Light Extra slabé
+ Extrude Vysunutí
+ F F
+ Faded Film Vybledlý film
+ Failed Nezdařilo se
+ Fast Rychlé
+ Fiber Length Délka vláken
+ Fibers Vlákna
+ Field Blur Rozostření pole
+ File Info Informace o souboru
+ File Name Název souboru
+ Filename Název souboru
+ Fill Color Barva výplně
+ Fill Path Vyplnit cestu
+ Film Grain Filmové zrno
+ Filter Gallery Galerie filtrů
+ Find Najít
+ Fine Jemná
+ Fine Dots Jemné tečky
+ Finish Dokončit
+ First Line Indent Odsazení prvního řádku
+ Fish Ryba
+ Fit Image Přizpůsobit obraz
+ Flag Vlajka
+ Flame Plamen
+ Flame Bottom Alignment Zarovnání spodku plamene
+ Flame Lines Linie plamene
+ Flame Shape Tvar plamene
+ Flame Style Styl plamene
+ Flame Type Typ plamene
+ Flash Blesk
+ Flat Ploché
+ Flat Shading Ploché stínování
+ Flower Color Barva květů
+ Focal Distance Vzdálenost zaostření
+ Focal Length35mm Ohnisková vzdálenost (35 mm)
+ Focus Zaostření
+ Focus Area Oblast zaostření
+ Folder Složka
+ Foreground Level Úroveň popředí
+ Frame Rám
+ Fresco Freska
+ From Left Zleva
+ From Right Zprava
+ Frosted Matné sklo
+ Full Screen Celá obrazovka
+ Fullscreen Celá obrazovka
+ Fuzziness Rozptyl
+ Gamma Gama
+ Gaussian Blur Gaussovské rozostření
+ Generators Generátory
+ Generic Obecný
+ Glass Sklo
+ Global Light Globální světlo
+ Gloss Lesk
+ Glow Amount Míra záře
+ Glow Brightness Jas záře
+ Glow Size Velikost záře
+ Glowing Edges Zářící okraje
+ Glyph Glyf
+ Good Dobrá
+ Grade Balance Vyvážení ladění
+ Grade Blending Míchání ladění
+ Grade Global Globální ladění
+ Grade Highlights Ladění světel
+ Grade Midtones Ladění středních tónů
+ Grade Shadows Ladění stínů
+ Grain Amount Míra zrna
+ Grain Roughness Drsnost zrna
+ Grain Size Velikost zrna
+ Grain Type Typ zrna
+ Graininess Zrnitost
+ Grainy Dots Zrnité tečky
+ Graphic Pen Grafické pero
+ Graphic and web Grafika a web
+ Gray Value (Maximum) Hodnota šedé (maximum)
+ Gray Value (Mean) Hodnota šedé (průměr)
+ Gray Value (Median) Hodnota šedé (medián)
+ Gray Value (Minimum) Hodnota šedé (minimum)
+ Group · {n} layer Skupina · vrstvy: {n}
+ Groups Skupiny
+ Grout Width Šířka spár
+ HDR Toning Tónování HDR
+ Halftone Pattern Polotónový vzorek
+ Hand Ruka
+ Heal Retušovat
+ Healing Retušování
+ Hearts Srdce
+ Heptagon Sedmiúhelník
+ Hexagon Šestiúhelník
+ Hidden Skryté
+ Hide Skrýt
+ Hide Others Skrýt ostatní
+ Hide {app} Skrýt {app}
+ High Vysoká
+ High Pass Horní propust
+ Highlight Světla
+ Highlight Amount Míra světel
+ Highlight Area Oblast světel
+ Highlight Radius Poloměr světel
+ Highlight Strength Síla odlesku
+ Highlight Tone Tón světel
+ History Brush Štětec historie
+ Horizontal Only Pouze vodorovně
+ Hotspot Jádro světla
+ Hsb HSB
+ Hsl HSL
+ Hsl Hue HSL – odstín
+ Hsl Lum HSL – jas
+ Hsl Sat HSL – sytost
+ ISO ISO
+ ISO Speed Citlivost ISO
+ Image Balance Vyvážení obrazu
+ Image Processor Zpracování obrazů
+ Import Brushes Importovat štětce
+ In Vstup
+ In Black Vstupní černá
+ In White Vstupní bílá
+ Infinite Nekonečné
+ Inflate Nafouknutí
+ Information Informace
+ Ink Outlines Inkoustové obrysy
+ Input Vstup
+ Input Mode Vstupní režim
+ Integrated Density Integrovaná hustota
+ Intensity Intenzita
+ Interpolation Interpolace
+ Interpret Footage Interpretovat záznam
+ Interval Interval
+ Invert Mask Invertovat masku
+ Iris Blur Rozostření clonou
+ Ivy Břečťan
+ Jag Zubatost
+ Justification Zarovnání do bloku
+ Justify Do bloku
+ Kernel Jádro
+ Keyboard Klávesnice
+ Keywords Klíčová slova
+ Label Popisek
+ Layer Comp Kompozice vrstev
+ Layer Content Options Možnosti obsahu vrstvy
+ Layer From Background Vrstva z pozadí
+ Layer Properties Vlastnosti vrstvy
+ Leaf Color Barva listů
+ Leaves Amount Množství listů
+ Leaves Color Barva listů
+ Leaves Size Velikost listů
+ Left Diagonal Levá diagonála
+ Legacy Starší
+ Length Délka
+ Lens Objektiv
+ Lens Blur Rozostření objektivu
+ Lens Correction Korekce objektivu
+ Lens Flare Odlesk objektivu
+ Less Méně
+ Letter Spacing Mezery mezi písmeny
+ Level Based Podle úrovně
+ Libraries Knihovny
+ Library Knihovna
+ Ligature Ligatura
+ Light Dark Balance Vyvážení světlé a tmavé
+ Light Direction Směr světla
+ Light Intensity Intenzita světla
+ Light Rough Světlý hrubý
+ Light Source Zdroj světla
+ Light Type Typ světla
+ Light X Světlo X
+ Light Y Světlo Y
+ Light Z Světlo Z
+ Lighten Grout Zesvětlení spár
+ Lighten Only Pouze zesvětlit
+ Lighting Osvětlení
+ Lighting Effects Světelné efekty
+ Linear Dodge Lineárně zesvětlit
+ Liquify Zkapalnit
+ List Seznam
+ Load Selection Načíst výběr
+ Lock Layers Zamknout vrstvy
+ Locked Zamčeno
+ Long Lines Dlouhé čáry
+ Long Strokes Dlouhé tahy
+ Loop Smyčka
+ Low Nízká
+ Lower Dolní
+ Lum Jas
+ Lut LUT
+ Magnetic Lasso Magnetické laso
+ Make Výrobce
+ Make Selection Vytvořit výběr
+ Make Work Path Vytvořit pracovní cestu
+ Manual Ručně
+ Map Document Dokument mapy
+ Map Layer Vrstva mapy
+ Map Path Cesta k mapě
+ Mask Maska
+ Mask Incomplete Blocks Maskovat neúplné bloky
+ Masked Areas Maskované oblasti
+ Masks Masky
+ Match Color Přizpůsobit barvy
+ Max Offset Max. posun
+ Max Radius Max. poloměr
+ Measure Měřit
+ Medium Dots Středně velké tečky
+ Medium Lines Středně dlouhé čáry
+ Medium Strokes Středně dlouhé tahy
+ Metallic Kovovost
+ Method Metoda
+ Mezzotint Mezzotinta
+ Middle Uprostřed
+ Midtone Střední tón
+ Mono Contrast Kontrastní černobílá
+ Monochromatic Monochromatický
+ More Více
+ Mosaic Mozaika
+ Mosaic Tiles Mozaikové dlaždice
+ Motion Blur Rozostření pohybem
+ Mouse Myš
+ Move Layer Přesunout vrstvu
+ Movie Prime Filmové pevné ohnisko
+ Multiple Flames Along Path Více plamenů podél cesty
+ Multiple Flames One Direction Více plamenů jedním směrem
+ Multiple Flames Path Directions Více plamenů ve směrech cesty
+ Multiple Flames Various Length Více plamenů různé délky
+ Neon Glow Neonová záře
+ Neutralize Neutralizovat
+ New Channel Nový kanál
+ New Group Nová skupina
+ New Guide Nové vodítko
+ New Guide Layout Nové rozvržení vodítek
+ New Layer Comp Nová kompozice vrstev
+ New Layer… Nová vrstva…
+ New Video Layer from File Nová video vrstva ze souboru
+ New document Nový dokument
+ New document… ⌘N Nový dokument… ⌘N
+ Next Další
+ No Document Žádný dokument
+ No Image Žádný obraz
+ Noise Color Barevný šum
+ Noise Color Detail Detail barevného šumu
+ Noise Luminance Jasový šum
+ Noise Luminance Detail Detail jasového šumu
+ Note Paper Dopisní papír
+ Number Of Levels Počet úrovní
+ Ocean Ripple Mořské zčeření
+ Octagon Osmiúhelník
+ Odd Fields Liché půlsnímky
+ Oil Paint Olejomalba
+ On Zapnuto
+ One Flame Along Path Jeden plamen podél cesty
+ Open As Otevřít jako
+ Open File Otevřít soubor
+ Open Folder Otevřít složku
+ Opening Otevírání
+ Operation Operace
+ Out Výstup
+ Out Black Výstupní černá
+ Out From Center Ze středu ven
+ Out White Výstupní bílá
+ Out of memory Nedostatek paměti
+ Output Levels Výstupní úrovně
+ Oval Ovál
+ Overlay Edge Překrýt okraje
+ Package Zabalit
+ Paint Daubs Barevné skvrny
+ Palette Knife Špachtle
+ Panel Panel
+ Paper Brightness Jas papíru
+ Parallel Rovnoběžně
+ Patch Záplata
+ Patchwork Patchwork
+ Path Blur Rozostření podél cesty
+ Pattern Type Typ vzorku
+ Pen Pero
+ Pencil Tool Nástroj tužka
+ Pencil Width Šířka tužky
+ Pentagon Pětiúhelník
+ Percentage Procento
+ Perimeter Obvod
+ Permission denied Přístup odepřen
+ Perspective Crop Perspektivní oříznutí
+ Phone Telefon
+ Photocopy Fotokopie
+ Photomerge Spojit fotografie
+ Picture Frame Rám obrazu
+ Pinch Sevření
+ Pins Špendlíky
+ Pixel Pixel
+ Place Embedded Umístit vložené
+ Place Linked Umístit propojené
+ Place Scale Marker Umístit značku měřítka
+ Plane Rovina
+ Planes Roviny
+ Plaster Sádra
+ Plastic Wrap Plastová fólie
+ Point Bodové
+ Point Curve Bodová křivka
+ Point Curve Blue Bodová křivka – modrá
+ Point Curve Green Bodová křivka – zelená
+ Point Curve Red Bodová křivka – červená
+ Pointed Špičatý
+ Pointillize Pointilismus
+ Polar Coordinates Polární souřadnice
+ Polar To Rectangular Z polárních na pravoúhlé
+ Pond Ripples Vlnky na hladině
+ Poster Edges Plakátové okraje
+ Posterization Posterizace
+ Preserve Zachovat
+ Preset Manager Správce přednastavení
+ Preview Image Náhled obrazu
+ Previous Předchozí
+ Prime105 Pevné ohnisko 105 mm
+ Prime35 Pevné ohnisko 35 mm
+ ProPhoto ProPhoto
+ Profile Profil
+ Public Domain Volné dílo
+ Punctuation Interpunkce
+ Pyramids Pyramidy
+ Quick Selection Rychlý výběr
+ Quit Ukončit
+ Quit PhotoCraft Ukončit PhotoCraft
+ Quit {app} Ukončit {app}
+ RGB RGB
+ Radial Blur Radiální rozostření
+ Radius X Poloměr X
+ Radius Y Poloměr Y
+ Random Náhodně
+ Randomize Length Náhodná délka
+ Randomize Shapes Náhodné tvary
+ Raw Data Nezpracovaná data
+ Raw Defaults Výchozí nastavení Raw
+ Reading Načítání
+ Ready Připraveno
+ Recent Files Nedávné soubory
+ Recovery Obnovení
+ Rectangle Obdélník
+ Rectangular Selection Obdélníkový výběr
+ Rectangular To Polar Z pravoúhlých na polární
+ Red Cyan Červená–azurová
+ Reduce Color Noise Redukce barevného šumu
+ Reduce Noise Redukovat šum
+ Relief Reliéf
+ Relink to File Znovu propojit se souborem
+ Remove All Odstranit vše
+ Remove Jpeg Artifact Odstranit artefakty JPEG
+ Rename Brush Přejmenovat štětec
+ Rename Group Přejmenovat skupinu
+ Rename Layer Comp Přejmenovat kompozici vrstev
+ Render Video Renderovat video
+ Reorder Layer Změnit pořadí vrstvy
+ Repeat Opakovat
+ Replace Nahradit
+ Replace Color Nahradit barvu
+ Replace Contents Nahradit obsah
+ Replace Footage Nahradit záznam
+ Reset All Obnovit vše
+ Reset Preferences Obnovit předvolby
+ Resolve Missing Fonts Vyřešit chybějící písma
+ Restart Restartovat
+ Result Výsledek
+ Resume Pokračovat
+ Reticulation Retikulace
+ Retry Zkusit znovu
+ Rgb RGB
+ Ridges Hřebeny
+ Right Diagonal Pravá diagonála
+ Ripple Zčeření
+ Ripple Magnitude Síla zčeření
+ Ripple Size Velikost zčeření
+ Rise Stoupání
+ Roman Obyčejné
+ Rope Lano
+ Roses Růže
+ Rough Pastels Hrubé pastely
+ Row Order Pořadí řádků
+ Ruler Pravítko
+ Sample Size Velikost vzorku
+ Sampler Vzorkovač
+ Sandstone Pískovec
+ Sat Syt.
+ Save As Uložit jako
+ Save File Uložit soubor
+ Save Selection Uložit výběr
+ Save for Web (Legacy) Uložit pro web (starší)
+ Scale Effects Změnit velikost efektů
+ Scale Factor Faktor měřítka
+ Scale Units Jednotky měřítka
+ Scaling Změna měřítka
+ Scallops Festony
+ Script Events Manager Správce událostí skriptů
+ Search menus Hledat v nabídkách
+ Seed Semínko
+ Select All Layers Vybrat všechny vrstvy
+ Select Inverse Invertovat výběr
+ Select Layer Vybrat vrstvu
+ Select and Mask Vybrat a maskovat
+ Selected Areas Vybrané oblasti
+ Semi Bold Polotučné
+ Sepia Sépie
+ Services Služby
+ Set Colors Nastavit barvy
+ Set Measurement Scale Nastavit měřítko měření
+ Settings Nastavení
+ Shadow Stíny
+ Shadow Amount Míra stínů
+ Shadow Intensity Intenzita stínů
+ Shadow Radius Poloměr stínů
+ Shadow Tone Tón stínů
+ Shadows/Highlights Stíny/světla
+ Shape Blur Rozostření tvarem
+ Sharpen Amount Míra doostření
+ Sharpen Detail Detail doostření
+ Sharpen Details Doostření detailů
+ Sharpen Masking Maskování doostření
+ Sharpen Radius Poloměr doostření
+ Sharpness Ostrost
+ Shear Ohnutí
+ Shell Lower Mušle dole
+ Shell Upper Mušle nahoře
+ Shine Třpyt
+ Short Lines Krátké čáry
+ Short Strokes Krátké tahy
+ Shortcut Zkratka
+ Shortcuts Zkratky
+ Show All Zobrazit vše
+ Simple Jednoduchý
+ Sine Sinusový
+ Sketch Skica
+ Skip Přeskočit
+ Slice Options Možnosti řezu
+ Smart Blur Chytré rozostření
+ Smart Sharpen Chytré doostření
+ Smoothness Hladkost
+ Smudge Stick Roztírací tyčinka
+ Snapshots Snímky
+ Snowflakes Sněhové vločky
+ Softness Měkkost
+ Software Software
+ Solid Color Plná barva
+ Solid Front Faces Plné přední stěny
+ Source Layer Zdrojová vrstva
+ Sparkle Jiskřivý
+ Spatter Rozstřik
+ Speckle Skvrnité
+ Speed Rychlost
+ Spherize Sférická deformace
+ Spin Rotace
+ Spin Blur Rotační rozostření
+ Sponge Houba
+ Spot Reflektor
+ Spot Color Přímá barva
+ Spot Healing Bodové retušování
+ Spray Radius Poloměr rozstřiku
+ Sprayed Strokes Stříkané tahy
+ Sprinkles Kropenaté
+ Square Size Velikost čtverců
+ Squareness Hranatost
+ Squeeze Stlačení
+ Stagger Nárazy větru
+ Stained Glass Vitráž
+ Stamp Razítko
+ Star Hvězda
+ Stars Hvězdy
+ Start X Začátek X
+ Start Y Začátek Y
+ Statistics Statistika
+ Step Backward Krok zpět
+ Stippled Tečkované
+ Stop Zastavit
+ Stops Zarážky
+ Strength Síla
+ Stretch Roztáhnout
+ Stroke Color Barva tahu
+ Stroke Detail Detail tahů
+ Stroke Direction Směr tahů
+ Stroke Length Délka tahů
+ Stroke Path Obtáhnout cestu
+ Stroke Pressure Přítlak tahů
+ Stroke Size Velikost tahů
+ Stroke Width Šířka tahů
+ Strokes Tahy
+ Stylization Stylizace
+ Sumi-e Sumi-e
+ Surface Blur Plošné rozostření
+ Switch Foreground and Background Colors Prohodit barvy popředí a pozadí
+ Symbols Symboly
+ Tablet Tablet
+ Taper Zúžení
+ Target Cíl
+ Target X Cíl X
+ Target Y Cíl Y
+ Teal Orange Modrozelená a oranžová
+ Text Layer Textová vrstva
+ Texture Coverage Pokrytí texturou
+ Texturizer Texturování
+ Thickness Tloušťka
+ Tile Size Velikost dlaždic
+ Tiles Dlaždice
+ Tilt Náklon
+ Tilt-Shift Tilt-shift
+ Time Čas
+ Timing Časování
+ Tint Color Barva nádechu
+ Tiny Lens Drobné čočky
+ To Center Ke středu
+ Tone Curve Tónová křivka
+ Tool Nástroj
+ Tool Options Možnosti nástroje
+ Toolbars Panely nástrojů
+ Torn Edges Roztřepené okraje
+ Trace Contour Obkreslit obrys
+ Transformation Transformace
+ Transition Přechod
+ Trap Přesahy
+ Tree Strom
+ Trim Odstranit okraje
+ Turbulent Turbulence
+ Twirl Zvíření
+ Twist Zkroucení
+ Unaltered Nezměněné
+ Undefined Areas Nedefinované oblasti
+ Underpainting Podmalba
+ Underwater Pod vodou
+ Ungroup Zrušit seskupení
+ Uniform Rovnoměrné
+ Units Jednotky
+ Unix Unix
+ Unknown Neznámé
+ Unlock Odemknout
+ Unlocked Odemčeno
+ Unsharp Mask Maska neostrosti
+ Update Aktualizovat
+ Update Layer Comp Aktualizovat kompozici vrstev
+ Updates Aktualizace
+ Upper Horní
+ Use Custom Color Použít vlastní barvu
+ Use Selection In Source Použít výběr ve zdroji
+ Use Selection In Target Použít výběr v cíli
+ Vanishing Point Úběžník
+ Variable Data Sets Datové sady proměnných
+ Vertical Only Pouze svisle
+ Vertical Type Tool Nástroj svislý text
+ Video Frames to Layers Snímky videa do vrstev
+ Vignette Amount Míra vinětace
+ Vignette Feather Zjemnění vinětace
+ Vignette Highlights Světla vinětace
+ Vignette Midpoint Střed vinětace
+ Vignette Roundness Kulatost vinětace
+ Vignette Style Styl vinětace
+ Vine Color Barva úponků
+ Vine With Flowers Úponky s květy
+ Vine With Leaves Úponky s listy
+ Violent Prudké
+ Wand Hůlka
+ Warm Teplý
+ Warming L B A Oteplovací (LBA)
+ Warming81 Oteplovací 81
+ Warming85 Oteplovací 85
+ Warmth Teplost
+ Warning Upozornění
+ Warp Text Deformovat text
+ Water Paper Mokrý papír
+ Watercolor Akvarel
+ Wave Vlny
+ Wavelength Max Max. vlnová délka
+ Wavelength Min Min. vlnová délka
+ Waves Vlnky
+ Wetness Vlhkost
+ White Clip Oříznutí bílé
+ White Intensity Intenzita bílé
+ White Is High Bílá je vysoko
+ Wide Blurry Široký rozmazaný
+ Wide Sharp Široký ostrý
+ Wind Vítr
+ Working Zpracování
+ Workspaces Pracovní prostory
+ Wrap Obtočit
+ X X
+ Y Y
+ ZigZag Cik-cak
+ Zigzag Cik-cak
+ sRGB sRGB
+ sRGB IEC61966-2.1 sRGB IEC61966-2.1
+ shortcut zkratka
+@id filter.sharpen.sharpen Doostřit
+cameraRaw Amount Míra
+cameraRaw Blacks Černé
+cameraRaw Color Detail Detail barev
+cameraRaw Color Grading Barevné ladění
+cameraRaw Darks Tmavé tóny
+cameraRaw Global Globální
+cameraRaw Hue Odstín
+cameraRaw Lights Světlé tóny
+cameraRaw Luminance Detail Detail jasu
+cameraRaw Masking Maskování
+cameraRaw Roughness Drsnost
+cameraRaw Tint Nádech
+cameraRaw Vibrance Živost
+cameraRaw Whites Bílé
+layerLabel No Color Žádná barva
Loading fonts… Načítání písem…
Tool Nástroj
Simulate Pressure Simulovat přítlak
@@ -2609,6 +3460,179 @@ cameraData Lens Objektiv
Click to place · Alt-click or drag off-canvas to remove Kliknutím umístíte · Alt-kliknutím nebo přetažením mimo plátno odeberete
No document open Není otevřen žádný dokument
{n} of {max} sample points {n} z {max} bodů měření
+ Drag (lasso) or click points (polygonal) · {add} add · {sub} subtract Táhněte (laso) nebo klikejte na body (mnohoúhelník) · {add} přidat · {sub} odečíst
+ The current gradient (pick one in Window › Gradients) Aktuální přechod (vyberte v Okno › Přechody)
+# Canvas context menus, Channels panel menu, Layer Style blending page (labels rendered through a variable).
+ Make Work Path… Vytvořit pracovní cestu…
+ Create Vector Mask Vytvořit vektorovou masku
+ Make Selection… Vytvořit výběr…
+ Fill Path… Vyplnit cestu…
+ Stroke Path… Obtáhnout cestu…
+ Clipping Path… Ořezová cesta…
+ Free Transform Path Volná transformace cesty
+ Unite Shapes at Overlap Sjednotit tvary v překryvu
+ Subtract Shapes at Overlap Odečíst tvary v překryvu
+ Copy Fill Kopírovat výplň
+ Copy Complete Stroke Kopírovat úplný tah
+ Paste Fill Vložit výplň
+ Paste Complete Stroke Vložit úplný tah
+ Make Symmetry Path Vytvořit cestu symetrie
+ Disable Symmetry Path Vypnout cestu symetrie
+ Dark Gray Tmavě šedá
+ Medium Gray Středně šedá
+ Light Gray Světle šedá
+ Select Custom Color… Vybrat vlastní barvu…
+ Color Picker (Custom Canvas Color) Výběr barvy (vlastní barva plátna)
+ Duplicate Channel Duplikovat kanál
+ Delete Channel Odstranit kanál
+ Rename Channel… Přejmenovat kanál…
+ Merge Spot Channel Sloučit kanál přímé barvy
+ Convert to Alpha Channel Převést na alfa kanál
+ Exit Quick Mask Opustit rychlou masku
+ New Channel… Nový kanál…
+ New Spot Channel… Nový kanál přímé barvy…
+ Split Channels Rozdělit kanály
+ Merge Channels… Sloučit kanály…
+ Color Indicates Masked Areas Barva označuje maskované oblasti
+ Color Indicates Selected Areas Barva označuje vybrané oblasti
+ ✓ Color Indicates Masked Areas ✓ Barva označuje maskované oblasti
+ ✓ Color Indicates Selected Areas ✓ Barva označuje vybrané oblasti
+ Up Nahoru
+ To Do
+ Shallow Mělké
+ Deep Hluboké
+ Blend Interior Effects as Group Prolnout vnitřní efekty jako skupinu
+ Blend Clipped Layers as Group Prolnout oříznuté vrstvy jako skupinu
+ Transparency Shapes Layer Průhlednost tvaruje vrstvu
+ Layer Mask Hides Effects Maska vrstvy skrývá efekty
+ Vector Mask Hides Effects Vektorová maska skrývá efekty
+ General Blending Obecné prolnutí
+ This Layer: Tato vrstva:
+ Underlying Layer: Podkladová vrstva:
+
+# Status messages and notices
+ Nothing to paste: the clipboard holds no image Není co vložit: schránka neobsahuje obraz
+ Preferences saved Předvolby uloženy
+ Invalid panel layout; restored the default dock Neplatné rozložení panelů; obnoveno výchozí ukotvení
+@plural {n} sample point removed|{n} sample points removed Odstraněn {n} bod měření|Odstraněny {n} body měření|Odstraněno {n} bodů měření
+ Preferences were reset: {error} Předvolby byly vráceny na výchozí hodnoty: {error}
+ Recovered {name} Obnoveno: {name}
+ Couldn't save preferences: {error}. Retrying… Předvolby se nepodařilo uložit: {error}. Další pokus…
+ Autosave failed: {error} Automatické ukládání selhalo: {error}
+ Exported presets to {path} Přednastavení exportována do {path}
+ Ran script {name} Spuštěn skript {name}
+ Sent to the printer ({spooler}) Odesláno k tisku ({spooler})
+ Printed to {path} Vytištěno do souboru {path}
+ Exported {path} ({size}) Exportováno: {path} ({size})
+ Exported {path} Exportováno: {path}
+ Added swatch {name} Přidán vzorek {name}
+ Step {step} ({id}) failed: {error} Krok {step} ({id}) selhal: {error}
+ Could not rename the action: {error} Akci se nepodařilo přejmenovat: {error}
+ Action playback failed: {error} Přehrávání akce selhalo: {error}
+ Clone source set at {x}, {y} Zdroj klonování nastaven na {x}, {y}
+ Color management: {error} Správa barev: {error}
+ Opened {url} Otevřeno: {url}
+ No custom shape "{name}": pick one in the options bar or Window › Shapes Vlastní tvar „{name}“ není k dispozici: vyberte ho v panelu možností nebo v nabídce Okno › Tvary
+ Saved a copy as {path} Kopie uložena jako {path}
+ Exported contents to {path} Obsah exportován do {path}
+ {label} is not available: {reason} {label} není k dispozici: {reason}
+ Saved {path}; image assets: {n} in {dir} Uloženo: {path}; obrazové soubory: {n} v {dir}
+@plural Played {n} step|Played {n} steps Přehrán {n} krok|Přehrány {n} kroky|Přehráno {n} kroků
+@plural Updated {n} linked smart object changed on disk|Updated {n} linked smart objects changed on disk Aktualizován {n} propojený chytrý objekt změněný na disku|Aktualizovány {n} propojené chytré objekty změněné na disku|Aktualizováno {n} propojených chytrých objektů změněných na disku
+@plural Saved for Web: {n} file|Saved for Web: {n} files Uloženo pro web: {n} soubor|Uloženo pro web: {n} soubory|Uloženo pro web: {n} souborů
+@plural Imported {n} brush from {group}|Imported {n} brushes from {group} Importován {n} štětec ze skupiny {group}|Importovány {n} štětce ze skupiny {group}|Importováno {n} štětců ze skupiny {group}
+@plural Imported {n} swatch from {file}|Imported {n} swatches from {file} Importován {n} vzorek ze souboru {file}|Importovány {n} vzorky ze souboru {file}|Importováno {n} vzorků ze souboru {file}
+@plural Exported {n} swatch to {file}|Exported {n} swatches to {file} Exportován {n} vzorek do souboru {file}|Exportovány {n} vzorky do souboru {file}|Exportováno {n} vzorků do souboru {file}
+ {message} (notes: {n}; {warning}) {message} (poznámky: {n}; {warning})
+@plural {warning} (+{n} more brush preset warning)|{warning} (+{n} more brush preset warnings) {warning} (+{n} další upozornění k přednastavení štětců)|{warning} (+{n} další upozornění k přednastavení štětců)|{warning} (+{n} dalších upozornění k přednastavení štětců)
+ Preferences can't be saved Předvolby nelze uložit
+ PhotoCraft keeps retrying; until a save succeeds, preference changes are lost when it closes. PhotoCraft se nadále pokouší o uložení; dokud nebude úspěšné, změny předvoleb se při zavření ztratí.
+ GPU retry scheduled Naplánován další pokus o použití GPU
+ Save your work and restart PhotoCraft to retry GPU acceleration. CPU rendering remains active for this session. Chcete-li znovu zkusit akceleraci GPU, uložte práci a restartujte PhotoCraft. V této relaci zůstane aktivní vykreslování pomocí CPU.
+ GPU device was lost; using the CPU renderer. Spojení se zařízením GPU bylo ztraceno; používá se vykreslování pomocí CPU.
+ GPU error; using the CPU renderer. Chyba GPU; používá se vykreslování pomocí CPU.
+@plural {what} with {n} warning|{what} with {n} warnings {what} ({n} upozornění)|{what} ({n} upozornění)|{what} ({n} upozornění)
+ Couldn't open {name}: {error} Soubor {name} se nepodařilo otevřít: {error}
+
+# Menus, tooltips and hardware information
+ Toggle the Brush Settings panel Zobrazit/skrýt panel Nastavení štětce
+ New Brush Preset Nové přednastavení štětce
+ Grid view Zobrazení mřížky
+ List view Zobrazení seznamu
+ {verb} {mask} {layer} {verb}: {mask}, {layer}
+ Unlink Rozpojit
+ Link Propojit
+ layer mask maska vrstvy
+ vector mask vektorová maska
+ Commit transform Potvrdit transformaci
+ Cancel transform Zrušit transformaci
+ Scroll menu up Posunout nabídku nahoru
+ Scroll menu down Posunout nabídku dolů
+ This type layer must be rasterized before proceeding. Its text will no longer be editable. Rasterize the type? Před pokračováním je nutné tuto textovou vrstvu rastrovat. Její text už nebude možné upravovat. Rastrovat text?
+ This shape layer must be rasterized before proceeding. It will no longer be editable as a shape. Rasterize the shape? Před pokračováním je nutné tuto vrstvu tvaru rastrovat. Už ji nebude možné upravovat jako tvar. Rastrovat tvar?
+ This Smart Object must be rasterized before proceeding. Its contents will no longer be editable. Rasterize the Smart Object? Před pokračováním je nutné tento chytrý objekt rastrovat. Jeho obsah už nebude možné upravovat. Rastrovat chytrý objekt?
+ This fill layer must be rasterized before proceeding. Its fill content will no longer be editable. Rasterize the layer? Před pokračováním je nutné tuto vrstvu výplně rastrovat. Její výplň už nebude možné upravovat. Rastrovat vrstvu?
+ This layer must be rasterized before proceeding. Před pokračováním je nutné tuto vrstvu rastrovat.
+ Color Picker (Background Color) Výběr barvy (barva pozadí)
+ Color Picker (Foreground Color) Výběr barvy (barva popředí)
+ Adwaita (Light) Adwaita (světlý)
+ Adwaita (Dark) Adwaita (tmavý)
+ Breeze Light Breeze (světlý)
+ Breeze Dark Breeze (tmavý)
+ Solarized Dark Solarized (tmavý)
+ Open Recent is unavailable on the web Otevření nedávných souborů není ve webové verzi dostupné
+ Graphics adapter: {adapter} Grafický adaptér: {adapter}
+ Backend: {backend} ({type}) Backend: {backend} ({type})
+ Driver: {driver} Ovladač: {driver}
+ GPU backend preference: {backend} Preferovaný backend GPU: {backend}
+ Selected at launch: {backend} Vybráno při spuštění: {backend}
+ Image compositor: {processor} Skládání obrazu: {processor}
+ Fallback: {reason} Náhradní režim: {reason}
+ This session: {reason} Tato relace: {reason}
+ Window renderer: {renderer} Vykreslování oken: {renderer}
+ Software adapter Softwarový adaptér
+ Graphics adapter Grafický adaptér
+ unknown neznámý
+ unknown type neznámý typ
+ auto automaticky
+ Platform: {os} {arch} Platforma: {os} {arch}
+ previous reading kept; the last re-read failed: {reason} ponechány předchozí údaje; poslední načtení selhalo: {reason}
+ Monitor profile: {profile} Profil monitoru: {profile}
+ Display profiles: {reason} Profily displejů: {reason}
+ Monitor profile in use on {display}: {profile} Používaný profil monitoru {display}: {profile}
+ Monitor profile in use: {profile} Používaný profil monitoru: {profile}
+ The canvas is shown as sRGB. Choose a monitor profile in Edit › Color Settings. Plátno se zobrazuje v sRGB. Vyberte profil monitoru v nabídce Úpravy › Nastavení barev.
+ The canvas on {display} is shown as sRGB. Choose a monitor profile in Edit › Color Settings. Plátno na displeji {display} se zobrazuje v sRGB. Vyberte profil monitoru v nabídce Úpravy › Nastavení barev.
+ Display profile not used Profil displeje se nepoužívá
+ Monitor profile on {display} (main window): {profile} Profil monitoru {display} (hlavní okno): {profile}
+ Monitor profile on {display}: {profile} Profil monitoru {display}: {profile}
+ manual ruční
+ fallback náhradní
+
+# Composed labels and Navigator zoom context
+ The document does not have an embedded colour profile. Working space: {working}. Dokument nemá vložený barevný profil. Pracovní prostor barev: {working}.
+ The document has an embedded colour profile that does not match the working space.\nEmbedded: {embedded}\nWorking: {working} Dokument má vložený barevný profil, který neodpovídá pracovnímu prostoru barev.\nVložený: {embedded}\nPracovní: {working}
+ Importing {what} from {file}… Importují se {what} ze souboru {file}…
+ brushes štětce
+ gradients přechody
+@plural Imported {n} brush from {file}|Imported {n} brushes from {file} Importován {n} štětec ze souboru {file}|Importovány {n} štětce ze souboru {file}|Importováno {n} štětců ze souboru {file}
+@plural Imported {n} gradient from {file}|Imported {n} gradients from {file} Importován {n} přechod ze souboru {file}|Importovány {n} přechody ze souboru {file}|Importováno {n} přechodů ze souboru {file}
+ Data Set: {name} ({index}/{total}) Datová sada: {name} ({index}/{total})
+ (none) (žádná)
+navigator Zoom Zvětšení
+@plural {n} plane|{n} planes {n} rovina|{n} roviny|{n} rovin
+@plural {n} slice|{n} slices {n} řez|{n} řezy|{n} řezů
+@plural {n} preset|{n} presets {n} přednastavení|{n} přednastavení|{n} přednastavení
+@plural {n} layer recorded by this comp was deleted. Update the comp, or clear the warning.|{n} layers recorded by this comp were deleted. Update the comp, or clear the warning. {n} vrstva zaznamenaná v této kompozici byla odstraněna. Aktualizujte kompozici nebo zrušte upozornění.|{n} vrstvy zaznamenané v této kompozici byly odstraněny. Aktualizujte kompozici nebo zrušte upozornění.|{n} vrstev zaznamenaných v této kompozici bylo odstraněno. Aktualizujte kompozici nebo zrušte upozornění.
+ Apply {option}: {state} Použít: {option} ({state})
+ on zapnuto
+ off vypnuto
+ This adjustment ({key}) is kept as imported and can't be edited yet. Tato úprava ({key}) se uchovává v importované podobě a zatím ji nelze měnit.
+ Join the ArtCraft Discord ({url}) Přidejte se na Discord ArtCraft ({url})
+ {index} of {total} {index} z {total}
+@plural {n} step|{n} steps {n} krok|{n} kroky|{n} kroků
+ {shortcut} assigned. Zkratka {shortcut} přiřazena.
+ {shortcut} is already in use by {commands} and will be removed from it when you click OK. Zkratka {shortcut} se již používá pro {commands}. Kliknutím na OK původní přiřazení zrušíte.
# Print dialog (#2697)
Emulsion Down Emulze dolů
Functions Funkce
diff --git a/crates/ui-egui/src/i18n/live_tests.rs b/crates/ui-egui/src/i18n/live_tests.rs
index 206629a2e..ea9aea440 100644
--- a/crates/ui-egui/src/i18n/live_tests.rs
+++ b/crates/ui-egui/src/i18n/live_tests.rs
@@ -355,3 +355,61 @@ fn drawn_text(h: &egui_kittest::Harness<'_, PhotocraftApp>) -> Vec<String> {
}
text
}
+
+#[test]
+fn czech_status_notices_and_navigator_draw_translated_text() {
+ with_language(Lang::EN, || {
+ let mut h = harness();
+ h.state_mut().run("prefs.set", json!({"path": "interface.language", "value": "cs"})).expect("language");
+ h.state_mut().ui.panels.navigator = true;
+ h.run_steps(4);
+ with_language(lang("cs"), || {
+ h.state_mut().open_failed("English file.psd", "disk full");
+ crate::notices::post(
+ h.state_mut(),
+ "Preferences can't be saved",
+ vec!["PhotoCraft keeps retrying; until a save succeeds, preference changes are lost when it closes.".into()],
+ true,
+ None,
+ );
+ let info = crate::gpu_canvas::GpuInfo { driver: "Mesa 25.0".into(), ..Default::default() };
+ assert!(info.lines().iter().any(|line| line == "Ovladač: Mesa 25.0"));
+ });
+ h.run_steps(4);
+ let text = drawn_text(&h);
+ for want in ["Zvětšení", "Soubor English file.psd se nepodařilo otevřít: disk full", "Předvolby nelze uložit"] {
+ assert!(text.iter().any(|text| text == want), "missing {want}: {text:?}");
+ }
+ // Czech text must be drawable by the bundled fonts, including the new notices.
+ let chars: std::collections::BTreeSet<_> = text.iter().flat_map(|s| s.chars()).filter(|c| !c.is_whitespace()).collect();
+ h.ctx.fonts_mut(|fonts| {
+ let font = egui::FontId::proportional(12.0);
+ for c in chars {
+ assert!(fonts.has_glyph(&font, c), "missing glyph {c}");
+ }
+ });
+ });
+}
+
+#[test]
+fn czech_shortcut_conflicts_keep_warning_state_and_shortcut_codes() {
+ with_language(Lang::EN, || {
+ let mut h = harness();
+ h.state_mut().run("prefs.set", json!({"path": "interface.language", "value": "cs"})).expect("language");
+ let ctx = h.ctx.clone();
+ let result = crate::menus::invoke(h.state_mut(), &ctx, "edit.keyboardShortcuts", json!({})).expect("shortcut dialog");
+ let id = result["dialog"].as_u64().expect("dialog id");
+ h.run_steps(4);
+ let fields = &mut h.state_mut().ui.dialogs.iter_mut().find(|d| d.id == id).expect("dialog").fields;
+ fields.insert("selected".into(), json!("file.new"));
+ fields.insert("capture".into(), json!(true));
+ let mods = egui::Modifiers { ctrl: true, command: true, ..Default::default() };
+ h.event(egui::Event::Key { key: egui::Key::O, physical_key: None, pressed: true, repeat: false, modifiers: mods });
+ h.event(egui::Event::Key { key: egui::Key::O, physical_key: None, pressed: false, repeat: false, modifiers: mods });
+ h.run_steps(4);
+ let fields = &h.state().ui.dialogs.iter().find(|d| d.id == id).expect("dialog").fields;
+ assert_eq!(fields["messageWarning"], json!(true));
+ assert!(fields["message"].as_str().expect("message").contains("již používá"));
+ assert_eq!(fields["overrides"]["file.new"], json!("Cmd+O"));
+ });
+}
diff --git a/crates/ui-egui/src/i18n/mod.rs b/crates/ui-egui/src/i18n/mod.rs
index bac9f2bc1..a9e6a2b07 100644
--- a/crates/ui-egui/src/i18n/mod.rs
+++ b/crates/ui-egui/src/i18n/mod.rs
@@ -795,6 +795,73 @@ mod tests {
assert!(code.starts_with("a\n") && code.ends_with("\nc"), "{code}");
}
+ #[test]
+ fn czech_status_templates_preserve_details_and_plural_counts() {
+ let cs = CS();
+ let template = "Step {step} ({id}) failed: {error}";
+ let args = [("step", "2"), ("id", "file.export"), ("error", "disk full: /tmp/image.psd")];
+ assert_eq!(fmt(tr(cs, template), &args), "Krok 2 (file.export) selhal: disk full: /tmp/image.psd");
+ assert_eq!(fmt(tr(Lang::EN, template), &args), "Step 2 (file.export) failed: disk full: /tmp/image.psd");
+ // Languages without these dynamic templates keep the English source.
+ assert_eq!(tr(JA(), template), template);
+ for (n, expected) in [(0, "Odstraněno 0 bodů měření"), (1, "Odstraněn 1 bod měření"), (2, "Odstraněny 2 body měření"), (5, "Odstraněno 5 bodů měření")]
+ {
+ assert_eq!(trn(cs, n, "{n} sample point removed", "{n} sample points removed"), expected);
+ }
+ let one = "Imported {n} swatch from {file}";
+ let other = "Imported {n} swatches from {file}";
+ assert_eq!(fmt(&trn(cs, 3, one, other), &[("file", "English name.aco")]), "Importovány 3 vzorky ze souboru English name.aco");
+ assert_eq!(tr(cs, "Preferences can't be saved"), "Předvolby nelze uložit");
+ }
+
+ #[test]
+ fn czech_dialog_and_hardware_labels_preserve_names() {
+ let cs = CS();
+ for label in [
+ "New Crop Preset…",
+ "Delete Crop Preset…",
+ "Color Picker (Background Color)",
+ "Color Picker (Foreground Color)",
+ "Pro (Medium Gray)",
+ "Grid view",
+ "List view",
+ "Scroll menu up",
+ "Scroll menu down",
+ "Commit transform",
+ "Cancel transform",
+ ] {
+ assert_ne!(tr(cs, label), label, "{label}");
+ }
+ for kind in [
+ crate::rasterize_prompt::Kind::Type,
+ crate::rasterize_prompt::Kind::Shape,
+ crate::rasterize_prompt::Kind::SmartObject,
+ crate::rasterize_prompt::Kind::Fill,
+ ] {
+ assert_ne!(tr(cs, kind.message()), kind.message());
+ }
+ assert_eq!(fmt(tr(cs, "Driver: {driver}"), &[("driver", "Mesa 25.0")]), "Ovladač: Mesa 25.0");
+ assert_eq!(
+ fmt(tr(cs, "Monitor profile on {display}: {profile}"), &[("display", "DELL U2720Q"), ("profile", "sRGB IEC61966-2.1")]),
+ "Profil monitoru DELL U2720Q: sRGB IEC61966-2.1"
+ );
+ }
+
+ #[test]
+ fn czech_composed_labels_use_context_and_preserve_document_names() {
+ let cs = CS();
+ assert_eq!(tr(cs, "Zoom"), "Lupa");
+ assert_eq!(tr_ctx(cs, "navigator", "Zoom"), "Zvětšení");
+ assert_eq!(tr_ctx(Lang::EN, "navigator", "Zoom"), "Zoom");
+ let template = "Data Set: {name} ({index}/{total})";
+ assert_eq!(fmt(tr(cs, template), &[("name", "Data Set 1"), ("index", "1"), ("total", "2")]), "Datová sada: Data Set 1 (1/2)");
+ for (n, expected) in
+ [(1, "Importován 1 přechod ze souboru Sunset"), (3, "Importovány 3 přechody ze souboru Sunset"), (5, "Importováno 5 přechodů ze souboru Sunset")]
+ {
+ assert_eq!(fmt(&trn(cs, n, "Imported {n} gradient from {file}", "Imported {n} gradients from {file}"), &[("file", "Sunset")]), expected);
+ }
+ }
+
/// Every `tl!("literal")` in the shell has an entry in each language that claims complete menus
/// (so a new label can't ship untranslated by accident). Literals that are deliberately shown as
/// they are (names, units) are listed in `KEEP_AS_IS`.
diff --git a/crates/ui-egui/src/jobs_ui.rs b/crates/ui-egui/src/jobs_ui.rs
index d3049f218..07c235846 100644
--- a/crates/ui-egui/src/jobs_ui.rs
+++ b/crates/ui-egui/src/jobs_ui.rs
@@ -476,7 +476,10 @@ fn on_event(app: &mut PhotocraftApp, ctx: &egui::Context, e: JobEvent) {
JobOutcome::Done(v) if e.command == "brush.presets.importAbr" => {
let n = v.get("count").and_then(Value::as_u64).unwrap_or(0);
let group = v.get("group").and_then(Value::as_str).unwrap_or_default();
- app.ui.status = format!("Imported {n} brushes from {group}");
+ app.ui.status = crate::i18n::fmt(
+ &crate::i18n::trn(crate::i18n::current(), n, "Imported {n} brush from {group}", "Imported {n} brushes from {group}"),
+ &[("group", group)],
+ );
app.ui.status_error = false;
app.ui.panels.brush_settings = true;
app.ui.brush_tab = 1;
@@ -513,14 +516,14 @@ fn finish_open(app: &mut PhotocraftApp, name: &str, path: Option<&str>, v: &Valu
app.opened_from(p);
}
app.sync_views();
- app.ui.status = format!("Opened {name}");
+ app.ui.status = crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]);
app.ui.status_error = false;
// A raw opens in Camera Raw first; the dialog says how it was developed.
if crate::camera_raw_ui::wants_open_dialog(app, &warnings) {
crate::camera_raw_ui::queue_open_dialog(app, name, path, None);
- notices::io_warnings(app, &format!("Opened {name}"), &crate::camera_raw_ui::without_develop_note(&warnings));
+ notices::io_warnings(app, &crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]), &crate::camera_raw_ui::without_develop_note(&warnings));
} else {
- notices::io_warnings(app, &format!("Opened {name}"), &warnings);
+ notices::io_warnings(app, &crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]), &warnings);
}
// Script events bound to "Open Document".
photocraft_engine::automate_cmds::document_opened(&mut app.session);
diff --git a/crates/ui-egui/src/kys_import.rs b/crates/ui-egui/src/kys_import.rs
index 0e6696c07..41edaa172 100644
--- a/crates/ui-egui/src/kys_import.rs
+++ b/crates/ui-egui/src/kys_import.rs
@@ -65,6 +65,7 @@ pub fn import_text(app: &mut PhotocraftApp, file_name: &str, text: &str) -> Resu
f.insert("selected".into(), json!(""));
f.insert("capture".into(), json!(false));
f.insert("message".into(), json!(message));
+ f.insert("messageWarning".into(), json!(false));
Ok(json!({
"dialog": id,
"name": set.name,
diff --git a/crates/ui-egui/src/kys_import_tests.rs b/crates/ui-egui/src/kys_import_tests.rs
index 34660ceda..cf389e765 100644
--- a/crates/ui-egui/src/kys_import_tests.rs
+++ b/crates/ui-egui/src/kys_import_tests.rs
@@ -127,6 +127,7 @@ fn import_button_fills_the_dialog_and_ok_applies_the_set() {
let id = crate::menus::invoke(h.state_mut(), &ctx, "edit.keyboardShortcuts", json!({})).unwrap()["dialog"].as_u64().unwrap();
// A short list keeps the button row on screen.
h.state_mut().ui.dialog_mut(id).unwrap().fields.insert("filter".into(), json!("gaussian"));
+ h.state_mut().ui.dialog_mut(id).unwrap().fields.insert("messageWarning".into(), json!(true));
h.run_steps(2);
h.get_by_label("Import Shortcuts…").click();
h.run_steps(3);
@@ -144,6 +145,7 @@ fn import_button_fills_the_dialog_and_ok_applies_the_set() {
let message = field(&h, "message");
assert_eq!(message, json!("Imported 9 shortcuts from texcuts.kys. Click OK to keep them. 2 commands are not in PhotoCraft."));
assert_eq!(field(&h, "capture"), json!(false));
+ assert_eq!(field(&h, "messageWarning"), json!(false), "an import clears the earlier shortcut conflict warning");
// Nothing is applied until OK.
assert_eq!(crate::shortcuts::effective_shortcut(h.state(), "edit.undo", Some("Cmd+Z")).as_deref(), Some("Cmd+Shift+Z"));
crate::dialogs::confirm(h.state_mut(), id).unwrap();
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 8a90bacd6..6ae23a6e4 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -895,7 +895,8 @@ impl PhotocraftApp {
}
if self.session.clipboard.is_none() && self.services.clipboard_get_image.is_some() {
// Enabled on the strength of the OS clipboard, which held no image: a quiet no-op.
- self.ui.status = "Nothing to paste: the clipboard holds no image".into();
+ let message = "Nothing to paste: the clipboard holds no image";
+ self.ui.status = tl!(message).into();
self.ui.status_error = false;
return Ok(serde_json::json!({"pasted": false}));
}
@@ -953,7 +954,7 @@ impl PhotocraftApp {
if removed > 0 {
// A canvas-size change (crop, Canvas Size, Image Size, rotation) dropped Color
// Sampler points that fell outside the new canvas (#1046).
- self.ui.status = if removed == 1 { "1 sample point removed".into() } else { format!("{removed} sample points removed") };
+ self.ui.status = crate::i18n::trn(crate::i18n::current(), removed as u64, "{n} sample point removed", "{n} sample points removed");
self.ui.status_error = false;
}
if self.ui.status_error {
@@ -1088,13 +1089,13 @@ impl PhotocraftApp {
st.source_read_only = photocraft_io::affinity::is_affinity(bytes);
}
self.sync_views();
- self.ui.status = format!("Opened {name}");
+ self.ui.status = crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]);
self.ui.status_error = false;
if camera_raw_ui::wants_open_dialog(self, &warnings) {
camera_raw_ui::queue_open_dialog(self, name, None, Some(bytes));
- notices::io_warnings(self, &format!("Opened {name}"), &camera_raw_ui::without_develop_note(&warnings));
+ notices::io_warnings(self, &crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]), &camera_raw_ui::without_develop_note(&warnings));
} else {
- notices::io_warnings(self, &format!("Opened {name}"), &warnings);
+ notices::io_warnings(self, &crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]), &warnings);
}
// Script events bound to "Open Document".
photocraft_engine::automate_cmds::document_opened(&mut self.session);
@@ -1137,9 +1138,9 @@ impl PhotocraftApp {
st.source_read_only = photocraft_io::affinity::is_affinity(bytes);
}
self.sync_views();
- self.ui.status = format!("Opened {name}");
+ self.ui.status = crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]);
self.ui.status_error = false;
- notices::io_warnings(self, &format!("Opened {name}"), &warnings);
+ notices::io_warnings(self, &crate::i18n::fmt(tl!("Opened {name}"), &[("name", name)]), &warnings);
Ok(warnings)
}
@@ -1341,7 +1342,11 @@ impl PhotocraftApp {
&& let Some(i) = app.session.active_index()
&& let Some(r) = photocraft_engine::automate_cmds::document_saved(&mut app.session, i)
{
- app.ui.status = format!("Saved {path}; {} image assets in {}", r["files"].as_array().map_or(0, Vec::len), r["dir"].as_str().unwrap_or(""));
+ let template = "Saved {path}; image assets: {n} in {dir}";
+ app.ui.status = crate::i18n::fmt(
+ tl!(template),
+ &[("path", path), ("n", &r["files"].as_array().map_or(0, Vec::len).to_string()), ("dir", r["dir"].as_str().unwrap_or(""))],
+ );
}
Ok(())
});
diff --git a/crates/ui-egui/src/links.rs b/crates/ui-egui/src/links.rs
index d81bbcde0..e01a19d93 100644
--- a/crates/ui-egui/src/links.rs
+++ b/crates/ui-egui/src/links.rs
@@ -27,7 +27,8 @@ pub fn open(app: &mut PhotocraftApp, ctx: &egui::Context, url: &str) -> Value {
if !opened {
ctx.open_url(egui::OpenUrl::new_tab(url));
}
- app.ui.status = format!("Opened {url}");
+ let template = "Opened {url}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("url", url)]);
json!({"url": url})
}
diff --git a/crates/ui-egui/src/mask_thumbs_ui.rs b/crates/ui-egui/src/mask_thumbs_ui.rs
index 562b2b752..20f0b965d 100644
--- a/crates/ui-egui/src/mask_thumbs_ui.rs
+++ b/crates/ui-egui/src/mask_thumbs_ui.rs
@@ -119,7 +119,14 @@ pub fn paint(
}
let (verb, what, name) = (if linked { "Unlink" } else { "Link" }, kind.label(), l.name.clone());
let resp = resp.on_hover_text(if linked { tl!("Unlink the mask from the layer") } else { tl!("Link the mask to the layer") });
- resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, format!("{verb} {what} {name}")));
+ let template = "{verb} {mask} {layer}";
+ resp.widget_info(|| {
+ egui::WidgetInfo::labeled(
+ egui::WidgetType::Button,
+ true,
+ crate::i18n::fmt(tl!(template), &[("verb", tl!(verb)), ("mask", tl!(what)), ("layer", &name)]),
+ )
+ });
if resp.clicked() {
out.clicked = true;
actions.push((format!("{}.linked", kind.command()), json!({"layer": l.id.0, "linked": !linked})));
diff --git a/crates/ui-egui/src/menu_nav.rs b/crates/ui-egui/src/menu_nav.rs
index 51842c352..7924fa8de 100644
--- a/crates/ui-egui/src/menu_nav.rs
+++ b/crates/ui-egui/src/menu_nav.rs
@@ -483,7 +483,8 @@ pub fn level(ui: &mut Ui, depth: usize, nav: &mut Nav, rows: impl FnOnce(&mut Ui
ui.painter().add(egui::Shape::convex_polygon(tri, if live { t.text } else { t.text_faint.gamma_multiply(0.5) }, egui::Stroke::NONE));
let id = key.with(dir < 0.0);
let r = ui.interact(strip, id, Sense::hover());
- r.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, live, if dir < 0.0 { "Scroll menu up" } else { "Scroll menu down" }));
+ let label = if dir < 0.0 { "Scroll menu up" } else { "Scroll menu down" };
+ r.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, live, tl!(label)));
if live && pointer_on(ui, strip) {
target = (offset + dir * SPEED * dt.max(1.0 / 120.0)).clamp(0.0, max);
ctx.request_repaint();
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index be88ab8b8..690069daa 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -326,7 +326,8 @@ pub(crate) fn invoke_unguarded(app: &mut PhotocraftApp, ctx: &egui::Context, id:
#[cfg(target_arch = "wasm32")]
{
let _ = app;
- Err("Open Recent is unavailable on the web".to_string())
+ let message = "Open Recent is unavailable on the web";
+ Err(tl!(message).to_string())
}
}
"file.saveAs" => {
diff --git a/crates/ui-egui/src/monitor_status.rs b/crates/ui-egui/src/monitor_status.rs
index fd485e7b9..1f0d03a5d 100644
--- a/crates/ui-egui/src/monitor_status.rs
+++ b/crates/ui-egui/src/monitor_status.rs
@@ -135,14 +135,35 @@ pub fn read_now(app: &mut PhotocraftApp) {
/// now (the dialog asks again each time it draws).
pub fn note(app: &PhotocraftApp) -> String {
let st = app.session.color.monitor_status();
- let on = st.display.as_ref().map(|d| format!(" on {d}")).unwrap_or_default();
- format!("Monitor profile in use{on}: {}{}", st.summary(), retained(app).map(|r| format!(" ({r})")).unwrap_or_default())
+ let template = if st.display.is_some() { "Monitor profile in use on {display}: {profile}" } else { "Monitor profile in use: {profile}" };
+ let profile = profile_summary(&st);
+ let mut note = crate::i18n::fmt(tl!(template), &[("display", st.display.as_deref().unwrap_or_default()), ("profile", &profile)]);
+ if let Some(reason) = retained(app) {
+ note.push_str(&format!(" ({reason})"));
+ }
+ note
+}
+
+/// Display-only counterpart of the engine's English monitor summary.
+fn profile_summary(st: &photocraft_engine::display_color::MonitorStatus) -> String {
+ let name = match (&st.profile_name, st.source) {
+ (Some(name), "auto") => name.as_str(),
+ _ => st.profile.as_str(),
+ };
+ let source = tl!(st.source);
+ match &st.reason {
+ Some(reason) => format!("{name} ({source}: {reason})"),
+ None => format!("{name} ({source})"),
+ }
}
/// When the last re-read failed and an earlier reading is shown: why.
fn retained(app: &PhotocraftApp) -> Option<String> {
match &app.session.color.monitor_detection {
- MonitorDetection::Retained { reason } => Some(format!("previous reading kept; the last re-read failed: {reason}")),
+ MonitorDetection::Retained { reason } => Some({
+ let template = "previous reading kept; the last re-read failed: {reason}";
+ crate::i18n::fmt(tl!(template), &[("reason", reason)])
+ }),
_ => None,
}
}
@@ -184,8 +205,12 @@ pub fn apply(app: &mut PhotocraftApp, r: Detection) {
continue;
}
app.monitors.reported.push((id, reason.clone()));
- let on = if name.is_empty() { String::new() } else { format!(" on {name}") };
- let lines = vec![reason, format!("The canvas{on} is shown as sRGB. Choose a monitor profile in Edit › Color Settings.")];
+ let template = if name.is_empty() {
+ "The canvas is shown as sRGB. Choose a monitor profile in Edit › Color Settings."
+ } else {
+ "The canvas on {display} is shown as sRGB. Choose a monitor profile in Edit › Color Settings."
+ };
+ let lines = vec![reason, crate::i18n::fmt(tl!(template), &[("display", &name)])];
crate::notices::post(app, FALLBACK_TITLE, lines, true, None);
}
}
@@ -230,17 +255,24 @@ fn displays_changed(app: &PhotocraftApp, ctx: &egui::Context) -> bool {
pub fn summary_lines(app: &PhotocraftApp) -> Vec<String> {
let c = &app.session.color;
if c.displays.is_empty() {
- return vec![format!("Monitor profile: {}", c.monitor_status().summary())];
+ return vec![{
+ let template = "Monitor profile: {profile}";
+ crate::i18n::fmt(tl!(template), &[("profile", &profile_summary(&c.monitor_status()))])
+ }];
}
let mut lines: Vec<String> = c
.displays
.iter()
.map(|d| {
- let main = if c.main_display == Some(d.id) { " (main window)" } else { "" };
- format!("Monitor profile on {}{main}: {}", d.name, c.monitor_status_for(Some(d.id)).summary())
+ let template =
+ if c.main_display == Some(d.id) { "Monitor profile on {display} (main window): {profile}" } else { "Monitor profile on {display}: {profile}" };
+ crate::i18n::fmt(tl!(template), &[("display", &d.name), ("profile", &profile_summary(&c.monitor_status_for(Some(d.id))))])
})
.collect();
- lines.extend(retained(app).map(|r| format!("Display profiles: {r}")));
+ lines.extend(retained(app).map(|r| {
+ let template = "Display profiles: {reason}";
+ crate::i18n::fmt(tl!(template), &[("reason", &r)])
+ }));
lines
}
diff --git a/crates/ui-egui/src/notices.rs b/crates/ui-egui/src/notices.rs
index d7fe5a59b..146b8b818 100644
--- a/crates/ui-egui/src/notices.rs
+++ b/crates/ui-egui/src/notices.rs
@@ -130,9 +130,10 @@ fn dismiss(app: &mut PhotocraftApp, id: u64) {
pub fn io_warnings(app: &mut PhotocraftApp, what: &str, warnings: &[String]) {
let Some(first) = warnings.first() else { return };
let n = warnings.len();
- app.ui.status = if n == 1 { format!("{what}: {first}") } else { format!("{what} with {n} warnings: {first} …") };
+ let title = crate::i18n::fmt(&crate::i18n::trn(crate::i18n::current(), n as u64, "{what} with {n} warning", "{what} with {n} warnings"), &[("what", what)]);
+ app.ui.status = if n == 1 { format!("{what}: {first}") } else { format!("{title}: {first} …") };
app.ui.status_error = true;
- post(app, format!("{what} with {n} warning{}", if n == 1 { "" } else { "s" }), warnings.to_vec(), false, None);
+ post(app, title, warnings.to_vec(), false, None);
}
/// Report a failed file operation: the status bar shows it as an error and a notice keeps it on
@@ -371,6 +372,25 @@ mod tests {
assert!(!text.contains("Memory usage"), "the budget hint is only for the budget fallback: {text}");
}
+ #[test]
+ fn import_warning_punctuation_is_localized_without_changing_english() {
+ let mut app = PhotocraftApp::new(Session::new(), Services::default());
+ for (lang, expected) in [
+ (crate::i18n::Lang::EN, "Opened x.psd with 3 warnings: first warning …"),
+ (crate::i18n::Lang::from_code("cs").unwrap(), "Otevřeno: x.psd (3 upozornění): first warning …"),
+ ] {
+ crate::i18n::with_language(lang, || {
+ let what = crate::i18n::fmt(tl!("Opened {name}"), &[("name", "x.psd")]);
+ let warnings = vec!["first warning".into(), "second warning".into(), "third warning".into()];
+ io_warnings(&mut app, &what, &warnings);
+ assert_eq!(app.ui.status, expected);
+ assert_eq!(app.ui.notices.last().unwrap().lines, warnings);
+ io_warnings(&mut app, &what, &warnings[..1]);
+ assert_eq!(app.ui.status, format!("{what}: first warning"));
+ });
+ }
+ }
+
#[test]
fn dismissing_a_notice_writes_its_own_preference_key() {
let mut app = PhotocraftApp::new(Session::new(), Services::default());
diff --git a/crates/ui-egui/src/panel_docking.rs b/crates/ui-egui/src/panel_docking.rs
index 1c4cd92f9..bc6bfcf08 100644
--- a/crates/ui-egui/src/panel_docking.rs
+++ b/crates/ui-egui/src/panel_docking.rs
@@ -387,7 +387,8 @@ pub(crate) fn show(app: &mut PhotocraftApp, ui: &mut egui::Ui) -> bool {
let Some(layout) = app.ui.docking.as_ref() else { return false };
if !valid(layout) {
app.ui.docking = None;
- app.ui.status = "Invalid panel layout; restored the default dock".into();
+ let message = "Invalid panel layout; restored the default dock";
+ app.ui.status = tl!(message).into();
return false;
}
let layout = layout.clone();
diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs
index b423b0503..e35e2fc67 100644
--- a/crates/ui-egui/src/panels.rs
+++ b/crates/ui-egui/src/panels.rs
@@ -628,7 +628,14 @@ pub fn title_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
egui::RichText::new(tl!("Discord")).color(t.text_dim).size(12.0),
)
.frame(false);
- if ui.add(discord).on_hover_text(format!("Join the ArtCraft Discord ({})", crate::links::DISCORD)).clicked() {
+ if ui
+ .add(discord)
+ .on_hover_text({
+ let template = "Join the ArtCraft Discord ({url})";
+ crate::i18n::fmt(tl!(template), &[("url", crate::links::DISCORD)])
+ })
+ .clicked()
+ {
crate::links::open(app, ui.ctx(), crate::links::DISCORD);
}
}
@@ -950,7 +957,7 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
ui.add_enabled_ui(!block && !crate::eraser_ui::pencil_mode(app, app.ui.tool), |ui| {
percent_field(ui, tl!("Flow"), &mut b.flow, 1.0..=100.0, 62.0);
let airbrush = icons::button(ui, "sparkles", 24.0, b.build_up, tl!("Enable airbrush-style build-up effects"));
- if crate::brush_picker::named(airbrush, tl!("Enable airbrush-style build-up effects")).clicked() {
+ if crate::brush_picker::named(airbrush, "Enable airbrush-style build-up effects").clicked() {
b.build_up = !b.build_up;
}
});
@@ -1838,7 +1845,7 @@ fn navigator(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let controls = ui.vertical(|ui| {
ui.add_space(4.0);
ui.horizontal(|ui| {
- label(ui, tl!("Zoom"));
+ label(ui, crate::i18n::tr_ctx(crate::i18n::current(), "navigator", "Zoom"));
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
for (lbl, z) in [("200%", 2.0), ("100%", 1.0)] {
if widgets::pill_tab(ui, lbl, (v.zoom - z).abs() < 1e-3).clicked() {
@@ -3423,7 +3430,7 @@ fn smoothing_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings,
/// like the Smoothing % (so they stay per tool and reach the live stroke and the commit).
fn smoothing_options(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) {
let resp = icons::button(ui, "settings", 24.0, false, tl!("Set additional smoothing options"));
- let resp = crate::brush_picker::named(resp, tl!("Set additional smoothing options"));
+ let resp = crate::brush_picker::named(resp, "Set additional smoothing options");
egui::Popup::from_toggle_button_response(&resp).close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside).show(|ui| {
let s = &mut b.smoothing;
widgets::checkbox(ui, &mut s.pulled_string, tl!("Pulled String Mode"));
diff --git a/crates/ui-egui/src/perspective_ui.rs b/crates/ui-egui/src/perspective_ui.rs
index 9115b141e..8afe1113d 100644
--- a/crates/ui-egui/src/perspective_ui.rs
+++ b/crates/ui-egui/src/perspective_ui.rs
@@ -318,7 +318,7 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
}
}
} else {
- ui.label(format!("{} plane(s)", s.planes.len()));
+ ui.label(crate::i18n::trn(crate::i18n::current(), s.planes.len() as u64, "{n} plane", "{n} planes"));
if ui.button(tl!("Remove Planes")).clicked() {
s.planes.clear();
s.update_grid();
diff --git a/crates/ui-egui/src/prefs_ui.rs b/crates/ui-egui/src/prefs_ui.rs
index 860b8dc28..ba218c0ca 100644
--- a/crates/ui-egui/src/prefs_ui.rs
+++ b/crates/ui-egui/src/prefs_ui.rs
@@ -211,7 +211,8 @@ pub fn load(app: &mut PhotocraftApp) {
if let Some(text) = app.services.load_prefs.as_mut().and_then(|f| f())
&& let Err(e) = app.session.load_prefs_json(&text)
{
- app.ui.status = format!("Preferences were reset: {e}");
+ let template = "Preferences were reset: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
}
crate::dock::restore(app);
crate::brush_picker::restore(app);
@@ -292,7 +293,8 @@ fn finish_recovery(app: &mut PhotocraftApp, key: &str, v: &Value) {
app.ui.chrome.home = None;
}
app.sync_views();
- app.ui.status = format!("Recovered {name}");
+ let template = "Recovered {name}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("name", &name)]);
app.ui.status_error = false;
}
@@ -310,7 +312,7 @@ pub(crate) fn on_recovery_event(app: &mut PhotocraftApp, e: &JobEvent) -> bool {
// Native bundle decoding cannot stop midway. Cancel admission and the rest of the
// batch so another large decoder isn't started while this worker finishes.
app.prefs_rt.recovery_queue.clear();
- app.ui.status = format!("Cancelled {}", e.label);
+ app.ui.status = crate::i18n::fmt(tl!("Cancelled {label}"), &[("label", tl!(&e.label))]);
app.ui.status_error = false;
}
}
@@ -327,7 +329,19 @@ fn presets_store(app: &mut PhotocraftApp) {
app.services.preset_store = None;
let warnings = app.session.attach_preset_store(opened);
if let Some(w) = warnings.first() {
- app.ui.status = if warnings.len() == 1 { w.clone() } else { format!("{w} (+{} more brush preset warnings)", warnings.len() - 1) };
+ app.ui.status = if warnings.len() == 1 {
+ w.clone()
+ } else {
+ crate::i18n::fmt(
+ &crate::i18n::trn(
+ crate::i18n::current(),
+ (warnings.len() - 1) as u64,
+ "{warning} (+{n} more brush preset warning)",
+ "{warning} (+{n} more brush preset warnings)",
+ ),
+ &[("warning", w)],
+ )
+ };
}
}
Err(std::sync::mpsc::TryRecvError::Empty) => {}
@@ -453,7 +467,8 @@ fn persist(app: &mut PhotocraftApp, now: f64) -> Option<f64> {
app.prefs_rt.saved_value = Some(ours);
let r = std::mem::take(&mut app.prefs_rt.save_retry);
if r.failures > 0 {
- app.ui.status = "Preferences saved".into();
+ let message = "Preferences saved";
+ app.ui.status = tl!(message).into();
app.ui.status_error = false;
if let Some(id) = r.notice {
app.ui.notices.retain(|n| n.id != id);
@@ -469,7 +484,8 @@ fn persist(app: &mut PhotocraftApp, now: f64) -> Option<f64> {
r.at = now + delay;
let failures = r.failures;
if failures == 1 {
- app.ui.status = format!("Couldn't save preferences: {e}. Retrying…");
+ let template = "Couldn't save preferences: {error}. Retrying…";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
app.ui.status_error = true;
} else if failures == SAVE_NOTICE_AFTER {
let lines = vec![e, "PhotoCraft keeps retrying; until a save succeeds, preference changes are lost when it closes.".into()];
@@ -547,7 +563,12 @@ fn link_updates(app: &mut PhotocraftApp, ctx: &egui::Context) {
match app.session.poll_link_scan() {
Some(Ok(r)) => {
if let Some(n) = r["updated"].as_array().map(Vec::len).filter(|n| *n > 0) {
- app.ui.status = format!("Updated {n} linked smart object(s) changed on disk");
+ app.ui.status = crate::i18n::trn(
+ crate::i18n::current(),
+ n as u64,
+ "Updated {n} linked smart object changed on disk",
+ "Updated {n} linked smart objects changed on disk",
+ );
}
}
Some(Err(e)) => app.ui.status = e.to_string(),
@@ -592,7 +613,8 @@ fn autosave(app: &mut PhotocraftApp) {
app.prefs_rt.autosaved.insert(id, revision);
}
Err(e) => {
- app.ui.status = format!("Autosave failed: {e}");
+ let template = "Autosave failed: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
app.ui.status_error = true;
}
}
@@ -641,7 +663,8 @@ fn autosave(app: &mut PhotocraftApp) {
}
}
Err(e) => {
- app.ui.status = format!("Autosave failed: {e}");
+ let template = "Autosave failed: {error}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("error", &e)]);
app.ui.status_error = true;
}
}
@@ -961,13 +984,11 @@ pub fn open_shortcuts(app: &mut PhotocraftApp, tab: u64) -> u64 {
/// Open the Embedded Profile Mismatch prompt for the active document.
pub fn open_mismatch(app: &mut PhotocraftApp, report: &Value) -> u64 {
let msg = if report.get("missing").and_then(Value::as_bool) == Some(true) {
- format!("The document does not have an embedded colour profile. Working space: {}.", report["working"].as_str().unwrap_or("?"))
+ let template = "The document does not have an embedded colour profile. Working space: {working}.";
+ crate::i18n::fmt(tl!(template), &[("working", report["working"].as_str().unwrap_or("?"))])
} else {
- format!(
- "The document has an embedded colour profile that does not match the working space.\nEmbedded: {}\nWorking: {}",
- report["embedded"].as_str().unwrap_or("?"),
- report["working"].as_str().unwrap_or("?")
- )
+ let template = "The document has an embedded colour profile that does not match the working space.\nEmbedded: {embedded}\nWorking: {working}";
+ crate::i18n::fmt(tl!(template), &[("embedded", report["embedded"].as_str().unwrap_or("?")), ("working", report["working"].as_str().unwrap_or("?"))])
};
let action = match report["action"].as_str() {
Some("converted") => "convert",
@@ -1586,6 +1607,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
let mut selected = f.get("selected").and_then(Value::as_str).unwrap_or("").to_string();
let mut capture = f.get("capture").and_then(Value::as_bool).unwrap_or(false);
let mut message = f.get("message").and_then(Value::as_str).unwrap_or("").to_string();
+ let mut message_warning = f.get("messageWarning").and_then(Value::as_bool).unwrap_or(false);
let items = shortcut_items(app);
// Menu path and command label as shown in the menus, in the UI language.
let shown = |id: &str, label: &str, path: &[String]| -> (Vec<String>, String) {
@@ -1617,6 +1639,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
overrides.insert(selected.clone(), String::new());
capture = false;
message = tl!("Shortcut removed.").into();
+ message_warning = false;
} else if let Some(sc) = shortcut_text(key, m) {
let clash: Vec<String> = items
.iter()
@@ -1627,10 +1650,13 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
})
.collect();
overrides.insert(selected.clone(), sc.clone());
+ message_warning = !clash.is_empty();
message = if clash.is_empty() {
- format!("{} assigned.", crate::shortcuts::pretty(&sc))
+ let template = "{shortcut} assigned.";
+ crate::i18n::fmt(tl!(template), &[("shortcut", &crate::shortcuts::pretty(&sc))])
} else {
- format!("{} is already in use by {} and will be removed from it when you click OK.", crate::shortcuts::pretty(&sc), clash.join(", "))
+ let template = "{shortcut} is already in use by {commands} and will be removed from it when you click OK.";
+ crate::i18n::fmt(tl!(template), &[("shortcut", &crate::shortcuts::pretty(&sc)), ("commands", &clash.join(", "))])
};
capture = false;
}
@@ -1677,6 +1703,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
selected = id.clone();
capture = true;
message.clear();
+ message_warning = false;
}
ui.label(if changed { RichText::new(tl!("modified")).color(t.text_faint).size(10.5) } else { RichText::new("") });
} else {
@@ -1708,14 +1735,17 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
if ui.add_enabled(has_sel, egui::Button::new(tl!("Use Default"))).clicked() {
overrides.remove(&selected);
message = tl!("Default restored.").into();
+ message_warning = false;
}
if ui.add_enabled(has_sel, egui::Button::new(tl!("Delete Shortcut"))).clicked() {
overrides.insert(selected.clone(), String::new());
message = tl!("Shortcut removed.").into();
+ message_warning = false;
}
if ui.button(tl!("Reset All to Defaults")).clicked() {
overrides.clear();
message = tl!("All shortcuts reset to PhotoCraft defaults.").into();
+ message_warning = false;
}
// A Photoshop set (`.kys`) fills the overrides; the file arrives after this frame
// and `kys_import` writes the dialog's fields then (#1163).
@@ -1723,6 +1753,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
&& let Err(e) = crate::kys_import::import_dialog(app)
{
message = e;
+ message_warning = false;
}
});
} else if ui.button(tl!("Show All Menu Items")).clicked() {
@@ -1730,7 +1761,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
colors.clear();
}
if !message.is_empty() {
- ui.label(RichText::new(&message).color(if message.contains("already in use") { t.warning } else { t.text_dim }));
+ ui.label(RichText::new(&message).color(if message_warning { t.warning } else { t.text_dim }));
}
if overrides_ok {
f.insert("overrides".into(), json!(overrides));
@@ -1740,6 +1771,7 @@ fn shortcuts_body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String
f.insert("selected".into(), json!(selected));
f.insert("capture".into(), json!(capture));
f.insert("message".into(), json!(message));
+ f.insert("messageWarning".into(), json!(message_warning));
}
fn toolbar_tab(ui: &mut egui::Ui, f: &mut Map<String, Value>) {
@@ -1914,7 +1946,8 @@ pub fn confirm(app: &mut PhotocraftApp, f: &Map<String, Value>) -> Result<Value,
app.pick_save("Presets.pcpresets", move |app, path| {
let write = app.services.write.as_mut().ok_or("no writer configured")?;
write(&path, text.as_bytes())?;
- app.ui.status = format!("Exported presets to {path}");
+ let template = "Exported presets to {path}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("path", &path)]);
Ok(json!({"path": path}))
})
}
diff --git a/crates/ui-egui/src/preset_files_ui.rs b/crates/ui-egui/src/preset_files_ui.rs
index a3fa49df0..e58961d9b 100644
--- a/crates/ui-egui/src/preset_files_ui.rs
+++ b/crates/ui-egui/src/preset_files_ui.rs
@@ -53,15 +53,25 @@ pub fn open(app: &mut PhotocraftApp, name: &str, bytes: &[u8]) -> Option<Result<
// A background import (#210): `jobs_ui` reports the count when it lands.
if r.get("pending").and_then(Value::as_bool) == Some(true) {
app.ui.status_error = false;
- app.ui.status = format!("Importing {what} from {stem}…");
+ let template = "Importing {what} from {file}…";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("what", tl!(what)), ("file", &stem)]);
return;
}
let n = r.get("count").and_then(Value::as_u64).unwrap_or(0);
let warnings: Vec<String> = r.get("warnings").and_then(|w| serde_json::from_value(w.clone()).ok()).unwrap_or_default();
app.ui.status_error = false;
+ let (one, other) = if what == "brushes" {
+ ("Imported {n} brush from {file}", "Imported {n} brushes from {file}")
+ } else {
+ ("Imported {n} gradient from {file}", "Imported {n} gradients from {file}")
+ };
+ let imported = crate::i18n::fmt(&crate::i18n::trn(crate::i18n::current(), n, one, other), &[("file", &stem)]);
app.ui.status = match warnings.first() {
- Some(w) => format!("Imported {n} {what} from {stem} ({} notes: {w})", warnings.len()),
- None => format!("Imported {n} {what} from {stem}"),
+ Some(warning) => {
+ let template = "{message} (notes: {n}; {warning})";
+ crate::i18n::fmt(tl!(template), &[("message", &imported), ("n", &warnings.len().to_string()), ("warning", warning)])
+ }
+ None => imported,
};
if what == "brushes" {
// Show them: Brush Settings › Brushes tab.
diff --git a/crates/ui-egui/src/preset_panels.rs b/crates/ui-egui/src/preset_panels.rs
index 17737dec1..e2da49f3e 100644
--- a/crates/ui-egui/src/preset_panels.rs
+++ b/crates/ui-egui/src/preset_panels.rs
@@ -834,7 +834,8 @@ pub fn finish_custom_shape(app: &mut PhotocraftApp, rect: [f64; 4], keep: bool,
let name = app.ui.presets_ui.shape().to_string();
let r = run(app, "shape.presets.place", json!({"preset": name, "rect": rect, "keepAspect": keep, "fill": fill, "stroke": stroke}));
if r.is_none() && !photocraft_engine::presets::shapes::all_groups(&app.session).iter().any(|g| g.items.iter().any(|s| s.name == name)) {
- app.ui.status = format!("No custom shape \"{name}\": pick one in the options bar or Window › Shapes");
+ let template = "No custom shape \"{name}\": pick one in the options bar or Window › Shapes";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("name", &name)]);
}
}
diff --git a/crates/ui-egui/src/rasterize_prompt.rs b/crates/ui-egui/src/rasterize_prompt.rs
index a44fc1593..bb1a7570b 100644
--- a/crates/ui-egui/src/rasterize_prompt.rs
+++ b/crates/ui-egui/src/rasterize_prompt.rs
@@ -133,7 +133,7 @@ pub fn body(ui: &mut egui::Ui, f: &Map<String, Value>) {
ui.spacing_mut().item_spacing.x = 12.0;
let (r, _) = ui.allocate_exact_size(egui::vec2(32.0, 32.0), egui::Sense::hover());
crate::icons::paint(ui, r, "triangle-alert", 30.0, t.warning);
- ui.add(egui::Label::new(egui::RichText::new(text).color(t.text).size(13.0)).wrap());
+ ui.add(egui::Label::new(egui::RichText::new(tl!(text)).color(t.text).size(13.0)).wrap());
});
}
diff --git a/crates/ui-egui/src/retouch_ui.rs b/crates/ui-egui/src/retouch_ui.rs
index 8e78a5dd9..5abd5c15b 100644
--- a/crates/ui-egui/src/retouch_ui.rs
+++ b/crates/ui-egui/src/retouch_ui.rs
@@ -287,7 +287,8 @@ pub fn set_source(app: &mut PhotocraftApp, x: f64, y: f64) {
app.ui.clone_source = Some([x.round(), y.round()]);
app.ui.clone_offset = None;
let _ = app.run("cloneSource.set", json!({"source": [x.round(), y.round()]}));
- app.ui.status = format!("Clone source set at {:.0}, {:.0}", x, y);
+ let template = "Clone source set at {x}, {y}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("x", &format!("{x:.0}")), ("y", &format!("{y:.0}"))]);
app.ui.status_error = false;
}
@@ -438,11 +439,11 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bo
crate::widgets::vline(ui, 22.0);
ui.spacing_mut().item_spacing.x = 2.0;
for (k, icon, tip) in [
- ("continuous", "pipette", tl!("Sampling: Continuous")),
- ("once", "circle-dot", tl!("Sampling: Once")),
- ("backgroundSwatch", "square", tl!("Sampling: Background Swatch")),
+ ("continuous", "pipette", "Sampling: Continuous"),
+ ("once", "circle-dot", "Sampling: Once"),
+ ("backgroundSwatch", "square", "Sampling: Background Swatch"),
] {
- if crate::brush_picker::named(crate::icons::button(ui, icon, 24.0, o.cr_sampling == k, tip), tip).clicked() {
+ if crate::brush_picker::named(crate::icons::button(ui, icon, 24.0, o.cr_sampling == k, tl!(tip)), tip).clicked() {
o.cr_sampling = k.into();
}
}
diff --git a/crates/ui-egui/src/shortcut_dispatch.rs b/crates/ui-egui/src/shortcut_dispatch.rs
index 208e5828e..b4bb1b2dc 100644
--- a/crates/ui-egui/src/shortcut_dispatch.rs
+++ b/crates/ui-egui/src/shortcut_dispatch.rs
@@ -309,7 +309,8 @@ pub fn dispatch(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str) {
let command_id = if action.is_some() { "actions.play" } else { id };
let outcome = if !crate::menus::is_enabled(app, command_id) {
let why = disabled_reason(app, command_id);
- app.ui.status = format!("{} is not available: {why}", label(id));
+ let template = "{label} is not available: {reason}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("label", crate::i18n::tr_id(crate::i18n::current(), id, &label(id))), ("reason", tl!(&why))]);
app.ui.status_error = true;
Outcome::Disabled(why)
} else if ctx.data(|d| d.get_temp::<bool>(dry_run_id())).unwrap_or(false) {
diff --git a/crates/ui-egui/src/shortcut_dispatch/tests.rs b/crates/ui-egui/src/shortcut_dispatch/tests.rs
index 3ed56aba5..9174da3ee 100644
--- a/crates/ui-egui/src/shortcut_dispatch/tests.rs
+++ b/crates/ui-egui/src/shortcut_dispatch/tests.rs
@@ -301,6 +301,16 @@ fn a_disabled_shortcut_says_why() {
assert!(!h.state().ui.status.is_empty() && h.state().ui.status_error, "the status bar says why");
}
+#[test]
+fn a_disabled_shortcut_uses_the_command_id_translation() {
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), Default::default());
+ crate::i18n::with_language(crate::i18n::Lang::from_code("cs").unwrap(), || {
+ super::dispatch(&mut app, &egui::Context::default(), "select.all");
+ assert!(app.ui.status.starts_with("Vybrat vše není k dispozici:"), "{}", app.ui.status);
+ assert!(app.ui.status_error);
+ });
+}
+
/// #352: ⌥[ ⌥] ⌥, ⌥. and ⇧⌥[ walk the Layers panel's rows from the keyboard.
#[test]
fn alt_brackets_walk_the_layers_panel() {
@@ -542,7 +552,7 @@ fn named_action_function_key_replays_and_survives_preferences_roundtrip() {
h.state_mut().ui.actions.selected = None;
press(&mut h, "F6");
assert_eq!(active_name(&h), "F6 overlay");
- assert_eq!(h.state().ui.status, "Played 1 steps");
+ assert_eq!(h.state().ui.status, "Played 1 step");
assert!(!h.state().ui.status_error);
assert_eq!(take_log(&h.ctx), vec![(crate::actions::shortcut_id("LivePrint 2R"), Outcome::Ran)]);
h.state_mut().run("actions.delete", json!({"action": "LivePrint 2R"})).unwrap();
diff --git a/crates/ui-egui/src/swatches_ui.rs b/crates/ui-egui/src/swatches_ui.rs
index f4c0f1d19..d8fd9caa4 100644
--- a/crates/ui-egui/src/swatches_ui.rs
+++ b/crates/ui-egui/src/swatches_ui.rs
@@ -162,9 +162,16 @@ pub fn import_bytes(app: &mut PhotocraftApp, name: &str, bytes: &[u8], replace:
let warnings: Vec<String> = r.get("warnings").and_then(|w| serde_json::from_value(w.clone()).ok()).unwrap_or_default();
let shown = crate::file_open::display_name(name);
app.ui.status_error = false;
+ let imported = crate::i18n::fmt(
+ &crate::i18n::trn(crate::i18n::current(), n, "Imported {n} swatch from {file}", "Imported {n} swatches from {file}"),
+ &[("file", &shown)],
+ );
app.ui.status = match warnings.first() {
- Some(w) => format!("Imported {n} swatches from {shown} ({} notes: {w})", warnings.len()),
- None => format!("Imported {n} swatches from {shown}"),
+ Some(warning) => {
+ let template = "{message} (notes: {n}; {warning})";
+ crate::i18n::fmt(tl!(template), &[("message", &imported), ("n", &warnings.len().to_string()), ("warning", warning)])
+ }
+ None => imported,
};
app.ui.panels.color = true;
Ok(r)
@@ -182,7 +189,10 @@ fn export_dialog(app: &mut PhotocraftApp, format: &str) -> Result<Value, String>
let write = app.services.write.as_mut().ok_or("no writer configured")?;
write(&path, &bytes)?;
app.ui.status_error = false;
- app.ui.status = format!("Exported {n} swatches to {}", crate::file_open::display_name(&path));
+ app.ui.status = crate::i18n::fmt(
+ &crate::i18n::trn(crate::i18n::current(), n, "Exported {n} swatch to {file}", "Exported {n} swatches to {file}"),
+ &[("file", &crate::file_open::display_name(&path))],
+ );
Ok(json!({"path": path, "count": n}))
})
}
@@ -251,7 +261,8 @@ pub fn add_from_picker(app: &mut PhotocraftApp, f: &serde_json::Map<String, Valu
if let Some(r) = run(app, "swatches.add", json!({"color": color})) {
let name = r["name"].as_str().unwrap_or_default().to_string();
app.ui.status_error = false;
- app.ui.status = format!("Added swatch {name}");
+ let template = "Added swatch {name}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("name", &name)]);
app.ui.presets_ui.selected.insert(PANEL.into(), name);
}
}
diff --git a/crates/ui-egui/src/symmetry_ui.rs b/crates/ui-egui/src/symmetry_ui.rs
index deb9ad6c7..5441f8aa9 100644
--- a/crates/ui-egui/src/symmetry_ui.rs
+++ b/crates/ui-egui/src/symmetry_ui.rs
@@ -130,7 +130,7 @@ fn mode_button(ui: &mut egui::Ui, mode: SymmetryMode, checked: bool) -> egui::Re
pub fn menu(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let current = app.session.active().and_then(|s| s.symmetry.clone());
let resp = icons::button_with_icon_size(ui, "painting-symmetry", 24.0, 14.0, current.is_some(), tl!("Set painting symmetry options"));
- let resp = crate::brush_picker::named(resp, tl!("Set painting symmetry options"));
+ let resp = crate::brush_picker::named(resp, "Set painting symmetry options");
egui::Popup::menu(&resp).show(|ui| {
ui.set_min_width(220.0);
widgets::menu_scroll(ui, |ui| {
diff --git a/crates/ui-egui/src/transform_tool.rs b/crates/ui-egui/src/transform_tool.rs
index 2806e2d5d..294e3d11f 100644
--- a/crates/ui-egui/src/transform_tool.rs
+++ b/crates/ui-egui/src/transform_tool.rs
@@ -2425,13 +2425,15 @@ fn transform_actions(app: &mut PhotocraftApp, ui: &mut egui::Ui, warping: bool)
crate::i18n::fmt(tl!("Commit transform ({key})"), &[("key", &crate::shortcuts::pretty("Enter"))])
};
let commit_btn = crate::icons::button(ui, "check", 26.0, false, &commit_tip);
- commit_btn.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, "Commit transform"));
+ let label = "Commit transform";
+ commit_btn.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, tl!(label)));
if commit_btn.clicked() {
commit(app);
}
let cancel_tip = if warping { tl!("Cancel warp (Esc)") } else { tl!("Cancel transform (Esc)") };
let cancel_btn = crate::icons::button(ui, "ban", 26.0, false, cancel_tip);
- cancel_btn.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, "Cancel transform"));
+ let label = "Cancel transform";
+ cancel_btn.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, true, tl!(label)));
if cancel_btn.clicked() {
cancel(app);
}
diff --git a/crates/ui-egui/src/variables_ui.rs b/crates/ui-egui/src/variables_ui.rs
index a421de391..fc10df402 100644
--- a/crates/ui-egui/src/variables_ui.rs
+++ b/crates/ui-egui/src/variables_ui.rs
@@ -229,8 +229,22 @@ fn data_sets_page(ui: &mut egui::Ui, _t: &Tokens, state: &mut Value, fields: &mu
if ui.button("◀").clicked() && cur > 0 {
cur -= 1;
}
- let name = sets.get(cur).and_then(|s| s.get("name")).and_then(Value::as_str).unwrap_or("(none)").to_string();
- ui.label(format!("Data Set: {name} ({}/{})", if sets.is_empty() { 0 } else { cur + 1 }, sets.len()));
+ let name = sets
+ .get(cur)
+ .and_then(|s| s.get("name"))
+ .and_then(Value::as_str)
+ .unwrap_or_else(|| {
+ let empty = "(none)";
+ tl!(empty)
+ })
+ .to_string();
+ ui.label({
+ let template = "Data Set: {name} ({index}/{total})";
+ crate::i18n::fmt(
+ tl!(template),
+ &[("name", &name), ("index", &(if sets.is_empty() { 0 } else { cur + 1 }).to_string()), ("total", &sets.len().to_string())],
+ )
+ });
if ui.button("▶").clicked() && cur + 1 < sets.len() {
cur += 1;
}
diff --git a/crates/ui-egui/src/view_cmds.rs b/crates/ui-egui/src/view_cmds.rs
index 190634cca..abedae867 100644
--- a/crates/ui-egui/src/view_cmds.rs
+++ b/crates/ui-egui/src/view_cmds.rs
@@ -1178,9 +1178,11 @@ fn save_a_copy(app: &mut PhotocraftApp) -> Result<Value, String> {
let (bytes, warnings) = export(&doc, &path, &settings)?;
let write = app.services.write.as_mut().ok_or("no writer configured")?;
write(&path, &bytes)?;
- app.ui.status = format!("Saved a copy as {path}");
+ let template = "Saved a copy as {path}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("path", &path)]);
app.ui.status_error = false;
- crate::notices::io_warnings(app, &format!("Saved a copy as {}", crate::file_open::display_name(&path)), &warnings);
+ let what = crate::i18n::fmt(tl!(template), &[("path", &crate::file_open::display_name(&path))]);
+ crate::notices::io_warnings(app, &what, &warnings);
Ok(json!({"path": path, "warnings": warnings}))
})
}
@@ -1194,7 +1196,8 @@ fn export_contents(app: &mut PhotocraftApp) -> Result<Value, String> {
app.pick_save(&name.clone(), move |app, path| {
let write = app.services.write.as_mut().ok_or("no writer configured")?;
write(&path, &bytes)?;
- app.ui.status = format!("Exported contents to {path}");
+ let template = "Exported contents to {path}";
+ app.ui.status = crate::i18n::fmt(tl!(template), &[("path", &path)]);
app.ui.status_error = false;
Ok(json!({"path": path, "fileName": name, "bytes": bytes.len()}))
})
diff --git a/docs/gaps.md b/docs/gaps.md
index 8a2b90cbe..fdfad410e 100644
--- a/docs/gaps.md
+++ b/docs/gaps.md
@@ -1,6 +1,6 @@
# Where PhotoCraft falls short of Photoshop
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** minor (Tilt-Shift evidence added to G2; earlier the same day: major, every known shortfall ranked from the re-measure) · **Target:** Adobe Photoshop 2026
+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Czech UI localization evidence added to G13; Tilt-Shift evidence added to G2; earlier the same day: major, every known shortfall ranked from the re-measure) · **Target:** Adobe Photoshop 2026
Every known shortfall against Photoshop 2026 (27.11.0), one entry each, ranked by user impact
on the way to beta. This is the work list agents pick from: take the highest-ranked entry that
@@ -202,6 +202,8 @@ what an agent can't finish alone.
English in every language; browser-locale detection and CJK fonts on the web; Japanese IME on
Windows (#590); installed Japanese fonts missing from the font list (#2330); Arabic layer names
as tofu (#1408, #1693).
+- **Evidence (2026-10-11):** Czech dynamic UI wrappers, hardware labels and composed messages
+ translate at display sites; engine errors remain English. This does not close G13.
- **Detail:** [`localization-parity.md`](localization-parity.md).
- **Estimate:** 80–140 h. **Human:** native-speaker review of every catalog (none is recorded).
@@ -221,3 +223,4 @@ what an agent can't finish alone.
| 2026-10-10 | minor | G2: recorded Tilt-Shift computation/filtered-proxy measurements and limits; gap and estimate remain open |
| 2026-10-10 | minor | Checked against the alpha gate (no alpha blockers); #2374 marked closed |
| 2026-10-10 | major | First version, from the full re-measure against Photoshop 2026 27.11.0 and the open issues |
+| 2026-10-11 | minor | G13: Czech dynamic UI text localized; engine messages and native review remain open |
diff --git a/docs/localization-parity.md b/docs/localization-parity.md
index 6488deb1a..e5ec2dbda 100644
--- a/docs/localization-parity.md
+++ b/docs/localization-parity.md
@@ -1,6 +1,6 @@
# Localization parity
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** minor (right-to-left shell layout) · **Target:** Adobe Photoshop 2026
+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Czech review follow-ups) · **Target:** Adobe Photoshop 2026
Per-language status of PhotoCraft's UI. How catalogs work and how to add one:
[`localization.md`](localization.md). Language notes: [Korean](localization-ko.md), [Spanish](localization-es.md),
@@ -46,9 +46,18 @@ catalog).
## Other shipped languages
8 more, each at 1,608 / 1,608 measured keys, status `partial` for the same reason: Traditional
-Chinese `zh-hant` (2,329 rows), Russian `ru` (2,544), Ukrainian `uk` (3,375), Czech `cs` (2,337),
+Chinese `zh-hant` (2,329 rows), Russian `ru` (2,544), Ukrainian `uk` (3,375), Czech `cs` (3,522),
Polish `pl` (3,366), Greek `el` (3,481), Dutch `nl` (3,568), Italian `it` (2,411).
+Czech UI follow-up (2026-10-11): status and notice wrappers, hardware labels, brush and
+transform accessibility names, rasterization prompts, profile mismatch messages and preset
+counts now translate at their render/assignment sites. Navigator's zoom level uses a context
+(`Zvětšení`), while the tool remains `Lupa`. Engine errors, profile/file/document names stay
+verbatim; copied System Info and control API diagnostics remain English while their on-screen
+labels translate. Import warning counts use parentheses in Czech. New dynamic templates fall
+back to English in catalogs without entries. This is additional UI coverage, not a claim that
+engine localization or native review is complete.
+
## Cross-language gaps
- Engine error, status and parameter-help messages are English in every language.
@@ -66,3 +75,5 @@ Polish `pl` (3,366), Greek `el` (3,481), Dutch `nl` (3,568), Italian `it` (2,411
|---|---|---|
| 2026-10-10 | major | First version, measured from the catalogs with the `i18n-coverage` rules |
| 2026-10-10 | minor | Right-to-left shell layout (menu bar, title, options and status bars, toolbox and dock sides) |
+| 2026-10-11 | minor | Czech dynamic status/notice and hardware text, render labels and Navigator zoom context; engine messages remain English |
+| 2026-10-11 | minor | Czech review follow-ups: English System Info diagnostics, id-aware shortcut labels, display-only auto translation, warning punctuation and wording; catalog row count refreshed |