i18n(ja): the animator pop-up and its selectors read the catalog

Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com>
This commit is contained in:
zitann2020
2026-10-31 22:30:00 +09:00
co-authored by DeepSeek V4.1 Flash
parent 51e434661f
commit f1c9d1d23d
3 changed files with 19 additions and 13 deletions
+3 -3
View File
@@ -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", "所有變換屬性"),
@@ -2160,7 +2160,7 @@ const JAPANESE: &[(&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", "すべてのトランスフォームプロパティ"),
@@ -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", "前面"),
+8 -4
View File
@@ -1072,10 +1072,14 @@ const JAPANESE: &[(&str, &str)] = &[
("Rove Across Time", "時間をまたいで移動"),
("Anchor Point", "アンカーポイント"),
("All Transform Properties", "すべてのトランスフォームプロパティ"),
("Line Anchor", "行のアンカー"),
("Line Spacing", "行間"),
("Animate:", "アニメーター:"),
("Add:", "追加:"),
("Add property or selector", "プロパティまたはセレクターを追加"),
("Animate text", "テキストをアニメート"),
("Line Anchor", "ラインアンカー"),
("Line Spacing", "ラインスペース"),
("Character Offset", "文字のオフセット"),
("Character Value", "文字の値"),
("Character Value", "文字コード"),
("Fill Color: RGB", "塗りのカラー: RGB"),
("Fill Color: Hue", "塗りのカラー: 色相"),
("Fill Color: Saturation", "塗りのカラー: 彩度"),
@@ -7823,7 +7827,7 @@ mod tests {
assert_eq!(tr("Media Duration"), "メディアの長さ");
assert_eq!(tr("Bring Layer to Front"), "レイヤーを最前面へ");
assert_eq!(tr("All Transform Properties"), "すべてのトランスフォームプロパティ");
assert_eq!(tr("Fill Color: RGB"), "塗りの色: RGB");
assert_eq!(tr("Fill Color: RGB"), "塗りのカラー: RGB");
assert_eq!(tr("Lines added"), "追加行数");
// The composition-settings tabs and the Preview transport pass these through `tr` as
// variables, so a missing row would fall back to English unnoticed.
+8 -6
View File
@@ -5227,13 +5227,15 @@ fn text_anim_popups(
"animator" => ("Add:", "add"),
_ => return,
};
p.text(pos2(x + 6.0, cy), Align2::LEFT_CENTER, label, Tokens::ui(11.5), t.text_dim);
// The label is the English source; the drawn text is the catalog's, so the row reads
// アニメーター: as Animation ▸ Animate Text does.
p.text(pos2(x + 6.0, cy), Align2::LEFT_CENTER, tr(label), Tokens::ui(11.5), t.text_dim);
let br = Rect::from_center_size(pos2(x + 6.0 + if key == "add" { 34.0 } else { 62.0 }, cy), vec2(16.0, 16.0));
let resp = ui.interact(br, egui::Id::unique(("tl-textanim", uid)), Sense::click()).on_hover_text(if key == "add" {
let resp = ui.interact(br, egui::Id::unique(("tl-textanim", uid)), Sense::click()).on_hover_text(tr(if key == "add" {
"Add property or selector"
} else {
"Animate text"
});
}));
icons::paint(p, br.shrink(3.0), Icon::ChevronRight, if resp.hovered() { t.text } else { t.text_dim });
app.auto.add(&format!("timeline.group.{uid}.{key}"), br, label);
let pop = egui::Id::unique(("tl-textanim-pop", uid));
@@ -5250,8 +5252,8 @@ fn text_anim_popups(
acts.push((String::new(), json!(null)));
for (k, l) in TEXT_ANIMATOR_KINDS {
// 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());
// what Animation ▸ Animate Text reads. A separator is not a label.
opts.push(if *k == "-" { "-".into() } else { 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.
@@ -5275,7 +5277,7 @@ fn text_anim_popups(
opts.push("-".into());
acts.push((String::new(), json!(null)));
for (k, l) in TEXT_ANIMATOR_KINDS {
opts.push(if *k == "-" { "-".into() } else { tr_args("Property: {}", &[&l]) });
opts.push(if *k == "-" { "-".into() } else { tr_args("Property: {}", &[&crate::i18n::label(app, "layer.addTextAnimator", l)]) });
acts.push(if *k == "-" {
(String::new(), json!(null))
} else {