From 51e434661f21fe58b054d618775b9b66433a02e5 Mon Sep 17 00:00:00 2001 From: zitann2020 Date: Sat, 31 Oct 2026 22:12:11 +0900 Subject: [PATCH] i18n(ja): the text animator's pop-up reads its own catalog rows Co-Authored-By: DeepSeek V4.1 Flash --- crates/ui-egui/src/i18n.rs | 14 +++++++------- crates/ui-egui/src/i18n/ui.rs | 27 ++++++++++++++++----------- crates/ui-egui/src/panels/timeline.rs | 12 +++++++----- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index 9eed465e4..add88971d 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -1525,7 +1525,7 @@ const TRADITIONAL_CHINESE: &[(&str, &str, &str)] = &[ ("layer.addTextAnimator", "Anchor Point", "錨點"), ("layer.addTextAnimator", "Position", "位置"), ("layer.addTextAnimator", "Scale", "縮放"), - ("layer.addTextAnimator", "Skew", "傾斜"), + ("layer.addTextAnimator", "Skew", "歪曲"), ("layer.addTextAnimator", "Rotation", "旋轉"), ("layer.addTextAnimator", "Opacity", "不透明度"), ("layer.addTextAnimator", "All Transform Properties", "所有變換屬性"), @@ -2156,7 +2156,7 @@ const JAPANESE: &[(&str, &str, &str)] = &[ ("layer.sequence", "Sequence Layers...", "シーケンスレイヤー..."), ("keys.timeReverse", "Time-Reverse Keyframes", "時間反転キーフレーム"), ("", "Animate Text", "テキストをアニメート"), - ("layer.enablePerChar3D", "Enable Per-character 3D", "文字ごとの3Dを有効化"), + ("layer.enablePerChar3D", "Enable Per-character 3D", "文字単位の 3D 化を使用"), ("layer.addTextAnimator", "Anchor Point", "アンカーポイント"), ("layer.addTextAnimator", "Position", "位置"), ("layer.addTextAnimator", "Scale", "スケール"), @@ -2168,7 +2168,7 @@ const JAPANESE: &[(&str, &str, &str)] = &[ ("layer.addTextAnimator", "RGB", "RGB"), ("layer.addTextAnimator", "Hue", "色相"), ("layer.addTextAnimator", "Saturation", "彩度"), - ("layer.addTextAnimator", "Brightness", "明るさ"), + ("layer.addTextAnimator", "Brightness", "明度"), ("", "Stroke Color", "線のカラー"), ("layer.addTextAnimator", "Stroke Width", "線幅"), ("", "Front", "前面"), @@ -2176,11 +2176,11 @@ const JAPANESE: &[(&str, &str, &str)] = &[ ("", "Side", "側面"), ("", "Back", "背面"), ("layer.addTextAnimator", "Color", "カラー"), - ("layer.addTextAnimator", "Tracking", "トラッキング"), - ("layer.addTextAnimator", "Line Anchor", "行のアンカー"), - ("layer.addTextAnimator", "Line Spacing", "行間"), + ("layer.addTextAnimator", "Tracking", "字送り"), + ("layer.addTextAnimator", "Line Anchor", "ラインアンカー"), + ("layer.addTextAnimator", "Line Spacing", "ラインスペース"), ("layer.addTextAnimator", "Character Offset", "文字のオフセット"), - ("layer.addTextAnimator", "Character Value", "文字の値"), + ("layer.addTextAnimator", "Character Value", "文字コード"), ("layer.addTextAnimator", "Blur", "ブラー"), ("text.animatorFontAxes", "Variable Font Axes", "可変フォントの軸"), ("", "Add Text Selector", "テキストセレクターを追加"), diff --git a/crates/ui-egui/src/i18n/ui.rs b/crates/ui-egui/src/i18n/ui.rs index ed4378271..511ee9d56 100644 --- a/crates/ui-egui/src/i18n/ui.rs +++ b/crates/ui-egui/src/i18n/ui.rs @@ -629,7 +629,12 @@ const JAPANESE: &[(&str, &str)] = &[ ), ("VR Environments", "VR環境"), ("Value:", "値:"), - ("Variable Font Axes", "可変フォントの軸"), + ("Variable Font Axes", "バリアブルフォント軸"), + ("Selector: Range", "セレクター: 範囲"), + ("Selector: Wiggly", "セレクター: ウィグリー"), + ("Selector: Expression", "セレクター: エクスプレッション"), + ("Property: {}", "プロパティ: {}"), + ("Variable Font Axes: {}", "バリアブルフォント軸: {}"), ("Video Codec: {}", "ビデオコーデック:{}"), ("View:", "表示:"), ("Welcome to EffectCraft", "EffectCraftへようこそ"), @@ -1071,16 +1076,16 @@ const JAPANESE: &[(&str, &str)] = &[ ("Line Spacing", "行間"), ("Character Offset", "文字のオフセット"), ("Character Value", "文字の値"), - ("Fill Color: RGB", "塗りの色: RGB"), - ("Fill Color: Hue", "塗りの色: 色相"), - ("Fill Color: Saturation", "塗りの色: 彩度"), - ("Fill Color: Brightness", "塗りの色: 明るさ"), - ("Fill Color: Opacity", "塗りの色: 不透明度"), - ("Stroke Color: RGB", "線の色: RGB"), - ("Stroke Color: Hue", "線の色: 色相"), - ("Stroke Color: Saturation", "線の色: 彩度"), - ("Stroke Color: Brightness", "線の色: 明るさ"), - ("Stroke Color: Opacity", "線の色: 不透明度"), + ("Fill Color: RGB", "塗りのカラー: RGB"), + ("Fill Color: Hue", "塗りのカラー: 色相"), + ("Fill Color: Saturation", "塗りのカラー: 彩度"), + ("Fill Color: Brightness", "塗りのカラー: 明度"), + ("Fill Color: Opacity", "塗りのカラー: 不透明度"), + ("Stroke Color: RGB", "線のカラー: RGB"), + ("Stroke Color: Hue", "線のカラー: 色相"), + ("Stroke Color: Saturation", "線のカラー: 彩度"), + ("Stroke Color: Brightness", "線のカラー: 明度"), + ("Stroke Color: Opacity", "線のカラー: 不透明度"), ("Stroke Width", "線幅"), ("Front: Color", "前面: 色"), ("Bevel: Color", "ベベル: 色"), diff --git a/crates/ui-egui/src/panels/timeline.rs b/crates/ui-egui/src/panels/timeline.rs index a1522f501..eb0d4e52b 100644 --- a/crates/ui-egui/src/panels/timeline.rs +++ b/crates/ui-egui/src/panels/timeline.rs @@ -17,7 +17,7 @@ use egui::{Align2, Color32, Pos2, Rect, Sense, Stroke, StrokeKind, pos2, vec2}; use serde_json::json; use std::sync::Arc; -use crate::i18n::tr; +use crate::i18n::{tr, tr_args}; use crate::icons::{self, Icon}; use crate::theme::Tokens; use crate::{EffectcraftApp, widgets}; @@ -5249,7 +5249,9 @@ fn text_anim_popups( opts.push("-".into()); acts.push((String::new(), json!(null))); for (k, l) in TEXT_ANIMATOR_KINDS { - opts.push(l.to_string()); + // The engine names these; the menu catalog holds their Japanese, so the pop-up reads + // what Animation ▸ Animate Text reads. + opts.push(crate::i18n::label(app, "layer.addTextAnimator", l).to_string()); acts.push(if *k == "-" { (String::new(), json!(null)) } else { ("layer.addTextAnimator".into(), json!({"layer": layer.id.0, "property": k})) }); } // Variable Font Axes of the layer's font. @@ -5261,19 +5263,19 @@ fn text_anim_popups( acts.push((String::new(), json!(null))); } for a in axes { - opts.push(format!("Variable Font Axes: {}", a.name)); + opts.push(tr_args("Variable Font Axes: {}", &[&a.name])); acts.push(("text.animatorFontAxes".into(), json!({"layer": layer.id.0, "axis": a.tag}))); } } } else { for (kind, l) in [("range", "Selector: Range"), ("wiggly", "Selector: Wiggly"), ("expression", "Selector: Expression")] { - opts.push(l.into()); + opts.push(tr(l).to_string()); acts.push(("layer.addTextSelector".into(), json!({"layer": layer.id.0, "animator": uid, "kind": kind}))); } opts.push("-".into()); acts.push((String::new(), json!(null))); for (k, l) in TEXT_ANIMATOR_KINDS { - opts.push(if *k == "-" { "-".into() } else { format!("Property: {l}") }); + opts.push(if *k == "-" { "-".into() } else { tr_args("Property: {}", &[&l]) }); acts.push(if *k == "-" { (String::new(), json!(null)) } else {