lib/assets/SnapshotHelper.swift in snapshot-1.0.5 vs lib/assets/SnapshotHelper.swift in snapshot-1.1.0

- old
+ new

@@ -29,11 +29,11 @@ { let path = "/tmp/language.txt" do { let locale = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String - deviceLanguage = locale - app.launchArguments = ["-AppleLanguages", "(\(locale))", "-AppleLocale", "\"\(locale)\"","-ui_testing"] + deviceLanguage = locale.substringToIndex(locale.startIndex.advancedBy(2, limit:locale.endIndex)) + app.launchArguments = ["-AppleLanguages", "(\(deviceLanguage))", "-AppleLocale", "\"\(locale)\"","-ui_testing"] } catch { print("Couldn't detect/set language...") } }