This commit is contained in:
Brandon Thomas
2026-11-01 21:50:53 -05:00
3 changed files with 51 additions and 34 deletions
+7 -7
View File
@@ -2814,11 +2814,11 @@ 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", "スケール"),
("layer.addTextAnimator", "Skew", "傾斜"),
("layer.addTextAnimator", "Skew", "歪曲"),
("layer.addTextAnimator", "Rotation", "回転"),
("layer.addTextAnimator", "Opacity", "不透明度"),
("layer.addTextAnimator", "All Transform Properties", "すべてのトランスフォームプロパティ"),
@@ -2834,13 +2834,13 @@ 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", "可変フォントの軸"),
("text.animatorFontAxes", "Variable Font Axes", "バリアブルフォント軸"),
("", "Add Text Selector", "テキストセレクターを追加"),
("text.addSelector", "Range", "範囲"),
("text.addSelector", "Wiggly", "ウィグリー"),
+26 -18
View File
@@ -211,7 +211,7 @@ const JAPANESE: &[(&str, &str)] = &[
("Add a shape, fill, stroke or path operation", "シェイプ、塗り、線、またはパス操作を追加"),
("Add to Composition", "コンポジションに追加"),
("Add to Favorites", "お気に入りに追加"),
("Add:", "追加:"),
("Add:", "追加:"),
("Adjust Exposure (stops)", "露出を調整(段単位)"),
("Adjust composition duration to the time span of the selected layers", "コンポジションのデュレーションを、選択したレイヤーの時間範囲に合わせる"),
("Advanced", "詳細"),
@@ -636,7 +636,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へようこそ"),
@@ -683,9 +688,9 @@ const JAPANESE: &[(&str, &str)] = &[
("Adobe-style built-in", "Adobe標準の組み込み"),
("Blue", "青"),
("Current Settings", "現在の設定"),
("Disable Per-character 3D", "文字ごとの3Dを無効化"),
("Disable Per-character 3D", "文字単位の 3D 化を使用しない"),
("Draft", "ドラフト"),
("Enable Per-character 3D", "文字ごとの3Dを有効化"),
("Enable Per-character 3D", "文字単位の 3D 化を使用"),
("Fast Draft", "高速ドラフト"),
("Fast Previews (Draft 3D, Faster Effects)", "高速プレビュー(ドラフト3D、より高速なエフェクト)"),
("Green", "緑"),
@@ -1074,20 +1079,23 @@ const JAPANESE: &[(&str, &str)] = &[
("Rove Across Time", "時間をまたいで移動"),
("Anchor Point", "アンカーポイント"),
("All Transform Properties", "すべてのトランスフォームプロパティ"),
("Line Anchor", "行のアンカー"),
("Line Spacing", "行間"),
("Animate:", "アニメーター:"),
("Add property or selector", "プロパティまたはセレクターを追加"),
("Animate text", "テキストをアニメート"),
("Line Anchor", "ラインアンカー"),
("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", "線の色: 不透明度"),
("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", "線のカラー: 不透明度"),
("Stroke Width", "線幅"),
("Front: Color", "前面: 色"),
("Bevel: Color", "ベベル: 色"),
@@ -10394,7 +10402,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.
+18 -9
View File
@@ -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};
@@ -5227,13 +5227,18 @@ 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);
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" {
// The label is the English source; the drawn text is the catalog's, so the row reads
// アニメーター: as Animation ▸ Animate Text does. The button follows the width the label
// actually takes, since a translation is rarely as wide as the English it replaces.
let galley = p.layout_no_wrap(tr(label).to_string(), Tokens::ui(11.5), t.text_dim);
let text_w = galley.size().x;
p.galley(pos2(x + 6.0, cy - galley.size().y / 2.0), galley, t.text_dim);
let br = Rect::from_center_size(pos2(x + 6.0 + text_w + 10.0, cy), vec2(16.0, 16.0));
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));
@@ -5249,7 +5254,11 @@ 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. `command_label` asks the menu for the row Animation ▸ Animate
// Text uses and falls back to the panel catalog, which holds the split names the menu
// does not list (`Fill Color: RGB` and the other colour rows), so no item is left in
// English. A separator is not a label.
opts.push(if *k == "-" { "-".into() } else { crate::i18n::command_label("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 +5270,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: {}", &[&crate::i18n::command_label("layer.addTextAnimator", l)]) });
acts.push(if *k == "-" {
(String::new(), json!(null))
} else {