Closed jksk closed 7 years ago
I have the same problem. "Base" language doesn't seem to be used.
Thanks for reporting the issue, we will investigate and get back to you soon.
Sorry I am not able to reproduce the issue, the plugin uses +preferredLocalizationsFromArray:forPreferences so the best matched language fallback is determined by iOS API.
For localizationsArray
the SDK provides languages of translations available on OneSky platform plus languages found in local bundles.
For preferencesArray
the SDK provides an array with the SDK's own language property (writable and default to device language) as the first object, and the development language as the second object (CFBundleDevelopmentRegion
or en
if not available)
Would you please provide more information so that I can try to reproduce the problem?
CFBundleDevelopmentRegion
.proj
folder) of the "Base" languageMy setup was the following: I only had a Base.lproj
folder with a Localizable.strings
file, no other localizations (yet). When using NSLocalizedString
it would correctly use the string from Base.lproj/Localizable.strings
when running the app in English or German.
However when switching to OSLocalizedString
, the strings were not found.
I tested on Simulator, iOS 10.1.
CFBundleDevelopmentRegion
is de
.
@jksk @mbuchetics sorry for late reply. After further investigation I can reproduce the bug now, will keep you posted.
@jksk @mbuchetics before translations are downloaded from OneSky the plugin tries to look for locales (.lproj
) in the main bundle for available languages, the plugin skips Base
language folder because according to Apple's localization guide, 'Base.lproj' is designed for user interface files instead of language files.
The problem is that since the plugin cannot find the en.lproj
folder, it's not considered available to the plugin.
In 0.9.13, we will not skip Base
language if there are .strings
files.
I am closing this issue for now, if the problem occurs please reopen it.
I am facing same issue , for iOS 10.3. On ios 11 and above it works fine but for ios 10 for IBOutlets run script it falls back. Pleaserevert If you have any solution.Thanks
@jksk @mbuchetics before translations are downloaded from OneSky the plugin tries to look for locales (
.lproj
) in the main bundle for available languages, the plugin skipsBase
language folder because according to Apple's localization guide, 'Base.lproj' is designed for user interface files instead of language files.The problem is that since the plugin cannot find the
en.lproj
folder, it's not considered available to the plugin.In 0.9.13, we will not skip
Base
language if there are.strings
files.I am closing this issue for now, if the problem occurs please reopen it.
Hi @bretdabaker This issue still persists. Need a solution for the same. thanks
2016-07-19 16:32:14.091 App[36792:1229600] OneSkyOTAPlugin - Looking up strings for key: "SZw-oS-Qc6.title" in table: "Venues" in language: "en-US" 2016-07-19 16:32:14.091 App[36792:1229600] OneSkyOTAPlugin - Target language not available, falling back to best match language: "el" 2016-07-19 16:32:14.092 App[36792:1229600] OneSkyOTAPlugin - Looking up "el" from OneSky strings 2016-07-19 16:32:14.092 App[36792:1229600] OneSkyOTAPlugin - Looking up "el" from bundle strings 2016-07-19 16:32:14.092 App[36792:1229600] OneSkyOTAPlugin - Found: ("SZw-oS-Qc6.title" = "Venues")
Our app is developed in English (the Base language, there's no "en"). Venues is a storyboard. There are a few strings files in some other languages, Greek being one of them. We use plugin version 0.9.12.
(Edited to include some more info.)