Skip to content
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 via satellite assemblies doesn't work for android when the app built in debug mode. #7622

Closed
mattleibow opened this issue Dec 8, 2022 · 13 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@mattleibow
Copy link
Member


Issue moved from dotnet/maui#4470


From @nevse on Wednesday, February 2, 2022 12:39:22 PM

Description

If I run app in debug mode dotnet build -t:Run -f:net6.0-android it doesn't show translated message. For dotnet build -t:Run -f:net6.0-android -c:Release it does.
Project to reproduce - https://github.com/nevse/Maui-Tests-Localization1
debugVsRelease

Steps to Reproduce

  1. create app dotnet new maui -n HumanaizerTests
  2. add references
<ItemGroup>
        <PackageReference Include="Humanizer.Core" Version="2.14.1" />
        <PackageReference Include="Humanizer.Core.de" Version="2.14.1" /> 
</ItemGroup>
  1. change culture to de and use Humanizer to read data localization resources
CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("de");

CounterLabel.Text = DateTime.UtcNow.AddHours(-2).Humanize();
  1. run the app in debug dotnet build -t:Run -f net6.0-android and release mode dotnet build -t:Run -f:net6.0-android -c:Release

Version with bug

Preview 12 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @shimingsg on Thursday, February 17, 2022 10:10:53 AM

Verified Repro with Android 11, Repro project
4470.zip

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @AntonKosenkoDX on Thursday, May 19, 2022 5:12:25 AM

Hello, we are developing DevExpress .NET MAUI controls and experienced the same issue. This issue has a Normal priority for us but we don't have a workaround. Thank you for your help.

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @AntonKosenkoDX on Monday, June 27, 2022 6:56:54 AM

@jsuarezruiz Hello! Any update on this issue?

@ghost ghost added the needs-triage Issues that need to be assigned. label Dec 8, 2022
@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470

  • Please respond to @msftbot[bot].

From @msftbot[bot] on Tuesday, August 30, 2022 3:11:56 PM

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @tranb3r on Wednesday, November 9, 2022 7:55:39 AM

Hello,
Any update ?
In #2012, @jonathanpeppers said it should "just work" in .net6.
However, it still does not look like it works on maui, neither with .net6 nor .net7, right ?

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @jonathanpeppers on Thursday, November 10, 2022 4:29:22 PM

#2012 is very old, I wouldn't focus on that.

This is the first I've seen this issue for .NET 6+, I'll try the sample above.

My guess is the Humanizer library is doing something to cause this issue, but I will check.

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @tranb3r on Thursday, November 24, 2022 7:05:59 PM

Any update on this issue ? Thanks

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @jonathanpeppers on Monday, November 28, 2022 4:46:38 PM

I think @dellis1972 is going to look into this one.

@mattleibow
Copy link
Member Author


Issue moved from dotnet/maui#4470


From @dellis1972 on Monday, November 28, 2022 6:18:04 PM

I've been investigating, the localised assemblies (*.resources.dll) are NOT beiing fast deployed to the device.
I still need to narrow down the "why" part of this. I'll post updates as I find out more.

@tranb3r
Copy link

tranb3r commented Dec 8, 2022

It's not really fun watching you guys close old tickets and open new ones for the same issue.
The same question remains, are you going to fix it ?
The original issue is more than 4 year old !!

@dellis1972
Copy link
Contributor

@tranb3r

The issue was transfered, not closed. The maui team are not equipt to investigate/fix android specific issues, and this one was identified as android specific, so it has been transfered to the correct rep.

As I said in the previous issue

I've been investigating, the localised assemblies (*.resources.dll) are NOT beiing fast deployed to the device.
I still need to narrow down the "why" part of this. I'll post updates as I find out more.

My investigation has so far discovered that localisation does work for the standard resx senarios (we have tests for that). In this case Humanizer does something different. It publishes its localized assemblies in seperate NuGet packages, so the assemblies do not end up in the correct ItemGroup (@(ResolvedSatellitePaths)). This kinda messes up our fast deployment system which detects localized resources. As a result these files are not picked up, I am looking a ways we can support humanizer in our software at this moment.

@jpobst jpobst added the Area: App+Library Build Issues when building Library projects or Application projects. label Dec 13, 2022
@tranb3r
Copy link

tranb3r commented Jan 25, 2023

@jonpryor
Could you please add a link to the PR or explain in which version this fix will be fixed?

@jonathanpeppers
Copy link
Member

It is in a private repo, so you won't be able to see it:

image

Currently testing if we can backport at: #7741

@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

5 participants