Skip to content

Localization via satellite assemblies doesn't work for android when the app built in debug mode. #7622

Description

@mattleibow

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

Activity

  1. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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

  2. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    Issue moved from dotnet/maui#4470

    • Please respond to @AntonKosenkoDX.

    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.

  3. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    Issue moved from dotnet/maui#4470

    • Please respond to @AntonKosenkoDX.

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

    @jsuarezruiz Hello! Any update on this issue?

  4. ghost added
    needs-triageIssues that need to be assigned.
    on Dec 8, 2022
  5. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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.

  6. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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 ?

  7. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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.

  8. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    Issue moved from dotnet/maui#4470


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

    Any update on this issue ? Thanks

  9. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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.

  10. mattleibow commented on Dec 8, 2022

    @mattleibow
    MemberAuthor

    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.

  11. added this to the .NET 7 Servicing milestone on Dec 8, 2022
  12. tranb3r commented on Dec 8, 2022

    @tranb3r

    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 !!

  13. dellis1972 commented on Dec 8, 2022

    @dellis1972
    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.

  14. tranb3r commented on Jan 25, 2023

    @tranb3r

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

  15. jonathanpeppers commented on Jan 25, 2023

    @jonathanpeppers
    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

  16. ghost locked as resolved and limited conversation to collaborators on Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions