Closed ahknight closed 8 years ago
This is also what is breaking the Korean and Chinese users, by the way.
I'm having the same problem.
Using zh-Hans
(chinese simplified) or zh-Hant
(chinese traditional) results in the same language zh
being used with the current version of the SnapshotHelper.swift. I ended up adding a check for those two languages, and using the whole language-string as the deviceLanguage
:
(at SnapshotHelper.swift around line 42)
deviceLanguage = locale.substringToIndex(locale.startIndex.advancedBy(2, limit:locale.endIndex))
if locale == "zh-Hans" || locale == "zh-Hant" {
deviceLanguage = locale
}
That, of course, is not an optimal solution. I'd also suggest to change the language-code-format as proposed by @ahknight, for a better handling of locale and language.
@ahknight @b-ray I just merged https://github.com/fastlane/snapshot/pull/437 (from @bartoszj, thanks!!) which improves language handling, could you try again?
Thanks @ahknight and @bartoszj, my issue is resolved, it works perfectly now :-)
Huzzah! 🚀🎉
This issue was migrated to https://github.com/fastlane/fastlane/issues/2497. Please post all further comments there.
fastlane
is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket:
The language code parser in the helper is presuming "XX_XX" for the codes, but this is incorrect. For instance, to use French Canadian in Canada I would say "fr-CA_CA". This breaks the tool rather horribly.
I wound up hacking the helper as follows. It could use more love (and error checking) but you get the idea: