diff --git a/crates/engine/src/cmd/web_cmds.rs b/crates/engine/src/cmd/web_cmds.rs index b28e7a94fb..470edd3067 100644 --- a/crates/engine/src/cmd/web_cmds.rs +++ b/crates/engine/src/cmd/web_cmds.rs @@ -65,7 +65,7 @@ pub fn specs() -> Vec { s.active().map(|_| ()).ok_or_else(|| "no document open".into()) } - /// Generate ▸ Image Assets needs Preferences ▸ Plug-ins ▸ Generator enabled, as in + /// Generate ▸ Image Assets needs Preferences ▸ Plug-ins ▸ Enable Generator, as in /// Photoshop (where "Enable Generator" is unchecked until turned on). fn generator_enabled(s: &Session) -> std::result::Result<(), String> { has_doc(s)?; diff --git a/crates/engine/src/cmd/web_cmds/tests.rs b/crates/engine/src/cmd/web_cmds/tests.rs index 00c4d4d49e..cdc7d576e7 100644 --- a/crates/engine/src/cmd/web_cmds/tests.rs +++ b/crates/engine/src/cmd/web_cmds/tests.rs @@ -637,7 +637,7 @@ fn image_assets_needs_the_generator_preference() { fn image_assets_are_generated_now_and_on_save() { let dir = tmp("assets"); let mut s = session(8); - // Preferences ▸ Plug-ins ▸ Generator enabled: the feature is opt-in. + // Preferences ▸ Plug-ins ▸ Enable Generator: the feature is opt-in. s.execute("prefs.set", json!({"path": "plugIns.generatorEnabled", "value": true})).unwrap(); let id = s.active().unwrap().active_layer.unwrap(); s.execute("layer.renameLayer", json!({"layer": id.0, "name": "logo.png, 50% small/logo.gif, logo.jpg80%"})).unwrap(); diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index c2274009c4..3d40d04d18 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1966,7 +1966,7 @@ Full size tip Hrot v plné velikosti Gamut warning color Barva upozornění na gamut Gamut warning opacity Krytí upozornění na gamut - Generator enabled Generátor zapnut + Enable Generator Zapnout generátor Gif GIF Glossy Lesklý Grid color Barva mřížky diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index e5d2762acf..418125859b 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1941,7 +1941,7 @@ Full size tip Spitze in voller Größe Gamut warning color Farbumfang-Warnfarbe Gamut warning opacity Deckkraft der Farbumfang-Warnung - Generator enabled Generator aktiviert + Enable Generator Generator aktivieren Gif GIF Glossy Glänzend Grid color Rasterfarbe diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index a1932aed20..3e7e7390fa 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1714,7 +1714,7 @@ Full size tip Άκρη πλήρους μεγέθους Gamut warning color Χρώμα προειδοποίησης χρωματικής γκάμας Gamut warning opacity Αδιαφάνεια προειδοποίησης χρωματικής γκάμας - Generator enabled Ενεργοποίηση γεννήτριας + Enable Generator Ενεργοποίηση γεννήτριας Click the first point or press ↵ to close · Esc cancels Κάντε κλικ στο πρώτο σημείο ή πατήστε ↵ για κλείσιμο · Esc για ακύρωση Click to add a point · drag off or ⌘/Ctrl-click or Delete to remove Κλικ για προσθήκη σημείου · σύρσιμο εκτός ή ⌘/Ctrl-κλικ ή Delete για αφαίρεση Click to apply, ⌥-click to clear overrides, double-click for Style Options Κλικ για εφαρμογή, ⌥-κλικ για εκκαθάριση παρακάμψεων, διπλό κλικ για επιλογές στυλ diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 17c67e5eb5..acacb0402a 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1954,7 +1954,7 @@ Full size tip Punta a tamaño real Gamut warning color Color de advertencia de gama Gamut warning opacity Opacidad de advertencia de gama - Generator enabled Generador activado + Enable Generator Activar generador Gif GIF Glossy Brillante Grid color Color de la cuadrícula diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 70fd5aa800..4b481366ed 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1922,7 +1922,7 @@ Full size tip Pointe en taille réelle Gamut warning color Couleur de l'alerte de gamut Gamut warning opacity Opacité de l'alerte de gamut - Generator enabled Générateur activé + Enable Generator Activer le générateur Gif GIF Glossy Brillant Grid color Couleur de la grille diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 4c498d0480..9fb897d482 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -3280,7 +3280,7 @@ cameraRaw Yellow Sárga Full size tip Teljes méretű hegy Fullscreen Teljes képernyő General… Általános… - Generator enabled Generátor bekapcsolva + Enable Generator Generátor bekapcsolása Generators Generátorok Generic Általános GitHub GitHub diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 24a4f0aedc..0fa31a8ebd 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1932,7 +1932,7 @@ Full size tip Ujung ukuran penuh Gamut warning color Warna peringatan gamut Gamut warning opacity Opasitas peringatan gamut - Generator enabled Generator aktif + Enable Generator Aktifkan Generator Gif GIF Glossy Mengilap Grid color Warna grid diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index d057877115..ea51deccb5 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -1948,7 +1948,7 @@ Full size tip Punta dimensione reale Gamut warning color Colore avviso gamma Gamut warning opacity Opacità avviso gamma - Generator enabled Generatore abilitato + Enable Generator Abilita generatore Gif GIF Glossy Lucido Grid color Colore griglia diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 3a44eb11dc..6d96eeaa2d 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1950,7 +1950,7 @@ Full size tip 実寸の先端 Gamut warning color 色域外警告の色 Gamut warning opacity 色域外警告の不透明度 - Generator enabled 自動生成を有効にする + Enable Generator 自動生成を有効にする Gif GIF Glossy 光沢 Grid color グリッドの色 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index bd23564e8b..85abdc30ec 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1938,7 +1938,7 @@ Full size tip 전체 크기 브러시 끝 Gamut warning color 색상 범위 경고 색상 Gamut warning opacity 색상 범위 경고 불투명도 - Generator enabled 생성기 활성화 + Enable Generator 생성기 활성화 Gif GIF Glossy 광택 Grid color 격자 색상 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 693d410841..3fb8ee4399 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1922,7 +1922,7 @@ Full size tip Punt op volledige grootte Gamut warning color Kleur waarschuwing kleurbereik Gamut warning opacity Dekking waarschuwing kleurbereik - Generator enabled Generator ingeschakeld + Enable Generator Generator inschakelen Gif GIF Glossy Glanzend Grid color Rasterkleur diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index d27d158452..fdd468523a 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1960,7 +1960,7 @@ Full size tip Końcówka w pełnym rozmiarze Gamut warning color Kolor ostrzeżenia o gamucie Gamut warning opacity Krycie ostrzeżenia o gamucie - Generator enabled Generator włączony + Enable Generator Włącz generator Gif GIF Glossy Błyszczący Grid color Kolor siatki diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 083f1b6f20..f3e38e1e27 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -1916,7 +1916,7 @@ Full size tip Ponta em tamanho real Gamut warning color Cor do aviso de gama Gamut warning opacity Opacidade do aviso de gama - Generator enabled Gerador ativado + Enable Generator Ativar gerador Gif GIF Glossy Brilhante Grid color Cor da grade diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 6e35f9c51e..8d86a06979 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -2376,7 +2376,7 @@ Gamut warning color Цвет предупреждения об охвате Gamut warning opacity Непрозрачность предупреждения об охвате General Основные - Generator enabled Генератор включён + Enable Generator Включить генератор Gif GIF Glossy Глянцевая Grid color Цвет сетки diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv index fdbdf14ca7..3a62b455ab 100644 --- a/crates/ui-egui/src/i18n/sr.tsv +++ b/crates/ui-egui/src/i18n/sr.tsv @@ -1895,7 +1895,7 @@ Full size tip Vrh pune veličine Gamut warning color Boja upozorenja o gamutu Gamut warning opacity Neprozirnost upozorenja o gamutu - Generator enabled Generator je omogućen + Enable Generator Omogući generator Gif GIF Glossy Sjajno Grid color Boja mreže diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 0a1f138ec1..b9938796b4 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1896,7 +1896,7 @@ Full size tip Tam boyutlu uç Gamut warning color Gamut uyarı rengi Gamut warning opacity Gamut uyarı opaklığı - Generator enabled Oluşturucu etkin + Enable Generator Oluşturucuyu etkinleştir Gif GIF Glossy parlak Grid color Izgara rengi diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index ddd8226e3e..8db5ac0dcf 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -2347,7 +2347,7 @@ Gamut warning color Колір попередження про колірне охоплення Gamut warning opacity Непрозорість попередження про колірне охоплення General Загальні - Generator enabled Генератор увімкнено + Enable Generator Увімкнути генератор Gif GIF Glossy Глянцевий Grid color Колір сітки diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 43d6cfca8b..1b14d41a05 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -2719,7 +2719,7 @@ shape Appearance Diện mạo Extra large Rất lớn Fill new type layers with placeholder Tô lớp chữ mới bằng nội dung tạm Font preview Xem trước phông chữ - Generator enabled Đã bật bộ tạo + Enable Generator Bật bộ tạo Glossy Bóng Gutter Lề Ignore exif profile tag Bỏ qua thẻ hồ sơ exif diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 0e32573f59..c45d9c4431 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -1992,7 +1992,7 @@ Full size tip 全尺寸笔尖 Gamut warning color 色域警告颜色 Gamut warning opacity 色域警告不透明度 - Generator enabled 启用生成器 + Enable Generator 启用生成器 Gif GIF Glossy 光面 Grid color 网格颜色 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index eef999cf2e..e002fb3a6b 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -1964,7 +1964,7 @@ Full size tip 完整大小筆尖 Gamut warning color 色域警告顏色 Gamut warning opacity 色域警告不透明度 - Generator enabled 啟用 Generator + Enable Generator 啟用 Generator Gif GIF Glossy 光亮 Grid color 格點顏色 diff --git a/crates/ui-egui/src/prefs/prefs_ui/fields.rs b/crates/ui-egui/src/prefs/prefs_ui/fields.rs index f4141464d0..88e383ce9b 100644 --- a/crates/ui-egui/src/prefs/prefs_ui/fields.rs +++ b/crates/ui-egui/src/prefs/prefs_ui/fields.rs @@ -63,6 +63,10 @@ pub(super) fn humanize(key: &str) -> String { if key == "doNotAppendCopy" { return "Do not append \"copy\" to filename when saving a copy".into(); } + // Plug-ins: Photoshop's wording (#9392). + if key == "generatorEnabled" { + return "Enable Generator".into(); + } if key == "lowLatencyDrawing" { return "Low-Latency Drawing (vsync off, applies at next launch)".into(); } diff --git a/crates/ui-egui/src/prefs/prefs_ui/tests.rs b/crates/ui-egui/src/prefs/prefs_ui/tests.rs index 55e3c6b6e2..84112c95cc 100644 --- a/crates/ui-egui/src/prefs/prefs_ui/tests.rs +++ b/crates/ui-egui/src/prefs/prefs_ui/tests.rs @@ -14,6 +14,24 @@ fn memory_usage_has_a_dedicated_explanation_and_keeps_its_value() { assert_eq!(h.state()["memoryUsageMb"], 50000); } +#[test] +fn the_generator_checkbox_reads_enable_generator() { + // #9392: the reference application's Plug-ins page says "Enable Generator", not "Generator enabled". + use egui_kittest::{Harness, kittest::Queryable}; + let values = serde_json::to_value(photocraft_engine::prefs::PlugIns::default()).unwrap().as_object().unwrap().clone(); + let keys: Vec = values.keys().cloned().collect(); + let mut h = Harness::builder() + .with_size(vec2(680.0, 350.0)) + .build_ui_state(move |ui, values| section_fields(ui, "plugIns", values, &keys, crate::i18n::Lang::EN, None, ""), values); + h.run_steps(2); + assert!(h.query_by_label("Generator enabled").is_none()); + h.get_by_label("Enable Generator").click(); + h.run_steps(2); + assert_eq!(h.state()["generatorEnabled"], true); + let de = crate::i18n::Lang::from_code("de").unwrap(); + assert_eq!(crate::i18n::tr(de, "Enable Generator"), "Generator aktivieren"); +} + #[test] fn graphics_dropdowns_are_named_for_their_settings() { use egui::accesskit::Role;