Fix localization issues and export strings for translation

This commit is contained in:
2023-07-09 15:12:35 -04:00
parent 83ef50586a
commit fcd7d2beab
10 changed files with 202 additions and 101 deletions

View File

@@ -105,6 +105,18 @@ final class NostrScriptTests: XCTestCase {
self.wait(for: [resume_expected], timeout: 10.0)
}
func test_imports_string() throws {
let enUsLocale = Locale(identifier: "en-US")
XCTAssertEqual(imports_string(0, locale: enUsLocale), "Imports")
XCTAssertEqual(imports_string(1, locale: enUsLocale), "Import")
XCTAssertEqual(imports_string(2, locale: enUsLocale), "Imports")
Bundle.main.localizations.map { Locale(identifier: $0) }.forEach {
for count in 1...10 {
XCTAssertNoThrow(imports_string(count, locale: $0))
}
}
}
func testPerformanceExample() throws {
// This is an example of a performance test case.
self.measure {