From a0e1372a4fbc9488347c02170b6be2caaef6f3bf Mon Sep 17 00:00:00 2001 From: ataka Date: Sat, 5 Nov 2016 22:50:16 +0900 Subject: [PATCH] Add a test for double quote in strings --- DemoApp/Base.lproj/Main.storyboard | 28 ++++++++++++++++++--------- DemoApp/en.lproj/LaunchScreen.strings | 6 +----- DemoApp/en.lproj/Localizable.strings | 1 + DemoApp/en.lproj/Main.strings | 9 +++------ DemoApp/ja.lproj/LaunchScreen.strings | 2 +- DemoApp/ja.lproj/Localizable.strings | 1 + DemoApp/ja.lproj/Main.strings | 5 +++-- UnitTests/StringsFileTests.swift | 1 + 8 files changed, 30 insertions(+), 23 deletions(-) diff --git a/DemoApp/Base.lproj/Main.storyboard b/DemoApp/Base.lproj/Main.storyboard index f1c424e..9268143 100644 --- a/DemoApp/Base.lproj/Main.storyboard +++ b/DemoApp/Base.lproj/Main.storyboard @@ -1,7 +1,9 @@ - + - + + + @@ -13,24 +15,31 @@ - + - - + @@ -41,6 +50,7 @@ + diff --git a/DemoApp/en.lproj/LaunchScreen.strings b/DemoApp/en.lproj/LaunchScreen.strings index 1354880..78c702b 100644 --- a/DemoApp/en.lproj/LaunchScreen.strings +++ b/DemoApp/en.lproj/LaunchScreen.strings @@ -1,6 +1,2 @@ - -/* Class = "UILabel"; text = " Copyright (c) 2015 Yosuke Ishikawa. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 Yosuke Ishikawa. All rights reserved."; - -/* Class = "UILabel"; text = "DemoApp"; ObjectID = "kId-c2-rCX"; */ "kId-c2-rCX.text" = "DemoApp"; +"8ie-xW-0ye.text" = " Copyright (c) 2015 Yosuke Ishikawa. All rights reserved."; diff --git a/DemoApp/en.lproj/Localizable.strings b/DemoApp/en.lproj/Localizable.strings index 2064d20..6647c2a 100644 --- a/DemoApp/en.lproj/Localizable.strings +++ b/DemoApp/en.lproj/Localizable.strings @@ -1,2 +1,3 @@ "hello" = "Hello"; "getstarted" = "Get started"; +"quoted" = "This is a \"quoted\" text."; diff --git a/DemoApp/en.lproj/Main.strings b/DemoApp/en.lproj/Main.strings index 3770761..fbf0374 100644 --- a/DemoApp/en.lproj/Main.strings +++ b/DemoApp/en.lproj/Main.strings @@ -1,6 +1,3 @@ - -/* Class = "UIButton"; normalTitle = "getstarted"; ObjectID = "uZj-A7-ihc"; */ -"uZj-A7-ihc.normalTitle" = "getstarted"; - -/* Class = "UILabel"; text = "hello"; ObjectID = "xUH-o8-DGc"; */ -"xUH-o8-DGc.text" = "hello"; +"xUH-o8-DGc.text" = "Hello"; +"zjA-Rl-7jE.text" = "This is a \"quoted\" text."; +"uZj-A7-ihc.normalTitle" = "Get started"; diff --git a/DemoApp/ja.lproj/LaunchScreen.strings b/DemoApp/ja.lproj/LaunchScreen.strings index 8e5a7e9..78c702b 100644 --- a/DemoApp/ja.lproj/LaunchScreen.strings +++ b/DemoApp/ja.lproj/LaunchScreen.strings @@ -1,2 +1,2 @@ -"8ie-xW-0ye.text" = " Copyright (c) 2015 Yosuke Ishikawa. All rights reserved."; "kId-c2-rCX.text" = "DemoApp"; +"8ie-xW-0ye.text" = " Copyright (c) 2015 Yosuke Ishikawa. All rights reserved."; diff --git a/DemoApp/ja.lproj/Localizable.strings b/DemoApp/ja.lproj/Localizable.strings index 8166e7b..81fbe9c 100644 --- a/DemoApp/ja.lproj/Localizable.strings +++ b/DemoApp/ja.lproj/Localizable.strings @@ -1,2 +1,3 @@ "hello" = "こんにちは"; "getstarted" = "はじめよう"; +"quoted" = "これは\"引用\"です。"; diff --git a/DemoApp/ja.lproj/Main.strings b/DemoApp/ja.lproj/Main.strings index 392a35b..6d6a7b4 100644 --- a/DemoApp/ja.lproj/Main.strings +++ b/DemoApp/ja.lproj/Main.strings @@ -1,2 +1,3 @@ -"uZj-A7-ihc.normalTitle" = "getstarted"; -"xUH-o8-DGc.text" = "hello"; +"xUH-o8-DGc.text" = "こんにちは"; +"zjA-Rl-7jE.text" = "これは\"引用\"です。"; +"uZj-A7-ihc.normalTitle" = "はじめよう"; diff --git a/UnitTests/StringsFileTests.swift b/UnitTests/StringsFileTests.swift index baba07a..63f2954 100644 --- a/UnitTests/StringsFileTests.swift +++ b/UnitTests/StringsFileTests.swift @@ -23,5 +23,6 @@ class StringsFileTests: XCTestCase { XCTAssertEqual(xibStringsFile.dictionary["xUH-o8-DGc.text"]!, "Hello") XCTAssertEqual(xibStringsFile.dictionary["uZj-A7-ihc.normalTitle"]!, "Get started") + XCTAssertEqual(xibStringsFile.dictionary["zjA-Rl-7jE.text"]!, "This is a \"quoted\" text.") } }