Added new EN translation source

This commit is contained in:
katboi01
2024-12-10 12:58:11 +01:00
parent 38c7f9fef9
commit 7f71b16f63
5 changed files with 326 additions and 46 deletions
+1 -1
View File
@@ -95,6 +95,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/Build-Android/UmaViewer.apk
asset_path: ./build/Build-Android/UmaViewer_Android_Unstable.apk
asset_name: UmaViewer.apk
asset_content_type: application/vnd.android.package-archive
+304 -31
View File
@@ -1763,6 +1763,139 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 49220984}
m_CullTransparentMesh: 1
--- !u!1 &51775267
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 51775268}
- component: {fileID: 51775271}
- component: {fileID: 51775270}
- component: {fileID: 51775269}
m_Layer: 5
m_Name: Translation
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &51775268
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 51775267}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 145992584}
m_Father: {fileID: 275760636}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 141.5, y: -275}
m_SizeDelta: {x: 283, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &51775269
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 51775267}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.19607843}
m_HighlightedColor: {r: 0, g: 0, b: 0, a: 0.39215687}
m_PressedColor: {r: 0, g: 0, b: 0, a: 0.39215687}
m_SelectedColor: {r: 0, g: 0, b: 0, a: 0.39215687}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 51775270}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1564959565}
m_TargetAssemblyTypeName: UmaViewerMain, Assembly-CSharp
m_MethodName: OpenUrl
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: https://github.com/Hachimi-Hachimi/tl-en
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &51775270
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 51775267}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &51775271
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 51775267}
m_CullTransparentMesh: 1
--- !u!1001 &57130011
PrefabInstance:
m_ObjectHideFlags: 0
@@ -3524,7 +3657,7 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &115881387
Animator:
serializedVersion: 3
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@@ -3537,10 +3670,12 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &116348344
GameObject:
m_ObjectHideFlags: 0
@@ -4378,6 +4513,141 @@ Transform:
m_Father: {fileID: 1614209758}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &145992583
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 145992584}
- component: {fileID: 145992586}
- component: {fileID: 145992585}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &145992584
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 145992583}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 51775268}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &145992585
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 145992583}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "EN Translations \nby Hachimi"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 309c10a796fa90746889302436dac032, type: 2}
m_sharedMaterial: {fileID: 1876532955194943090, guid: 309c10a796fa90746889302436dac032,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: -100
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &145992586
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 145992583}
m_CullTransparentMesh: 1
--- !u!1 &147295685
GameObject:
m_ObjectHideFlags: 0
@@ -7779,13 +8049,14 @@ RectTransform:
- {fileID: 1202669972}
- {fileID: 2094428666}
- {fileID: 18660879}
- {fileID: 51775268}
m_Father: {fileID: 1948012698}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 141.5, y: -42.5}
m_SizeDelta: {x: 283, y: 250}
m_AnchoredPosition: {x: 141.5, y: -40}
m_SizeDelta: {x: 283, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &275760637
MonoBehaviour:
@@ -26356,9 +26627,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -152.01}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &800374507
@@ -28276,7 +28547,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 141.5, y: -315}
m_AnchoredPosition: {x: 141.5, y: -360}
m_SizeDelta: {x: 283, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &842158914
@@ -37618,7 +37889,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1882365343}
m_HandleRect: {fileID: 1882365342}
m_Direction: 2
m_Value: 1
m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
@@ -43684,7 +43955,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 141.5, y: -372.5}
m_AnchoredPosition: {x: 141.5, y: -415}
m_SizeDelta: {x: 283, y: 70}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1371850118
@@ -46911,7 +47182,7 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1468470379
Animator:
serializedVersion: 3
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@@ -46924,10 +47195,12 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &1476177399
GameObject:
m_ObjectHideFlags: 0
@@ -60245,7 +60518,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 141.5, y: -1122.1799}
m_AnchoredPosition: {x: 141.5, y: -610}
m_SizeDelta: {x: 283, y: 410}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1948012699
@@ -67624,9 +67897,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -304.02}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219665895574065
@@ -68133,9 +68406,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -50.67}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219666109573094
@@ -70494,9 +70767,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -202.68}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219666841734894
@@ -71326,9 +71599,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -101.34}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219667203546886
@@ -73041,9 +73314,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: 0}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &6878219667749320559
@@ -73262,9 +73535,9 @@ RectTransform:
m_Father: {fileID: 6878219667498913896}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 116.5, y: -253.34999}
m_SizeDelta: {x: 180, y: 20}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &6878219667784581358
+18 -11
View File
@@ -49,22 +49,27 @@ public class UmaViewerMain : MonoBehaviour
var UmaCharaData = UmaDatabaseController.Instance.CharaData;
var MobCharaData = UmaDatabaseController.Instance.MobCharaData;
var loadingUI = UmaSceneController.instance;
Dictionary<int, string> enNames = new Dictionary<int, string>();
Dictionary<int, string> enUmaNames = new Dictionary<int, string>();
Dictionary<int, string> mobNames = new Dictionary<int, string>();
//Main chara names (En only)
loadingUI.LoadingProgressChange(loadingStep++, loadingStepsTotal, "Downloading Translations");
if (Config.Instance.Language == Language.En)
{
loadingUI.LoadingProgressChange(loadingStep++, loadingStepsTotal, "Downloading Character Data");
yield return UmaViewerDownload.DownloadText("https://www.tracenacademy.com/api/BasicCharaDataInfo", txt =>
var translationsUrl = "https://raw.githubusercontent.com/Hachimi-Hachimi/tl-en/refs/heads/main/localized_data/text_data_dict.json";
yield return UmaViewerDownload.DownloadText(translationsUrl, txt =>
{
if (string.IsNullOrEmpty(txt)) return;
foreach (var item in JArray.Parse(txt))
try
{
if (!enNames.ContainsKey((int)item["charaId"]))
{
enNames.Add((int)item["charaId"], item["charaNameEnglish"].ToString());
}
var translations = JObject.Parse(txt);
enUmaNames = translations["6"].ToObject<Dictionary<int, string>>();
mobNames = translations["59"].ToObject<Dictionary<int, string>>();
}
catch
{
UI.ShowMessage("Loading Translations failed", UIMessageType.Error);
}
});
}
@@ -76,9 +81,11 @@ public class UmaViewerMain : MonoBehaviour
if (string.IsNullOrEmpty(txt)) return;
foreach (var item in JArray.Parse(txt))
{
if (!mobNames.ContainsKey((int)item["mobId"]))
//names missing from translation are added
int mobId = (int)item["mobId"];
if (!mobNames.ContainsKey(mobId))
{
mobNames.Add((int)item["mobId"], Config.Instance.Language == Language.Jp ? item["mobName"].ToString() : item["mobNameEnglish"].ToString());
mobNames.Add(mobId, item["mobName"].ToString());
}
}
});
@@ -103,7 +110,7 @@ public class UmaViewerMain : MonoBehaviour
Characters.Add(new CharaEntry()
{
Name = item["charaname"].ToString(),
EnName = enNames.ContainsKey(id) ? enNames[id] : "",
EnName = enUmaNames.ContainsKey(id) ? enUmaNames[id] : "",
Icon = UmaViewerBuilder.Instance.LoadCharaIcon(id.ToString()),
Id = id,
ThemeColor = "#" + item["ui_nameplate_color_1"].ToString()
+1 -1
View File
@@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 2.1.18
bundleVersion: 2.1.19
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
+2 -2
View File
@@ -1,2 +1,2 @@
m_EditorVersion: 2020.3.24f1
m_EditorVersionWithRevision: 2020.3.24f1 (79c78de19888)
m_EditorVersion: 2020.3.48f1
m_EditorVersionWithRevision: 2020.3.48f1 (b805b124c6b7)