Merge #9393: Preferences: the Generator checkbox reads Enable Generator, as in the reference application (#9392)

This commit is contained in:
aiongg committed 2026-10-27 17:44:16 +00:00
commit d01f2de508
24 files changed
+44 -22

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ pub fn specs() -> Vec<CommandSpec> {
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)?;
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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 Κλικ για εφαρμογή, ⌥-κλικ για εκκαθάριση παρακάμψεων, διπλό κλικ για επιλογές στυλ
Can't render this file because it contains an unexpected character in line 1041 and column 18.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 4 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 4 and column 47.
+1 -1
View File
@@ -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
1 # Italian (it) catalog. Columns, separated by a TAB: context <TAB> source <TAB> translation
1948
1949
1950
1951
1952
1953
1954
+1 -1
View File
@@ -1950,7 +1950,7 @@
Full size tip 実寸の先端
Gamut warning color 色域外警告の色
Gamut warning opacity 色域外警告の不透明度
Generator enabled 自動生成を有効にする
Enable Generator 自動生成を有効にする
Gif GIF
Glossy 光沢
Grid color グリッドの色
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -1938,7 +1938,7 @@
Full size tip 전체 크기 브러시 끝
Gamut warning color 색상 범위 경고 색상
Gamut warning opacity 색상 범위 경고 불투명도
Generator enabled 생성기 활성화
Enable Generator 생성기 활성화
Gif GIF
Glossy 광택
Grid color 격자 색상
1 # Korean (ko) catalog. UTF-8: context<TAB>English source<TAB>translation.
1938
1939
1940
1941
1942
1943
1944
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 8 and column 34.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -2376,7 +2376,7 @@
Gamut warning color Цвет предупреждения об охвате
Gamut warning opacity Непрозрачность предупреждения об охвате
General Основные
Generator enabled Генератор включён
Enable Generator Включить генератор
Gif GIF
Glossy Глянцевая
Grid color Цвет сетки
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 8 and column 34.
+1 -1
View File
@@ -2347,7 +2347,7 @@
Gamut warning color Колір попередження про колірне охоплення
Gamut warning opacity Непрозорість попередження про колірне охоплення
General Загальні
Generator enabled Генератор увімкнено
Enable Generator Увімкнути генератор
Gif GIF
Glossy Глянцевий
Grid color Колір сітки
Can't render this file because it contains an unexpected character in line 1409 and column 18.
+1 -1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -1992,7 +1992,7 @@
Full size tip 全尺寸笔尖
Gamut warning color 色域警告颜色
Gamut warning opacity 色域警告不透明度
Generator enabled 启用生成器
Enable Generator 启用生成器
Gif GIF
Glossy 光面
Grid color 网格颜色
1 # Simplified Chinese (zh-hans) catalog. UTF-8, TAB-separated columns:
1992
1993
1994
1995
1996
1997
1998
+1 -1
View File
@@ -1964,7 +1964,7 @@
Full size tip 完整大小筆尖
Gamut warning color 色域警告顏色
Gamut warning opacity 色域警告不透明度
Generator enabled 啟用 Generator
Enable Generator 啟用 Generator
Gif GIF
Glossy 光亮
Grid color 格點顏色
Can't render this file because it contains an unexpected character in line 6 and column 47.
@@ -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();
}
@@ -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<String> = 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;