Skip to content

Commit 42f7cdc

Browse files
committed
Change localization key naming
1 parent 75c70d7 commit 42f7cdc

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Editor/Localization/Locales/en.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ msgid ""
22
msgstr ""
33
"Language: en\n"
44

5-
msgid "MeshSimplifierOptions:PreserveBorderEdges:label"
5+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveBorderEdges.label"
66
msgstr "Preserve Border Edges"
77

8-
msgid "MeshSimplifierOptions:PreserveBorderEdges:tooltip"
8+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveBorderEdges.tooltip"
99
msgstr "If you want to suppress hole generation during simplification, enable this option."
1010

11-
msgid "MeshSimplifierOptions:PreserveSurfaceCurvature:label"
11+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.label"
1212
msgstr "Preserve Surface Curvature"
1313

14-
msgid "MeshSimplifierOptions:EnableSmartLink:label"
14+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.label"
1515
msgstr "Enable Smart Link"
1616

1717
msgid "locale:en"

Editor/Localization/Locales/ja.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ msgid ""
22
msgstr ""
33
"Language: ja\n"
44

5-
msgid "MeshSimplifierOptions:PreserveBorderEdges:label"
5+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveBorderEdges.label"
66
msgstr "端の露出したポリゴンを保持"
77

8-
msgid "MeshSimplifierOptions:PreserveBorderEdges:tooltip"
8+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveBorderEdges.tooltip"
99
msgstr "軽量化後のメッシュに穴が目立つとき、有効化してみてください。"
1010

11-
msgid "MeshSimplifierOptions:PreserveSurfaceCurvature:label"
11+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.PreserveSurfaceCurvature.label"
1212
msgstr "曲面を保持"
1313

14-
msgid "MeshSimplifierOptions:EnableSmartLink:label"
14+
msgid "Meshia.MeshSimplification.MeshSimplifierOptions.EnableSmartLink.label"
1515
msgstr "近傍点をマージ候補に含める"
1616

1717
msgid "locale:ja"

Editor/Localization/LocalizationProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ internal static class LocalizationProvider
2020
};
2121
public static void LocalizeProperties<T>(VisualElement root)
2222
{
23-
var typeName = typeof(T).Name;
23+
var typeName = typeof(T).FullName;
2424
root.Query().OfType<BindableElement>().Where(bindableElement => !string.IsNullOrEmpty(bindableElement.bindingPath))
2525
.ForEach(bindableElement =>
2626
{
27-
if (Localization.TryTr($"{typeName}:{bindableElement.bindingPath}:label") is { } translatedLabel)
27+
if (Localization.TryTr($"{typeName}.{bindableElement.bindingPath}.label") is { } translatedLabel)
2828
{
2929
switch (bindableElement)
3030
{
@@ -45,7 +45,7 @@ public static void LocalizeProperties<T>(VisualElement root)
4545
break;
4646
}
4747
}
48-
if (Localization.TryTr($"{typeName}:{bindableElement.bindingPath}:tooltip") is { } translatedTooltip)
48+
if (Localization.TryTr($"{typeName}.{bindableElement.bindingPath}.tooltip") is { } translatedTooltip)
4949
{
5050
bindableElement.tooltip = translatedTooltip;
5151
}

0 commit comments

Comments
 (0)