From f0c7bddf261cfeef1f7f5ee7651086bee7a3b3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AF=7E?= Date: Tue, 20 Jul 2021 03:36:58 +0200 Subject: [PATCH] Localize ExpressionsEditor --- .../Scripts/Editor/EditorUI/CgeLocale.cs | 2 + .../EditorUI/ComboGestureActivityEditor.cs | 12 +--- .../EditorUI/ComboGestureCompilerEditor.cs | 12 +--- .../EditorUI/ComboGestureIntegratorEditor.cs | 12 +--- .../EditorUI/ComboGesturePuppetEditor.cs | 12 +--- .../EditorWindows/EeAnimationEditorWindow.cs | 63 ++++++++++--------- .../EditorWindows/EePropertyExplorerWindow.cs | 14 ++--- .../Scripts/Editor/EditorUI/EeLocale.cs | 39 +++++++++++- .../Editor/EditorUI/EeLocaleDefaults.cs | 35 ++++++++++- .../Scripts/Editor/EditorUI/Locale.meta | 3 + .../Scripts/Editor/EditorUI/Locale/ee.en.json | 37 +++++++++++ .../Editor/EditorUI/Locale/ee.en.json.meta | 3 + .../Scripts/Editor/EditorUI/Locale/ee.jp.json | 37 +++++++++++ .../Editor/EditorUI/Locale/ee.jp.json.meta | 3 + 14 files changed, 207 insertions(+), 77 deletions(-) create mode 100644 Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale.meta create mode 100644 Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json create mode 100644 Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json.meta create mode 100644 Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json create mode 100644 Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json.meta diff --git a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/CgeLocale.cs b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/CgeLocale.cs index 2c42684c..9883a873 100644 --- a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/CgeLocale.cs +++ b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/CgeLocale.cs @@ -11,6 +11,8 @@ namespace Hai.ComboGesture.Scripts.Editor.EditorUI { public class CgeLocale { + internal static string CORE_Switch = "Switch language (English / 日本語)"; + internal static string CORE_Inaccuracy = "一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"; private static string CGE_Documentation_URL => LocalizeOrElse("CGE_Documentation_URL", CgeLocaleDefaults.CGE_Documentation_URL); private static string CGE_PermutationsDocumentation_URL => LocalizeOrElse("CGE_PermutationsDocumentation_URL", CgeLocaleDefaults.CGE_PermutationsDocumentation_URL); private static string CGE_IntegratorDocumentation_URL => LocalizeOrElse("CGE_IntegratorDocumentation_URL", CgeLocaleDefaults.CGE_IntegratorDocumentation_URL); diff --git a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureActivityEditor.cs b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureActivityEditor.cs index c0095b2a..1bc38c8c 100644 --- a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureActivityEditor.cs +++ b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureActivityEditor.cs @@ -229,19 +229,11 @@ public override void OnInspectorGUI() { serializedObject.Update(); - if (GUILayout.Button("Switch language (English / 日本語)")) + if (GUILayout.Button(CgeLocale.CORE_Switch)) { CgeLocalization.CycleLocale(); } - - if (CgeLocalization.IsEnglishLocaleActive()) - { - EditorGUILayout.LabelField(""); - } - else - { - EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); - } + EditorGUILayout.LabelField(CgeLocalization.IsEnglishLocaleActive() ? "" : CgeLocale.CORE_Inaccuracy); _foldoutHelp = EditorGUILayout.Foldout(_foldoutHelp, new GUIContent("Help", _guideIcon32)); if (_foldoutHelp) diff --git a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureCompilerEditor.cs b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureCompilerEditor.cs index daa45846..ccada97a 100644 --- a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureCompilerEditor.cs +++ b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureCompilerEditor.cs @@ -142,19 +142,11 @@ public override void OnInspectorGUI() serializedObject.Update(); var italic = new GUIStyle(GUI.skin.label) {fontStyle = FontStyle.Italic}; - if (GUILayout.Button("Switch language (English / 日本語)")) + if (GUILayout.Button(CgeLocale.CORE_Switch)) { CgeLocalization.CycleLocale(); } - - if (CgeLocalization.IsEnglishLocaleActive()) - { - EditorGUILayout.LabelField(""); - } - else - { - EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); - } + EditorGUILayout.LabelField(CgeLocalization.IsEnglishLocaleActive() ? "" : CgeLocale.CORE_Inaccuracy); if (GUILayout.Button(new GUIContent(CgeLocale.CGEC_Documentation_and_tutorials, _guideIcon32))) { diff --git a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureIntegratorEditor.cs b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureIntegratorEditor.cs index 81bb11ab..760decec 100644 --- a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureIntegratorEditor.cs +++ b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGestureIntegratorEditor.cs @@ -24,19 +24,11 @@ public override void OnInspectorGUI() { serializedObject.Update(); - if (GUILayout.Button("Switch language (English / 日本語)")) + if (GUILayout.Button(CgeLocale.CORE_Switch)) { CgeLocalization.CycleLocale(); } - - if (CgeLocalization.IsEnglishLocaleActive()) - { - EditorGUILayout.LabelField(""); - } - else - { - EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); - } + EditorGUILayout.LabelField(CgeLocalization.IsEnglishLocaleActive() ? "" : CgeLocale.CORE_Inaccuracy); if (GUILayout.Button(new GUIContent(CgeLocale.CGEI_Documentation, _guideIcon32))) { diff --git a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGesturePuppetEditor.cs b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGesturePuppetEditor.cs index 84b9e808..3ab5118d 100644 --- a/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGesturePuppetEditor.cs +++ b/Assets/Hai/ComboGesture/Scripts/Editor/EditorUI/ComboGesturePuppetEditor.cs @@ -84,19 +84,11 @@ public override void OnInspectorGUI() mainTree.objectReferenceValue = null; } - if (GUILayout.Button("Switch language (English / 日本語)")) + if (GUILayout.Button(CgeLocale.CORE_Switch)) { CgeLocalization.CycleLocale(); } - - if (CgeLocalization.IsEnglishLocaleActive()) - { - EditorGUILayout.LabelField(""); - } - else - { - EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); - } + EditorGUILayout.LabelField(CgeLocalization.IsEnglishLocaleActive() ? "" : CgeLocale.CORE_Inaccuracy); EditorGUILayout.Separator(); EditorGUI.BeginDisabledGroup(serializedObject.isEditingMultipleObjects); diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EeAnimationEditorWindow.cs b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EeAnimationEditorWindow.cs index 6ca99653..a0711ccd 100644 --- a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EeAnimationEditorWindow.cs +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EeAnimationEditorWindow.cs @@ -85,20 +85,26 @@ private void OnGUI() GUILayout.BeginHorizontal(); if (!_accessCommands.HasActiveClip()) { - EditorGUILayout.TextField("No animation selected.", GUILayout.ExpandWidth(true)); + EditorGUILayout.TextField(EeLocale.EEA_No_animation_selected, GUILayout.ExpandWidth(true)); } else { _currentClipAssetRename = EditorGUILayout.TextField(_currentClipAssetRename, GUILayout.ExpandWidth(true)); } EditorGUI.BeginDisabledGroup(!_accessCommands.HasActiveClip() || _currentClipAssetRename == currentClip.name || File.Exists(NewPath(currentClip))); - if (GUILayout.Button("Rename", GUILayout.Width(70))) + if (GUILayout.Button(EeLocale.EEA_Rename, GUILayout.Width(70))) { AssetDatabase.MoveAsset(AssetDatabase.GetAssetPath(currentClip), NewPath(currentClip)); } EditorGUI.EndDisabledGroup(); GUILayout.EndHorizontal(); + if (GUILayout.Button(EeLocale.CORE_Switch)) + { + EeLocalization.CycleLocale(); + } + EditorGUILayout.LabelField(EeLocalization.IsEnglishLocaleActive() ? "" : EeLocale.CORE_Inaccuracy); + UiPreviewSetup(); UiPreviewCamera(); if (!_accessCommands.HasActiveClip()) @@ -118,13 +124,13 @@ private void OnGUI() if (_accessCommands.AllPreviewSetups().Count > 0) { - if (ColoredBackground(_accessCommands.IsMaintaining(), Color.green, () => GUILayout.Button("Preview animation in Scene"))) + if (ColoredBackground(_accessCommands.IsMaintaining(), Color.green, () => GUILayout.Button(EeLocale.EEA_Preview_animation_in_scene))) { _previewCommands.ToggleMaintainPreview(); } EditorGUI.BeginDisabledGroup(!_accessCommands.IsMaintaining()); - var scenePreviewMode = (EeAnimationEditorScenePreviewMode)EditorGUILayout.EnumPopup("Scene previews", _accessCommands.GetScenePreviewMode()); + var scenePreviewMode = (EeAnimationEditorScenePreviewMode)EditorGUILayout.EnumPopup(EeLocale.EEA_Scene_previews, _accessCommands.GetScenePreviewMode()); if (scenePreviewMode != _accessCommands.GetScenePreviewMode()) { _previewCommands.SetForcePreviewGeneration(scenePreviewMode); @@ -133,13 +139,13 @@ private void OnGUI() var dummy = _accessCommands.DummyNullable(); EditorGUI.BeginDisabledGroup(!dummy.HasValue); - if (GUILayout.Button("Select animator to edit Animation")) + if (GUILayout.Button(EeLocale.EEA_Select_animator_to_edit_animation)) { Selection.SetActiveObjectWithContext(dummy.Value.Dummy.gameObject, null); } EditorGUI.EndDisabledGroup(); - if (GUILayout.Button("Generate previews")) + if (GUILayout.Button(EeLocale.EEA_Generate_previews)) { OnNewSweepRequested(); } @@ -177,7 +183,7 @@ private void OnGUI() GUILayout.BeginHorizontal(); GUILayout.Label("", GUILayout.ExpandWidth(true)); GUILayout.Label(_accessCommands.GetBasedOnWhat(editableProperty.Property) != null ? "Based" : "", GUILayout.Width(40)); - if (GUILayout.Button("Delete", GUILayout.Width(StandardWidth / 5))) + if (GUILayout.Button(EeLocale.EEA_Delete, GUILayout.Width(StandardWidth / 5))) { _editCommands.DeleteBlendshape(editableProperty.Path, editableProperty.Property); } @@ -204,11 +210,11 @@ private void OnGUI() var stats = _accessCommands.NonEditableStats(); if (stats.SmrMimicBlendshapes.Count > 0) { - GUILayout.Label($"{stats.SmrMimicBlendshapes.Count} reset blendshapes are not shown above.", EditorStyles.boldLabel); - _foldoutMassEdit = EditorGUILayout.Foldout(_foldoutMassEdit, "Show/Delete reset blendshapes"); + GUILayout.Label(string.Format(EeLocale.EEA_Reset_blendshapes_are_not_shown_above, stats.SmrMimicBlendshapes.Count), EditorStyles.boldLabel); + _foldoutMassEdit = EditorGUILayout.Foldout(_foldoutMassEdit, EeLocale.EEA_Show_delete_reset_blendshapes); if (_foldoutMassEdit) { - if (ColoredBackground(true, Color.red, () => GUILayout.Button("Delete 0-values"))) + if (ColoredBackground(true, Color.red, () => GUILayout.Button(EeLocale.EEA_Delete_zero_values))) { _editCommands.DeleteAllNeutralizedBlendshapes(); } @@ -221,35 +227,36 @@ private void OnGUI() } if (stats.HasAnyOtherStats) { - GUILayout.Label("This animation has additional properties not shown here:"); - LookupLabel(stats, EeNonEditableLookup.Transform, "transform-related"); - LookupLabel(stats, EeNonEditableLookup.Animator, "finger posing, other muscles, or Animator-related"); - LookupLabel(stats, EeNonEditableLookup.MaterialSwap, "material swaps"); - LookupLabel(stats, EeNonEditableLookup.Shader, "shader properties"); - LookupLabel(stats, EeNonEditableLookup.GameObjectToggle, "game object toggles"); - LookupLabel(stats, EeNonEditableLookup.Other, "other properties not cited above"); + GUILayout.Label(EeLocale.EEA_This_animation_has_additional_properties_not_shown_here); + LookupLabel(stats, EeNonEditableLookup.Transform, EeLocale.EEA_Transform_related); + LookupLabel(stats, EeNonEditableLookup.Animator, EeLocale.EEA_Finger_posing_other_muscles_or_animator_related); + LookupLabel(stats, EeNonEditableLookup.MaterialSwap, EeLocale.EEA_Material_swaps); + LookupLabel(stats, EeNonEditableLookup.Shader, EeLocale.EEA_Shader_properties); + LookupLabel(stats, EeNonEditableLookup.GameObjectToggle, EeLocale.EEA_Game_object_toggles); + LookupLabel(stats, EeNonEditableLookup.Other, EeLocale.EEA_Other_properties_not_cited_above); } if (_isCgeInstalled) { if (stats.Quirk != EeQuirk.EmptyIssue && stats.Quirk != EeQuirk.FirstFrameIssue && stats.EffectiveFrameDuration > 1) { - GUILayout.Label($"This animation lasts {stats.EffectiveFrameDuration} keyframes.", EditorStyles.boldLabel); + GUILayout.Label(string.Format(EeLocale.EEA_This_animation_lasts_keyframes, stats.EffectiveFrameDuration), EditorStyles.boldLabel); } } else { if (stats.Quirk != EeQuirk.EmptyIssue && stats.EffectiveFrameDuration > 1) { - GUILayout.Label($"This animation lasts {stats.EffectiveFrameDuration} keyframes.", EditorStyles.boldLabel); + GUILayout.Label(string.Format(EeLocale.EEA_This_animation_lasts_keyframes, stats.EffectiveFrameDuration), EditorStyles.boldLabel); } switch (stats.Quirk) { case EeQuirk.EmptyIssue: - EditorGUILayout.HelpBox($"This animation is empty. This will cause the animation to last {stats.EffectiveFrameDuration} keyframes.", MessageType.Warning); + EditorGUILayout.HelpBox(string.Format(EeLocale.EEA_This_animation_is_empty, stats.EffectiveFrameDuration), MessageType.Warning); break; case EeQuirk.FirstFrameIssue: - EditorGUILayout.HelpBox($"All of the keyframes are located on frame 0. This will cause the animation to last {stats.EffectiveFrameDuration} keyframes.", MessageType.Warning); + + EditorGUILayout.HelpBox(string.Format(EeLocale.EEA_All_of_the_keyframes_are_frame_zero, stats.EffectiveFrameDuration), MessageType.Warning); break; case EeQuirk.OneFrame: case EeQuirk.MoreThanOneFrame: @@ -261,23 +268,23 @@ private void OnGUI() if (editableProperties.Any(info => info.IsVaryingOverTime)) { - EditorGUILayout.HelpBox("This animation contains blendshapes that are animated differently over time.\nThey cannot be edited in Expressions Editor. Preview may not be accurate.", MessageType.Info); + EditorGUILayout.HelpBox(EeLocale.EEA_BlendshapeVaryingOverTimeWarning, MessageType.Info); } var clipName = _accessCommands.ActiveClip().name; if (clipName.Contains("Autogenerated") || clipName.Contains("DO_NOT_EDIT")) { - EditorGUILayout.HelpBox("This animation is likely auto-generated and may be overwritten at any time. You should probably not edit it.", MessageType.Error); + EditorGUILayout.HelpBox(EeLocale.EEA_AutogeneratedAnimationWarning, MessageType.Error); } #if VRC_SDK_VRCSDK3 if (editableProperties.Any(info => info.Property.ToLowerInvariant().StartsWith("blendshape.vrc.v_"))) { - EditorGUILayout.HelpBox("This animation animates blendshapes that begin with vrc.v_, usually designed for Visemes.\nIf any animation contains those, the mouth may not animate properly.", MessageType.Warning); + EditorGUILayout.HelpBox(EeLocale.EEA_VrcVisemeBlendshapeWarning, MessageType.Warning); } if (editableProperties.Any(info => info.Property.ToLowerInvariant().Equals("blendshape.blink"))) { - EditorGUILayout.HelpBox("This animation animates a blendshape called Blink, usually selected to make the avatar blink automatically.\nIf any animation contains it, the avatar may not blink properly.\nMany avatar bases have blendshapes to close each eye separately; they should be used instead.", MessageType.Warning); + EditorGUILayout.HelpBox(EeLocale.EEA_BlinkBlendshapeWarning, MessageType.Warning); } #endif @@ -302,7 +309,7 @@ private void UiPreviewSetup() var previewSetups = available.Select(previewable => previewable.AsGameObject().name).ToArray(); if (previewSetups.Length == 0) previewSetups = new[] { "None" }; - var newSelectedPreviewSetup = EditorGUILayout.Popup("Preview dummy", _selectedPreviewSetup, previewSetups); + var newSelectedPreviewSetup = EditorGUILayout.Popup(EeLocale.EEA_PreviewDummy, _selectedPreviewSetup, previewSetups); if (newSelectedPreviewSetup != _selectedPreviewSetup) { _selectedPreviewSetup = newSelectedPreviewSetup; @@ -320,7 +327,7 @@ private void UiPreviewSetup() if (_accessCommands.AllPreviewSetups().Count == 0) { - if (GUILayout.Button("Automatically setup preview!", GUILayout.Height(50), GUILayout.Width(300))) + if (GUILayout.Button(EeLocale.EEA_Automatically_setup_preview, GUILayout.Height(50), GUILayout.Width(300))) { new EePreviewSetupWizard().AutoSetup(); } @@ -339,7 +346,7 @@ private void UiPreviewCamera() cameras = dummy.Value.Cameras.Select(camera => camera.name).ToArray(); } - var newSelectedCamera = EditorGUILayout.Popup("Camera", _selectedPreviewCamera, cameras); + var newSelectedCamera = EditorGUILayout.Popup(EeLocale.EEA_Camera, _selectedPreviewCamera, cameras); if (newSelectedCamera != _selectedPreviewCamera) { _selectedPreviewCamera = newSelectedCamera; diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EePropertyExplorerWindow.cs b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EePropertyExplorerWindow.cs index 99fd6ac1..62c266a6 100644 --- a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EePropertyExplorerWindow.cs +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EditorWindows/EePropertyExplorerWindow.cs @@ -71,19 +71,19 @@ private void OnGUI() GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); - _hotspotMode = GUILayout.Toggle(_hotspotMode, "Show Hotspots (press SPACE key)"); + _hotspotMode = GUILayout.Toggle(_hotspotMode, EeLocale.EEP_Show_hotspots); - if (GUILayout.Button("Generate previews")) + if (GUILayout.Button(EeLocale.EEP_Generate_previews)) { OnNewScanRequested(); } - _foldoutMoreTools = EditorGUILayout.Foldout(_foldoutMoreTools, "Other tools"); + _foldoutMoreTools = EditorGUILayout.Foldout(_foldoutMoreTools, EeLocale.EEP_Other_tools); if (_foldoutMoreTools) { GUILayout.BeginHorizontal(); GUILayout.Space(20); - if (EeAnimationEditorWindow.ColoredBackground(_basedOnSomethingElseMode, Color.green, () => GUILayout.Button("Fix Tooth and other hidden blendshapes"))) + if (EeAnimationEditorWindow.ColoredBackground(_basedOnSomethingElseMode, Color.green, () => GUILayout.Button(EeLocale.EEP_Fix_tooth_and_other_hidden_blendshapes))) { _basedOnSomethingElseMode = !_basedOnSomethingElseMode; } @@ -143,7 +143,7 @@ private void OnGUI() EditorGUI.BeginDisabledGroup(true); GUILayout.TextField(onWhat.Substring(BlendshapePrefix.Length), GUILayout.ExpandWidth(true)); EditorGUI.EndDisabledGroup(); - if (EeAnimationEditorWindow.ColoredBackground(true, Color.red, () => GUILayout.Button("Forget", GUILayout.Width(70)))) + if (EeAnimationEditorWindow.ColoredBackground(true, Color.red, () => GUILayout.Button(EeLocale.EEP_Forget, GUILayout.Width(70)))) { _editCommands.DeleteBasedSubject(info.Property); } @@ -152,7 +152,7 @@ private void OnGUI() { var isSelected = _basedOnSomethingElseSelection.Contains(info.Property); EditorGUI.BeginDisabledGroup(_accessCommands.IsOnWhat(info.Property)); - if (EeAnimationEditorWindow.ColoredBackground(isSelected, Color.green, () => GUILayout.Button("Select", GUILayout.Width(70)))) + if (EeAnimationEditorWindow.ColoredBackground(isSelected, Color.green, () => GUILayout.Button(EeLocale.EEP_Select, GUILayout.Width(70)))) { if (isSelected) { @@ -165,7 +165,7 @@ private void OnGUI() } EditorGUI.EndDisabledGroup(); EditorGUI.BeginDisabledGroup(isSelected || _basedOnSomethingElseSelection.Count == 0); - if (GUILayout.Button("Assign")) + if (GUILayout.Button(EeLocale.EEP_Assign)) { _editCommands.AssignBased(info.Property, _basedOnSomethingElseSelection.ToList()); _basedOnSomethingElseSelection.Clear(); diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocale.cs b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocale.cs index d6779da1..7f96d07b 100644 --- a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocale.cs +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocale.cs @@ -5,14 +5,51 @@ using System.Reflection; using System.Text; using Hai.ExpressionsEditor.Scripts.Editor.Internal; +using UnityEngine; namespace Hai.ExpressionsEditor.Scripts.Editor.EditorUI { public class EeLocale { + internal static string CORE_Switch = "Switch language (English / 日本語)"; + internal static string CORE_Inaccuracy = "一部の翻訳は正確ではありません。ee.jp.jsonを編集することができます。"; + private static string EE_Documentation_URL => LocalizeOrElse("EE_Documentation_URL", EeLocaleDefaults.EE_Documentation_URL); // - internal static string EEA_Open_editor => LocalizeOrElse("EEA_Open_editor", EeLocaleDefaults.EEA_Open_editor); + internal static string EEA_No_animation_selected => LocalizeOrElse("EEA_No_animation_selected", EeLocaleDefaults.EEA_No_animation_selected); + internal static string EEA_Delete => LocalizeOrElse("EEA_Delete", EeLocaleDefaults.EEA_Delete); + internal static string EEA_Reset_blendshapes_are_not_shown_above => LocalizeOrElse("EEA_Reset_blendshapes_are_not_shown_above", EeLocaleDefaults.EEA_Reset_blendshapes_are_not_shown_above); + internal static string EEA_Show_delete_reset_blendshapes => LocalizeOrElse("EEA_Show_delete_reset_blendshapes", EeLocaleDefaults.EEA_Show_delete_reset_blendshapes); + internal static string EEA_Delete_zero_values => LocalizeOrElse("EEA_Delete_zero_values", EeLocaleDefaults.EEA_Delete_zero_values); + internal static string EEA_Preview_animation_in_scene => LocalizeOrElse("EEA_Preview_animation_in_scene", EeLocaleDefaults.EEA_Preview_animation_in_scene); + internal static string EEA_Scene_previews => LocalizeOrElse("EEA_Scene_previews", EeLocaleDefaults.EEA_Scene_previews); + internal static string EEA_Select_animator_to_edit_animation => LocalizeOrElse("EEA_Select_animator_to_edit_animation", EeLocaleDefaults.EEA_Select_animator_to_edit_animation); + internal static string EEA_Generate_previews => LocalizeOrElse("EEA_Generate_previews", EeLocaleDefaults.EEA_Generate_previews); + internal static string EEA_This_animation_has_additional_properties_not_shown_here => LocalizeOrElse("EEA_This_animation_has_additional_properties_not_shown_here", EeLocaleDefaults.EEA_This_animation_has_additional_properties_not_shown_here); + internal static string EEA_Transform_related => LocalizeOrElse("EEA_Transform_related", EeLocaleDefaults.EEA_Transform_related); + internal static string EEA_Finger_posing_other_muscles_or_animator_related => LocalizeOrElse("EEA_Finger_posing_other_muscles_or_animator_related", EeLocaleDefaults.EEA_Finger_posing_other_muscles_or_animator_related); + internal static string EEA_Material_swaps => LocalizeOrElse("EEA_Material_swaps", EeLocaleDefaults.EEA_Material_swaps); + internal static string EEA_Shader_properties => LocalizeOrElse("EEA_Shader_properties", EeLocaleDefaults.EEA_Shader_properties); + internal static string EEA_Game_object_toggles => LocalizeOrElse("EEA_Game_object_toggles", EeLocaleDefaults.EEA_Game_object_toggles); + internal static string EEA_Other_properties_not_cited_above => LocalizeOrElse("EEA_Other_properties_not_cited_above", EeLocaleDefaults.EEA_Other_properties_not_cited_above); + internal static string EEA_This_animation_lasts_keyframes => LocalizeOrElse("EEA_This_animation_lasts_keyframes", EeLocaleDefaults.EEA_This_animation_lasts_keyframes); + internal static string EEA_This_animation_is_empty => LocalizeOrElse("EEA_This_animation_is_empty", EeLocaleDefaults.EEA_This_animation_is_empty); + internal static string EEA_All_of_the_keyframes_are_frame_zero => LocalizeOrElse("EEA_All_of_the_keyframes_are_frame_zero", EeLocaleDefaults.EEA_All_of_the_keyframes_are_frame_zero); + internal static string EEA_BlendshapeVaryingOverTimeWarning => LocalizeOrElse("EEA_BlendshapeVaryingOverTimeWarning", EeLocaleDefaults.EEA_BlendshapeVaryingOverTimeWarning); + internal static string EEA_AutogeneratedAnimationWarning => LocalizeOrElse("EEA_AutogeneratedAnimationWarning", EeLocaleDefaults.EEA_AutogeneratedAnimationWarning); + internal static string EEA_VrcVisemeBlendshapeWarning => LocalizeOrElse("EEA_VrcVisemeBlendshapeWarning", EeLocaleDefaults.EEA_VrcVisemeBlendshapeWarning); + internal static string EEA_BlinkBlendshapeWarning => LocalizeOrElse("EEA_BlinkBlendshapeWarning", EeLocaleDefaults.EEA_BlinkBlendshapeWarning); + internal static string EEA_PreviewDummy => LocalizeOrElse("EEA_PreviewDummy", EeLocaleDefaults.EEA_PreviewDummy); + internal static string EEA_Automatically_setup_preview => LocalizeOrElse("EEA_Automatically_setup_preview", EeLocaleDefaults.EEA_Automatically_setup_preview); + internal static string EEA_Camera => LocalizeOrElse("EEA_Camera", EeLocaleDefaults.EEA_Camera); + internal static string EEA_Rename => LocalizeOrElse("EEA_Rename", EeLocaleDefaults.EEA_Rename); + internal static string EEP_Show_hotspots => LocalizeOrElse("EEP_Show_hotspots", EeLocaleDefaults.EEP_Show_hotspots); + internal static string EEP_Other_tools => LocalizeOrElse("EEP_Other_tools", EeLocaleDefaults.EEP_Other_tools); + internal static string EEP_Fix_tooth_and_other_hidden_blendshapes => LocalizeOrElse("EEP_Fix_tooth_and_other_hidden_blendshapes", EeLocaleDefaults.EEP_Fix_tooth_and_other_hidden_blendshapes); + internal static string EEP_Assign => LocalizeOrElse("EEP_Assign", EeLocaleDefaults.EEP_Assign); + internal static string EEP_Forget => LocalizeOrElse("EEP_Forget", EeLocaleDefaults.EEP_Forget); + internal static string EEP_Select => LocalizeOrElse("EEP_Select", EeLocaleDefaults.EEP_Select); + internal static string EEP_Generate_previews => LocalizeOrElse("EEP_Generate_previews", EeLocaleDefaults.EEP_Generate_previews); private static string LocalizeOrElse(string key, string defaultCultureLocalization) { diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocaleDefaults.cs b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocaleDefaults.cs index 84a81288..4c85ef8a 100644 --- a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocaleDefaults.cs +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/EeLocaleDefaults.cs @@ -7,6 +7,39 @@ public class EeLocaleDefaults { internal static string OfficialDocumentationUrlAsPrefix = "https://hai-vr.github.io/combo-gesture-expressions-av3/"; internal static string EE_Documentation_URL = OfficialDocumentationUrlAsPrefix; - internal static string EEA_Open_editor = "@Open editor"; + internal static string EEA_No_animation_selected = "No animation selected."; + internal static string EEA_Delete = "Delete"; + internal static string EEA_Reset_blendshapes_are_not_shown_above = "{0} reset blendshapes are not shown above."; + internal static string EEA_Show_delete_reset_blendshapes = "Show/Delete reset blendshapes"; + internal static string EEA_Delete_zero_values = "Delete 0-values"; + internal static string EEA_Preview_animation_in_scene = "Preview animation in Scene"; + internal static string EEA_Scene_previews = "Scene previews"; + internal static string EEA_Select_animator_to_edit_animation = "Select animator to edit Animation"; + internal static string EEA_Generate_previews = "Generate previews"; + internal static string EEA_This_animation_has_additional_properties_not_shown_here = "This animation has additional properties not shown here:"; + internal static string EEA_Transform_related = "transform-related"; + internal static string EEA_Finger_posing_other_muscles_or_animator_related = "finger posing, other muscles, or Animator-related"; + internal static string EEA_Material_swaps = "material swaps"; + internal static string EEA_Shader_properties = "shader properties"; + internal static string EEA_Game_object_toggles = "game object toggles"; + internal static string EEA_Other_properties_not_cited_above = "other properties not cited above"; + internal static string EEA_This_animation_lasts_keyframes = "This animation lasts {0} keyframes."; + internal static string EEA_This_animation_is_empty = "This animation is empty. This will cause the animation to last {0} keyframes."; + internal static string EEA_All_of_the_keyframes_are_frame_zero = "All of the keyframes are located on frame 0. This will cause the animation to last {0} keyframes."; + internal static string EEA_BlendshapeVaryingOverTimeWarning = "This animation contains blendshapes that are animated differently over time.\nThey cannot be edited in Expressions Editor. Preview may not be accurate."; + internal static string EEA_AutogeneratedAnimationWarning = "This animation is likely auto-generated and may be overwritten at any time. You should probably not edit it."; + internal static string EEA_VrcVisemeBlendshapeWarning = "This animation animates blendshapes that begin with vrc.v_, usually designed for Visemes.\nIf any animation contains those, the mouth may not animate properly."; + internal static string EEA_BlinkBlendshapeWarning = "This animation animates a blendshape called Blink, usually selected to make the avatar blink automatically.\nIf any animation contains it, the avatar may not blink properly.\nMany avatar bases have blendshapes to close each eye separately; they should be used instead."; + internal static string EEA_PreviewDummy = "Preview dummy"; + internal static string EEA_Automatically_setup_preview = "Automatically setup preview!"; + internal static string EEA_Camera = "Camera"; + internal static string EEP_Show_hotspots = "Show Hotspots (press SPACE key)"; + internal static string EEP_Other_tools = "Other tools"; + internal static string EEP_Fix_tooth_and_other_hidden_blendshapes = "Fix Tooth and other hidden blendshapes"; + internal static string EEP_Assign = "Assign"; + internal static string EEP_Forget = "Forget"; + internal static string EEP_Select = "Select"; + internal static string EEP_Generate_previews = "Generate previews"; + internal static string EEA_Rename = "Rename"; } } diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale.meta b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale.meta new file mode 100644 index 00000000..8fe85a2f --- /dev/null +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b0bc56e3a0264381bc91d93e141c446f +timeCreated: 1626742672 \ No newline at end of file diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json new file mode 100644 index 00000000..1ade6c52 --- /dev/null +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json @@ -0,0 +1,37 @@ +{ + "EE_Documentation_URL" : "https://hai-vr.github.io/combo-gesture-expressions-av3/", + "EEA_No_animation_selected" : "No animation selected.", + "EEA_Delete" : "Delete", + "EEA_Reset_blendshapes_are_not_shown_above" : "{0} reset blendshapes are not shown above.", + "EEA_Show_delete_reset_blendshapes" : "Show/Delete reset blendshapes", + "EEA_Delete_zero_values" : "Delete 0-values", + "EEA_Preview_animation_in_scene" : "Preview animation in Scene", + "EEA_Scene_previews" : "Scene previews", + "EEA_Select_animator_to_edit_animation" : "Select animator to edit Animation", + "EEA_Generate_previews" : "Generate previews", + "EEA_This_animation_has_additional_properties_not_shown_here" : "This animation has additional properties not shown here:", + "EEA_Transform_related" : "transform-related", + "EEA_Finger_posing_other_muscles_or_animator_related" : "finger posing, other muscles, or Animator-related", + "EEA_Material_swaps" : "material swaps", + "EEA_Shader_properties" : "shader properties", + "EEA_Game_object_toggles" : "game object toggles", + "EEA_Other_properties_not_cited_above" : "other properties not cited above", + "EEA_This_animation_lasts_keyframes" : "This animation lasts {0} keyframes.", + "EEA_This_animation_is_empty" : "This animation is empty. This will cause the animation to last {0} keyframes.", + "EEA_All_of_the_keyframes_are_frame_zero" : "All of the keyframes are located on frame 0. This will cause the animation to last {0} keyframes.", + "EEA_BlendshapeVaryingOverTimeWarning" : "This animation contains blendshapes that are animated differently over time.\nThey cannot be edited in Expressions Editor. Preview may not be accurate.", + "EEA_AutogeneratedAnimationWarning" : "This animation is likely auto-generated and may be overwritten at any time. You should probably not edit it.", + "EEA_VrcVisemeBlendshapeWarning" : "This animation animates blendshapes that begin with vrc.v_, usually designed for Visemes.\nIf any animation contains those, the mouth may not animate properly.", + "EEA_BlinkBlendshapeWarning" : "This animation animates a blendshape called Blink, usually selected to make the avatar blink automatically.\nIf any animation contains it, the avatar may not blink properly.\nMany avatar bases have blendshapes to close each eye separately; they should be used instead.", + "EEA_PreviewDummy" : "Preview dummy", + "EEA_Automatically_setup_preview" : "Automatically setup preview!", + "EEA_Camera" : "Camera", + "EEP_Show_hotspots" : "Show Hotspots (press SPACE key)", + "EEP_Other_tools" : "Other tools", + "EEP_Fix_tooth_and_other_hidden_blendshapes" : "Fix Tooth and other hidden blendshapes", + "EEP_Assign" : "Assign", + "EEP_Forget" : "Forget", + "EEP_Select" : "Select", + "EEP_Generate_previews" : "Generate previews", + "EEA_Rename" : "Rename" +} diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json.meta b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json.meta new file mode 100644 index 00000000..496c25da --- /dev/null +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.en.json.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2b3e086e57bb46ca8af52ba2ded7f1a0 +timeCreated: 1626744471 \ No newline at end of file diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json new file mode 100644 index 00000000..233f1707 --- /dev/null +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json @@ -0,0 +1,37 @@ +{ + "EE_Documentation_URL": "https://hai-vr.github.io/combo-gesture-expressions-av3/", + "EEA_No_animation_selected": "アニメーションを選択しません", + "EEA_Delete": "削除", + "EEA_Reset_blendshapes_are_not_shown_above": "{0} のリセット・ブレンド形状は上記のように表示されません", + "EEA_Show_delete_reset_blendshapes": "リセット・ブレンド・シェイプの表示/削除", + "EEA_Delete_zero_values": "0 - 値の削除", + "EEA_Preview_animation_in_scene": "シーンでのアニメーションのプレビュー", + "EEA_Scene_previews": "シーンプリビュー", + "EEA_Select_animator_to_edit_animation": "アニメーションを編集するアニメーターを選択してください", + "EEA_Generate_previews": "プレビューの生成", + "EEA_This_animation_has_additional_properties_not_shown_here": "このアニメーションには、以下に示すような追加のプロパティーが", + "EEA_Transform_related": "変換関連", + "EEA_Finger_posing_other_muscles_or_animator_related": "指は、他の筋肉、またはアニメーターに関連する", + "EEA_Material_swaps": "物質のスワップ", + "EEA_Shader_properties": "シェーダのプロパティ", + "EEA_Game_object_toggles": "ゲームオブジェクトのトグル", + "EEA_Other_properties_not_cited_above": "上記以外のプロパティー", + "EEA_This_animation_lasts_keyframes": "このアニメーションは {0} 個の鍵フレームを持続します。", + "EEA_This_animation_is_empty": "このアニメーションは空です。 これにより、アニメーションが最後の {0} 鍵フレームに送信されます。", + "EEA_All_of_the_keyframes_are_frame_zero": "すべてのキー・フレームはフレーム 0にあります。 これにより、アニメーションが最後の {0} 鍵フレームに送信されます。", + "EEA_BlendshapeVaryingOverTimeWarning": "このアニメーションには、時間とともにアニメーション化されたブレンド形状が含まれています。\n式は、式エディターでは編集できません。 プレビューが正確でない場合があります", + "EEA_AutogeneratedAnimationWarning": "このアニメーションは自動生成される可能性があり、いつでも上書きされる可能性があります。 これを編集しないようにしてください。", + "EEA_VrcVisemeBlendshapeWarning": "このアニメーションは、 vrc.v_で始まるブレンド形状をアニメーション化し、通常は Visemes用に設計されています。\nアニメーションが含まれている場合は、口が正しくアニメーション化されない場合があります。", + "EEA_BlinkBlendshapeWarning": "このアニメーションは Blinkと呼ばれるブレンドシェイプをアニメーション表示し、通常アバターを自動的に明滅させるために選択される。\nアニメーションが含まれている場合は、アバターが正しく明滅しない場合があります。\n多くのアバターの塩基には、それぞれの目を別々に閉じるブレンドシェイプがあり、代わりに使用する必要がある。", + "EEA_PreviewDummy": "ダミーのプレビュー", + "EEA_Automatically_setup_preview": "プレビューを自動的にセットアップ !", + "EEA_Camera": "カメラ", + "EEP_Show_hotspots": "ホット・スポットの表示 ( スペース・キーを押す )", + "EEP_Other_tools": "その他のツール", + "EEP_Fix_tooth_and_other_hidden_blendshapes": "固定歯とその他の非表示のブレンド形状", + "EEP_Assign": "割り当て", + "EEP_Forget": "フォーゲット", + "EEP_Select": "選択", + "EEP_Generate_previews": "プレビューの生成", + "EEA_Rename": "名前変更" +} diff --git a/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json.meta b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json.meta new file mode 100644 index 00000000..f8cf4a2c --- /dev/null +++ b/Assets/Hai/ExpressionsEditor/Scripts/Editor/EditorUI/Locale/ee.jp.json.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 94c07de5a2bc461c9f65f19183d904e7 +timeCreated: 1626744461 \ No newline at end of file