mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-15 03:36:48 -04:00
i18n: split "Light" — font weights get their own context, Camera Raw keeps the panel term (#1061)
* i18n: split "Light" - font weights get their own context, Camera Raw keeps the panel term The plain "Light" entry served two unrelated meanings, and every catalog had resolved the collision in favour of the font weight (de "Light", ja "ライト", fr "Maigre", ko "가늘게"...), so Camera Raw's Light section header showed a weight word in most languages. - The type tool's style dropdown now shows localized labels while the raw string stays the engine's fontStyle key (value/label pairs, like the anti-alias dropdown), with each word translated in a new fontWeight context (Thin...Black, Italic). - Camera Raw's Light section reads cameraRaw|Light (Licht, Luz, Lumière, Свет, 光...); every catalog gains the missing rows, and a new i18n test pins both contexts plus their distinction per language. * i18n(pl): font weights and Camera Raw keep their split contexts in Polish too * i18n tests: close the Seafoam test before the font-weight test (rebase fixup) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
15 files changed
+154
-2
No files matched your search
@@ -2201,3 +2201,13 @@ cameraRaw Color Barvy
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Úpravy, které mění celý dokument, například režim prolnutí, krytí nebo viditelnost vrstvy, jej překreslí celý.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Vrstvy se nevejdou do rozpočtu paměti GPU. Zvýšením hodnoty Využití paměti v Předvolbách › Výkon se rozpočet zvětší, nejvýše na čtvrtinu paměti tohoto počítače.
|
||||
The GPU compositor wasn't used: {reason} Kompozitor GPU nebyl použit: {reason}
|
||||
fontWeight Thin Jemná
|
||||
fontWeight ExtraLight Extrajemná
|
||||
fontWeight Light Světlá
|
||||
fontWeight Regular Normální
|
||||
fontWeight Medium Střední
|
||||
fontWeight SemiBold Polotučná
|
||||
fontWeight Bold Tučná
|
||||
fontWeight ExtraBold Extratučná
|
||||
fontWeight Black Černá
|
||||
fontWeight Italic Kurzíva
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2240,3 +2240,14 @@ layerLabel No Color Keine Farbe
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Änderungen, die das ganze Dokument betreffen, etwa Füllmethode, Deckkraft oder Sichtbarkeit einer Ebene, zeichnen es vollständig neu.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Die Ebenen passen nicht in das GPU-Speicherbudget. Eine höhere Speichernutzung unter Voreinstellungen › Leistung erhöht das Budget, bis zu einem Viertel des Arbeitsspeichers dieses Computers.
|
||||
The GPU compositor wasn't used: {reason} Der GPU-Compositor wurde nicht verwendet: {reason}
|
||||
cameraRaw Light Licht
|
||||
fontWeight Thin Haarfein
|
||||
fontWeight ExtraLight Extraleicht
|
||||
fontWeight Light Leicht
|
||||
fontWeight Regular Normal
|
||||
fontWeight Medium Medium
|
||||
fontWeight SemiBold Halbfett
|
||||
fontWeight Bold Fett
|
||||
fontWeight ExtraBold Extrafett
|
||||
fontWeight Black Schwarz
|
||||
fontWeight Italic Kursiv
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2271,3 +2271,13 @@ cameraRaw Amount Cantidad
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Las ediciones que cambian todo el documento, como el modo de fusión, la opacidad o la visibilidad de una capa, lo redibujan por completo.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Las capas no caben en el presupuesto de memoria de la GPU. Aumentar Uso de memoria en Preferencias › Rendimiento amplía el presupuesto, hasta una cuarta parte de la memoria de este equipo.
|
||||
The GPU compositor wasn't used: {reason} No se usó el compositor de GPU: {reason}
|
||||
fontWeight Thin Ultrafina
|
||||
fontWeight ExtraLight Extrafina
|
||||
fontWeight Light Fina
|
||||
fontWeight Regular Normal
|
||||
fontWeight Medium Medio
|
||||
fontWeight SemiBold Seminegrita
|
||||
fontWeight Bold Negrita
|
||||
fontWeight ExtraBold Extranegra
|
||||
fontWeight Black Ultraniegra
|
||||
fontWeight Italic Cursiva
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 47.
|
@@ -2629,3 +2629,13 @@ cameraRaw Blending Fusion
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Les modifications qui touchent tout le document, comme le mode de fusion, l'opacité ou la visibilité d'un calque, le redessinent entièrement.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Les calques dépassent le budget de mémoire GPU. Augmenter Utilisation de la mémoire dans Préférences › Performances relève ce budget, jusqu'au quart de la mémoire de cet ordinateur.
|
||||
The GPU compositor wasn't used: {reason} Le compositeur GPU n'a pas été utilisé : {reason}
|
||||
fontWeight Thin Ultrafin
|
||||
fontWeight ExtraLight Extrafin
|
||||
fontWeight Light Maigre
|
||||
fontWeight Regular Normal
|
||||
fontWeight Medium Moyen
|
||||
fontWeight SemiBold Demi-gras
|
||||
fontWeight Bold Gras
|
||||
fontWeight ExtraBold Extra-gras
|
||||
fontWeight Black Noir
|
||||
fontWeight Italic Italique
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2616,3 +2616,13 @@ cameraRaw Blending Pembauran
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Suntingan yang mengubah seluruh dokumen, seperti mode campuran, opasitas, atau visibilitas layer, menggambar ulang semuanya.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Layer tidak muat dalam anggaran memori GPU. Menaikkan Pemakaian memori di Preferensi › Performa menaikkan anggaran, hingga seperempat memori komputer ini.
|
||||
The GPU compositor wasn't used: {reason} Kompositor GPU tidak digunakan: {reason}
|
||||
fontWeight Thin Sangat Tipis
|
||||
fontWeight ExtraLight Ekstra Tipis
|
||||
fontWeight Light Tipis
|
||||
fontWeight Regular Reguler
|
||||
fontWeight Medium Sedang
|
||||
fontWeight SemiBold SemiTebal
|
||||
fontWeight Bold Tebal
|
||||
fontWeight ExtraBold Ekstra Tebal
|
||||
fontWeight Black Sangat Tebal
|
||||
fontWeight Italic Miring
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 47.
|
@@ -2272,3 +2272,13 @@ cameraRaw Amount Quantità
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Le modifiche che cambiano tutto il documento, come metodo di fusione, opacità o visibilità di un livello, lo ridisegnano per intero.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. I livelli non rientrano nel budget di memoria della GPU. Aumentare Uso memoria in Preferenze › Prestazioni alza il budget, fino a un quarto della memoria di questo computer.
|
||||
The GPU compositor wasn't used: {reason} Il compositore GPU non è stato usato: {reason}
|
||||
fontWeight Thin Sottile
|
||||
fontWeight ExtraLight Extraleggero
|
||||
fontWeight Light Leggero
|
||||
fontWeight Regular Normale
|
||||
fontWeight Medium Medio
|
||||
fontWeight SemiBold Semigrassetto
|
||||
fontWeight Bold Grassetto
|
||||
fontWeight ExtraBold Extra-grassetto
|
||||
fontWeight Black Nero
|
||||
fontWeight Italic Corsivo
|
||||
|
@@ -2184,3 +2184,13 @@ cameraRaw Color カラー
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. レイヤーの描画モード、不透明度、表示/非表示など、ドキュメント全体に関わる編集では全体が再描画されます。
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. レイヤーがGPUメモリの予算に収まりません。環境設定 › パフォーマンスのメモリ使用量を増やすと、このコンピューターのメモリの4分の1まで予算が増えます。
|
||||
The GPU compositor wasn't used: {reason} GPUコンポジターは使用されませんでした:{reason}
|
||||
fontWeight Thin 極細
|
||||
fontWeight ExtraLight 特細
|
||||
fontWeight Light 細字
|
||||
fontWeight Regular 標準
|
||||
fontWeight Medium 中間
|
||||
fontWeight SemiBold 中太
|
||||
fontWeight Bold 太字
|
||||
fontWeight ExtraBold 特太
|
||||
fontWeight Black 極太
|
||||
fontWeight Italic 斜体
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2784,3 +2784,13 @@ cameraRaw Color 색상
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. 레이어의 혼합 모드, 불투명도, 표시 여부처럼 문서 전체를 바꾸는 편집은 문서 전체를 다시 그립니다.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. 레이어가 GPU 메모리 예산에 맞지 않습니다. 환경 설정 › 성능에서 메모리 사용량을 늘리면 이 컴퓨터 메모리의 4분의 1까지 예산이 늘어납니다.
|
||||
The GPU compositor wasn't used: {reason} GPU 합성기를 사용하지 않았습니다: {reason}
|
||||
fontWeight Thin 아주 가늘게
|
||||
fontWeight ExtraLight 더 가늘게
|
||||
fontWeight Light 가늘게
|
||||
fontWeight Regular 보통
|
||||
fontWeight Medium 중간
|
||||
fontWeight SemiBold 반굵게
|
||||
fontWeight Bold 굵게
|
||||
fontWeight ExtraBold 더 굵게
|
||||
fontWeight Black 아주 굵게
|
||||
fontWeight Italic 기울임
|
||||
|
@@ -686,6 +686,20 @@ mod tests {
|
||||
assert_eq!(tr(Lang::EN, "Seafoam"), "Seafoam");
|
||||
}
|
||||
|
||||
/// Font style labels are built from dynamic words (weights, "Italic"), so the literal
|
||||
/// scanner cannot cover them; "Light" there is a weight, distinct from the Camera Raw
|
||||
/// "Light" section (`type_tool::style_label`).
|
||||
#[test]
|
||||
fn font_weight_names_are_translated() {
|
||||
const TERMS: &[&str] = &["Thin", "ExtraLight", "Light", "Regular", "Medium", "SemiBold", "Bold", "ExtraBold", "Black", "Italic"];
|
||||
for lang in Lang::all().filter(|l| l.complete_menus()) {
|
||||
for t in TERMS {
|
||||
assert!(lang.0.catalog().contextual("fontWeight", t).is_some(), "{} missing font weight: {t}", lang.code());
|
||||
}
|
||||
assert_ne!(tr_ctx(lang, "cameraRaw", "Light"), tr_ctx(lang, "fontWeight", "Light"), "{}: Camera Raw Light vs the font weight", lang.code());
|
||||
}
|
||||
}
|
||||
|
||||
/// Blend mode names come from the colour crate; each must be translated.
|
||||
#[test]
|
||||
fn blend_mode_names_are_translated() {
|
||||
|
||||
@@ -2510,6 +2510,16 @@
|
||||
Tone Histogram Histogram tonalny
|
||||
Show Selected Region Pokaż zaznaczony region
|
||||
cameraRaw Light Światło
|
||||
fontWeight Thin Cienki
|
||||
fontWeight ExtraLight Ekstra cienki
|
||||
fontWeight Light Lekki
|
||||
fontWeight Regular Zwykły
|
||||
fontWeight Medium Średni
|
||||
fontWeight SemiBold Półgruby
|
||||
fontWeight Bold Pogrubiony
|
||||
fontWeight ExtraBold Ekstra gruby
|
||||
fontWeight Black Czarny
|
||||
fontWeight Italic Kursywa
|
||||
Camera Raw Filter ({layer}) Filtr Camera Raw ({layer})
|
||||
cameraRaw Lights Jasne tony
|
||||
cameraRaw Darks Ciemne tony
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2636,3 +2636,13 @@ cameraRaw Whites Brancos
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Edições que mudam o documento inteiro, como modo de mesclagem, opacidade ou visibilidade de uma camada, redesenham tudo.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. As camadas não cabem no orçamento de memória da GPU. Aumentar Uso de memória em Preferências › Desempenho eleva o orçamento, até um quarto da memória deste computador.
|
||||
The GPU compositor wasn't used: {reason} O compositor de GPU não foi usado: {reason}
|
||||
fontWeight Thin Fina
|
||||
fontWeight ExtraLight Extrafina
|
||||
fontWeight Light Leve
|
||||
fontWeight Regular Normal
|
||||
fontWeight Medium Médio
|
||||
fontWeight SemiBold Seminegrito
|
||||
fontWeight Bold Negrito
|
||||
fontWeight ExtraBold Extranegrito
|
||||
fontWeight Black Ultraniegra
|
||||
fontWeight Italic Itálico
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2476,3 +2476,13 @@ cameraRaw Roughness Неровность
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. Правки, затрагивающие весь документ, например режим наложения, непрозрачность или видимость слоя, перерисовывают его целиком.
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. Слои не помещаются в бюджет памяти GPU. Увеличение параметра «Память» в разделе Настройки › Производительность повышает бюджет, но не больше четверти памяти этого компьютера.
|
||||
The GPU compositor wasn't used: {reason} Компоновщик GPU не использовался: {reason}
|
||||
fontWeight Thin Тонкий
|
||||
fontWeight ExtraLight Особо светлый
|
||||
fontWeight Light Светлый
|
||||
fontWeight Regular Обычный
|
||||
fontWeight Medium Средний
|
||||
fontWeight SemiBold Полужирный
|
||||
fontWeight Bold Жирный
|
||||
fontWeight ExtraBold Особо жирный
|
||||
fontWeight Black Чёрный
|
||||
fontWeight Italic Курсив
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2209,3 +2209,13 @@ cameraRaw Blending 混合
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. 更改整个文档的编辑(如图层的混合模式、不透明度或可见性)会重绘整个文档。
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. 图层超出 GPU 内存预算。在 首选项 › 性能 中提高内存使用量可增加预算,最多为本机内存的四分之一。
|
||||
The GPU compositor wasn't used: {reason} 未使用 GPU 合成器:{reason}
|
||||
fontWeight Thin 极细
|
||||
fontWeight ExtraLight 特细
|
||||
fontWeight Light 细体
|
||||
fontWeight Regular 常规
|
||||
fontWeight Medium 中等
|
||||
fontWeight SemiBold 半粗
|
||||
fontWeight Bold 粗体
|
||||
fontWeight ExtraBold 特粗
|
||||
fontWeight Black 黑体
|
||||
fontWeight Italic 斜体
|
||||
|
@@ -2178,3 +2178,13 @@ cameraRaw Blending 混合
|
||||
Edits that change the whole document, such as a layer's blend mode, opacity or visibility, redraw all of it. 變更整份文件的編輯(例如圖層的混合模式、不透明度或可見度)會重繪整份文件。
|
||||
Its layers don't fit the GPU memory budget. Raising Memory usage in Preferences › Performance raises the budget, up to a quarter of this computer's memory. 圖層超出 GPU 記憶體預算。在 偏好設定 › 效能 中提高記憶體使用量可增加預算,最多為本機記憶體的四分之一。
|
||||
The GPU compositor wasn't used: {reason} 未使用 GPU 合成器:{reason}
|
||||
fontWeight Thin 極細
|
||||
fontWeight ExtraLight 特細
|
||||
fontWeight Light 細體
|
||||
fontWeight Regular 常規
|
||||
fontWeight Medium 中等
|
||||
fontWeight SemiBold 半粗
|
||||
fontWeight Bold 粗體
|
||||
fontWeight ExtraBold 特粗
|
||||
fontWeight Black 黑體
|
||||
fontWeight Italic 斜體
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -711,6 +711,13 @@ pub fn styles(family: &str) -> Vec<String> {
|
||||
if v.is_empty() { vec![tl!("Regular").into()] } else { v }
|
||||
}
|
||||
|
||||
/// Localized style label for the dropdown. The raw string stays the engine's `fontStyle` key;
|
||||
/// the words (weights and "Italic") are translated in the `fontWeight` context, where "Light"
|
||||
/// means a weight — unlike the Camera Raw "Light" section.
|
||||
pub fn style_label(style: &str) -> String {
|
||||
style.split(' ').map(|w| crate::i18n::tr_ctx(crate::i18n::current(), "fontWeight", w)).collect::<Vec<_>>().join(" ")
|
||||
}
|
||||
|
||||
/// Searchable font-family combo box.
|
||||
fn font_picker(ui: &mut egui::Ui, current: &mut String, width: f32) -> bool {
|
||||
let mut changed = false;
|
||||
@@ -820,7 +827,7 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
|
||||
app.ui.tool_options.type_style = style.clone();
|
||||
apply(app, ui.ctx(), json!({"font": fam, "fontStyle": style}));
|
||||
}
|
||||
let opts: Vec<(String, String)> = styles(&fam).into_iter().map(|s| (s.clone(), s)).collect();
|
||||
let opts: Vec<(String, String)> = styles(&fam).into_iter().map(|s| (s.clone(), style_label(&s))).collect();
|
||||
let opts_ref: Vec<(String, &str)> = opts.iter().map(|(a, b)| (a.clone(), b.as_str())).collect();
|
||||
if crate::widgets::dropdown(ui, "type-style", &mut style, &opts_ref, 110.0) {
|
||||
app.ui.tool_options.type_style = style.clone();
|
||||
@@ -1126,7 +1133,7 @@ fn type_sections(app: &mut PhotocraftApp, ui: &mut egui::Ui, character: bool, pa
|
||||
});
|
||||
row(ui, &mut |ui| {
|
||||
let mut style = if c.font_style.is_empty() { "Regular".to_string() } else { c.font_style.clone() };
|
||||
let opts: Vec<(String, String)> = styles(&fam).into_iter().map(|s| (s.clone(), s)).collect();
|
||||
let opts: Vec<(String, String)> = styles(&fam).into_iter().map(|s| (s.clone(), style_label(&s))).collect();
|
||||
let opts_ref: Vec<(String, &str)> = opts.iter().map(|(a, b)| (a.clone(), b.as_str())).collect();
|
||||
if crate::widgets::dropdown(ui, "props-type-style", &mut style, &opts_ref, full) {
|
||||
apply(app, ui.ctx(), json!({"fontStyle": style}));
|
||||
|
||||
Reference in new issue
Block a user