-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Locale keys only with one string file.
- Loading branch information
1 parent
9e2db95
commit 36f30b6
Showing
8 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"hello.world.for.all" = "Hello world for all"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// StringSingleTest.swift | ||
// LocalizeTests | ||
// | ||
// Created by Andres Silva Gomez on 5/15/18. | ||
// Copyright © 2018 Kekiiwaa. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
import Localize | ||
|
||
class StringSingleTest: XCTestCase { | ||
override func setUp() { | ||
super.setUp() | ||
Localize.update(provider: .strings) | ||
Localize.update(bundle: Bundle(for: type(of: self))) | ||
Localize.update(fileName: "OnlyOneLang") | ||
} | ||
|
||
func testLocalizeInSingleStringFile() { | ||
let localized = "hello.world.for.all".localized | ||
XCTAssertTrue(localized == "Hello world for all") | ||
} | ||
|
||
func testLocalizeInSingleStringFileNil() { | ||
let localized = "hello.world.for.allll".localized | ||
XCTAssertTrue(localized == "hello.world.for.allll") | ||
} | ||
} |