-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localization completely broken in IOS apps #17262
Comments
From @jfversluis on Mon, 16 Jan 2023 13:02:44 GMT Is this maybe related or the same as #16847? |
From @rolfbjarne on Mon, 16 Jan 2023 13:52:28 GMT
No, this is something different, and I can reproduce it. Add this to the project file to work around it: <PropertyGroup>
<EnableAssemblyILStripping>false</EnableAssemblyILStripping>
</PropertyGroup> |
Something like this might fix it: https://gist.github.com/rolfbjarne/f0d54b7db1f4c402b5605780c2be7452 (needs tests too). |
@rolfbjarne Is this one related too dotnet/maui#13456 ? |
The workaround does fix the issue with the translations.
|
That's indeed a very strange break, because the work around turns off an optimization only done in release builds (this means that the workaround is effectively in place for debug builds, which I assume are working fine?). I'm inclined to believe something else is going on. |
You are right. It's something else. |
It is unbelievable that this isn't the highest-priority item on Microsoft's agenda right now. They are basically saying that localised apps cannot be built using the latest and greatest .net 6/7 for iOS. Localised apps includes all major international apps. |
Fixed in .net8, not backported to the "legacy" .net7 because of fear of breaking changes. |
…17262. * Don't strip resource assemblies, there's no code in them to strip anyways. * Use the relative path inside the app bundle when computing the intermediate location for stripped assemblies, so that if we were to find two identically named assemblies in different directories, they're handled correctly (by putting them in different intermediate locations, instead of overwriting eachother). Fixes dotnet#17262.
…#18749) * Don't strip resource assemblies, there's no code in them to strip anyways. * Use the relative path inside the app bundle when computing the intermediate location for stripped assemblies, so that if we were to find two identically named assemblies in different directories, they're handled correctly (by putting them in different intermediate locations, instead of overwriting eachother). Fixes #17262.
…17262. * Don't strip resource assemblies, there's no code in them to strip anyways. * Use the relative path inside the app bundle when computing the intermediate location for stripped assemblies, so that if we were to find two identically named assemblies in different directories, they're handled correctly (by putting them in different intermediate locations, instead of overwriting eachother). Fixes dotnet#17262.
…ies. Fixes #17262. (#18752) * Don't strip resource assemblies, there's no code in them to strip anyways. * Use the relative path inside the app bundle when computing the intermediate location for stripped assemblies, so that if we were to find two identically named assemblies in different directories, they're handled correctly (by putting them in different intermediate locations, instead of overwriting eachother). Fixes #17262. Backport of #18749
|
@marwalsch yes, that's a separate issue. Please file it in the dotnet/runtime repository. |
From @nevse on Mon, 16 Jan 2023 08:09:54 GMT
Description
It's impossible to add more than one additional language to an ios app.
Localization resx files are ignored for 2 and more additional languages when an ios app was built in release and run on device.
I created a simple app, source code available here. It contains three resx files (Resources/MyLocalization.resx, Resources/MyLocalization.de.resx, Resource/MyLocailzation.es.resx) which I use to obtain the localized string "MyString" in the following way:
It works fine when I build my app in release for an iphone simulator, but it doesn't work when I build it in release for a real device. It works only for one additional resx file.
Steps to Reproduce
dotnet new maui
Press each button - you should see different strings (string from eng, string from de, string from es).
Press "Set Eng Culture" to see "string from eng".
Press "Set De Culture" you should see the "string from de", but this string is "string from eng". It's wrong behaviour.
Press "Set Es Culture" to see "string from es".
Link to public reproduction project repository
https://github.com/nevse/maui-tests-iosreleaselocalization
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
ios 16
Did you find any workaround?
No response
Relevant log output
No response
Copied from original issue dotnet/maui#12684
The text was updated successfully, but these errors were encountered: