Skip to content

Commit 84cb6f1

Browse files
committed
Add translations
1 parent 5869ab9 commit 84cb6f1

File tree

4 files changed

+75
-6
lines changed

4 files changed

+75
-6
lines changed

Editor/Localization/Locales/en.po

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ msgstr "If you want to suppress hole generation during simplification, enable th
1111
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.label"
1212
msgstr "Preserve Surface Curvature"
1313

14+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.tooltip"
15+
msgstr "Change the cost formula to preserve gently curved surfaces."
16+
1417
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.UseBarycentricCoordinateInterpolation.label"
1518
msgstr "Use Barycentric Coordinate Interpolation"
1619

@@ -26,5 +29,35 @@ msgstr "Specifies how much normal misalignment to allow when generating lightwei
2629
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.label"
2730
msgstr "Enable Smart Link"
2831

32+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.tooltip"
33+
msgstr "If this option is enabled, vertices that are not originally connected but are close to each other will be included in the first merge candidates. Increases the initialization cost."
34+
35+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.SmartLinkOptions"
36+
msgstr "Smart Link Options"
37+
38+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkDistance.label"
39+
msgstr "Vertex Link Distance"
40+
41+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkDistance.tooltip"
42+
msgstr "When smart link is enabled, this is used to select candidates for merging vertices that are not originally connected to each other. Increasing this value also increases the initialization cost."
43+
44+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkColorDistance.label"
45+
msgstr "Vertex Link Color Distance"
46+
47+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkColorDistance.tooltip"
48+
msgstr "Larger values may improve the shape of the polygons after lightening, but at the cost of unnatural vertex colors."
49+
50+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkUvDistance.label"
51+
msgstr "Vertex Link UV Distance"
52+
53+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkUvDistance.tooltip"
54+
msgstr "Larger values may improve the shape of the polygons after lightening, but at the cost of making the UVs unnatural."
55+
56+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkMinNormalDot.label"
57+
msgstr "Vertex Link Min Normal Dot"
58+
59+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkMinNormalDot.tooltip"
60+
msgstr "Use different min normal dot for smart link. The more stringent of the two is used for smart link."
61+
2962
msgid "locale:en"
30-
msgstr "English"
63+
msgstr "English"

Editor/Localization/Locales/ja.po

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ msgstr "軽量化後のメッシュに穴が目立つとき、有効化してみ
1111
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.label"
1212
msgstr "曲面を保持"
1313

14+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.tooltip"
15+
msgstr "なだらかな曲面を保持するようにコスト計算式を変更します。"
16+
1417
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.UseBarycentricCoordinateInterpolation.label"
1518
msgstr "重心座標系補間を使用する"
1619

@@ -24,7 +27,37 @@ msgid "Meshia.MeshSimplification.MeshSimplifierOptions.MinNormalDot.tooltip"
2427
msgstr "頂点を削減して軽量化されたポリゴンを生成する際、どこまで法線方向のズレを許容するかを指定します。たとえばcos90°=0を指定すると90°までのズレを許容し、cos180°=-1を指定することで180°までのズレを許容します。"
2528

2629
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.label"
27-
msgstr "近傍点をマージ候補に含める"
30+
msgstr "近傍頂点をマージ候補に含める"
31+
32+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.tooltip"
33+
msgstr "元々同一ポリゴンに含まれる頂点同士に加え、近傍頂点同士を初期のマージ候補に加えます。"
34+
35+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.SmartLinkOptions"
36+
msgstr "近傍頂点マージオプション"
37+
38+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkDistance.label"
39+
msgstr "近傍頂点マージ距離"
40+
41+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkDistance.tooltip"
42+
msgstr "この距離より近い頂点同士が近傍頂点とみなされ、マージ候補に加えられます。大きな値を設定すると、処理時間が伸びる場合があります。"
43+
44+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkColorDistance.label"
45+
msgstr "近傍頂点マージ頂点カラー距離"
46+
47+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkColorDistance.tooltip"
48+
msgstr "大きな値を設定するほど軽量化後のポリゴンの形状が改善される場合がありますが、その代わりに頂点カラーが不自然になる場合があります。"
49+
50+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkUvDistance.label"
51+
msgstr "近傍頂点マージ頂点UV距離"
52+
53+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkUvDistance.tooltip"
54+
msgstr "大きな値を設定するほど軽量化後のポリゴンの形状が改善される場合がありますが、その代わりにUVが不自然になる場合があります。"
55+
56+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkMinNormalDot.label"
57+
msgstr "近傍頂点マージ許容最小法線ドット積"
58+
59+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.VertexLinkMinNormalDot.tooltip"
60+
msgstr "近傍頂点マージ時に異なる許容最小法線ドット積を使用します。2つのうち、より厳しいほうが近傍頂点マージ時に使用されます。"
2861

2962
msgid "locale:ja"
30-
msgstr "日本語"
63+
msgstr "日本語"

Editor/Localization/LocalizationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal static class LocalizationProvider
1313

1414
[AssemblyCL4EELocalization]
1515
public static Localization Localization { get; } = new("ca7beb49d3e85244e803080472c014c2", DefaultLocale);
16-
public static void LocalizeProperties<T>(VisualElement root)
16+
public static void LocalizeBindedElements<T>(VisualElement root)
1717
{
1818
var typeName = typeof(T).FullName;
1919
root.Query().OfType<BindableElement>().Where(bindableElement => !string.IsNullOrEmpty(bindableElement.bindingPath))

Editor/MeshSimplifierOptionsDrawer.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
2626

2727
var resetOptionsButton = root.Q<Button>("ResetOptionsButton");
2828

29-
LocalizationProvider.LocalizeProperties<MeshSimplifierOptions>(root);
29+
LocalizationProvider.LocalizeBindedElements<MeshSimplifierOptions>(root);
30+
smartLinkOptionsGroup.text = LocalizationProvider.Localization.Tr("Meshia.MeshSimplification.MeshSimplifierOptions.SmartLinkOptions");
3031

3132
LocalizationProvider.MountLanguagePicker(languagePicker);
3233

3334
languagePicker.RegisterValueChangedCallback(evt =>
3435
{
35-
LocalizationProvider.LocalizeProperties<MeshSimplifierOptions>(root);
36+
LocalizationProvider.LocalizeBindedElements<MeshSimplifierOptions>(root);
37+
smartLinkOptionsGroup.text = LocalizationProvider.Localization.Tr("Meshia.MeshSimplification.MeshSimplifierOptions.SmartLinkOptions");
3638
});
3739

3840
enableSmartLinkToggle.RegisterValueChangedCallback(changeEvent =>
@@ -41,6 +43,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
4143

4244
});
4345

46+
4447
resetOptionsButton.clicked += () =>
4548
{
4649
property.boxedValue = MeshSimplifierOptions.Default;

0 commit comments

Comments
 (0)