From ba5996d6a1591a8cf7eccce867452c1630feaf7e Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 27 Aug 2015 19:12:54 +0100 Subject: [PATCH] Added test for localized Say text with character names containing . --- .../Localisation/CSV/localization_dottest.csv | 3 + .../CSV/localization_dottest.csv.meta | 8 + .../Localisation/LocalisationTests.unity | 294 +++++++++++++++++- 3 files changed, 300 insertions(+), 5 deletions(-) create mode 100644 Assets/Tests/Localisation/CSV/localization_dottest.csv create mode 100644 Assets/Tests/Localisation/CSV/localization_dottest.csv.meta diff --git a/Assets/Tests/Localisation/CSV/localization_dottest.csv b/Assets/Tests/Localisation/CSV/localization_dottest.csv new file mode 100644 index 00000000..a1468588 --- /dev/null +++ b/Assets/Tests/Localisation/CSV/localization_dottest.csv @@ -0,0 +1,3 @@ +Key,Description,Standard,FR +SAY.Flowchart.1.Dr. Character,,English,French +CHARACTER.Dr. Character,Character with a . in the name,Dr. Character diff --git a/Assets/Tests/Localisation/CSV/localization_dottest.csv.meta b/Assets/Tests/Localisation/CSV/localization_dottest.csv.meta new file mode 100644 index 00000000..42894f5d --- /dev/null +++ b/Assets/Tests/Localisation/CSV/localization_dottest.csv.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 78fdd98dfc41844f78e4f9bf7d24b99f +timeCreated: 1440696526 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/Localisation/LocalisationTests.unity b/Assets/Tests/Localisation/LocalisationTests.unity index f8ca7aa7..5321d7dd 100644 --- a/Assets/Tests/Localisation/LocalisationTests.unity +++ b/Assets/Tests/Localisation/LocalisationTests.unity @@ -168,6 +168,53 @@ MonoBehaviour: compareType: 0 comparisonType: 4 ignoreCase: 0 +--- !u!1 &104143437 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: b20518d45890e4be59ba82946f88026c, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 104143438} + - 114: {fileID: 104143439} + m_Layer: 0 + m_Name: Dr. Character + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &104143438 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: b20518d45890e4be59ba82946f88026c, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 104143437} + 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: 2137889470} + m_RootOrder: 1 +--- !u!114 &104143439 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: b20518d45890e4be59ba82946f88026c, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 104143437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 25fb867d2049d41f597aefdd6b19f598, type: 3} + m_Name: + m_EditorClassIdentifier: + nameText: Dr. Character + nameColor: {r: 1, g: 1, b: 1, a: 1} + soundEffect: {fileID: 0} + profileSprite: {fileID: 0} + portraits: [] + portraitsFace: 0 + description: Character with a . in the name --- !u!114 &127997295 MonoBehaviour: m_ObjectHideFlags: 0 @@ -317,7 +364,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &292727466 Transform: m_ObjectHideFlags: 0 @@ -424,7 +471,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Name: m_EditorClassIdentifier: - selectedFlowchart: {fileID: 679750556} + selectedFlowchart: {fileID: 810272373} --- !u!4 &365459146 Transform: m_ObjectHideFlags: 1 @@ -490,6 +537,48 @@ MonoBehaviour: platformsToIgnore: [] dynamic: 0 dynamicTypeName: +--- !u!1 &493422606 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 149266, guid: ffbd0831d997545eab75c364da082c1b, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 493422607} + - 114: {fileID: 493422608} + m_Layer: 0 + m_Name: Localization + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &493422607 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 480768, guid: ffbd0831d997545eab75c364da082c1b, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 493422606} + 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: 2137889470} + m_RootOrder: 2 +--- !u!114 &493422608 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11438504, guid: ffbd0831d997545eab75c364da082c1b, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 493422606} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5724422a635e425bae0af9ffe2615d6, type: 3} + m_Name: + m_EditorClassIdentifier: + activeLanguage: + localizationFile: {fileID: 4900000, guid: 78fdd98dfc41844f78e4f9bf7d24b99f, type: 3} --- !u!1 &550868902 GameObject: m_ObjectHideFlags: 0 @@ -915,14 +1004,13 @@ MonoBehaviour: indentLevel: 0 storyText: Say text description: - character: {fileID: 1141038909} + character: {fileID: 0} portrait: {fileID: 0} voiceOverClip: {fileID: 0} showAlways: 1 showCount: 1 extendPrevious: 0 - fadeIn: 0 - fadeOut: 0 + fadeWhenDone: 1 waitForClick: 1 setSayDialog: {fileID: 0} --- !u!114 &679750558 @@ -1092,6 +1180,150 @@ MonoBehaviour: errorMessage: indentLevel: 0 languageCode: FR +--- !u!1 &810272371 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 810272372} + - 114: {fileID: 810272373} + - 114: {fileID: 810272374} + - 114: {fileID: 810272375} + - 114: {fileID: 810272376} + - 114: {fileID: 810272377} + m_Layer: 0 + m_Name: Flowchart + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &810272372 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + 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: 2137889470} + m_RootOrder: 0 +--- !u!114 &810272373 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1.0 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: -343 + y: -340 + width: 1114 + height: 859 + selectedBlock: {fileID: 810272374} + selectedCommands: + - {fileID: 810272376} + variables: [] + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: +--- !u!114 &810272374 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 67 + y: 69 + width: 120 + height: 40 + itemId: 0 + blockName: Start + description: + eventHandler: {fileID: 810272375} + commandList: + - {fileID: 810272377} + - {fileID: 810272376} +--- !u!114 &810272375 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 810272374} +--- !u!114 &810272376 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + errorMessage: + indentLevel: 0 + storyText: English + description: + character: {fileID: 104143439} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + setSayDialog: {fileID: 0} +--- !u!114 &810272377 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 810272371} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3fc625e237d6048bf86f34835d8266d9, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 2 + errorMessage: + indentLevel: 0 + languageCode: FR --- !u!1 &881473892 GameObject: m_ObjectHideFlags: 0 @@ -1632,3 +1864,55 @@ MonoBehaviour: checkMethods: 1 m_ActionBase: {fileID: 37282964} checksPerformed: 0 +--- !u!1 &2137889468 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2137889470} + - 114: {fileID: 2137889469} + m_Layer: 0 + m_Name: NameParsingTest + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2137889469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137889468} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3} + m_Name: + m_EditorClassIdentifier: + timeout: 5 + ignored: 0 + succeedAfterAllAssertionsAreExecuted: 0 + expectException: 0 + expectedExceptionList: + succeedWhenExceptionIsThrown: 0 + includedPlatforms: -1 + platformsToIgnore: [] + dynamic: 0 + dynamicTypeName: +--- !u!4 &2137889470 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137889468} + 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: 810272372} + - {fileID: 104143438} + - {fileID: 493422607} + m_Father: {fileID: 0} + m_RootOrder: 6