unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.97k stars 730 forks source link

Add resw support for language qualifiers #18807

Open jeromelaban opened 2 hours ago

jeromelaban commented 2 hours ago

Uno default project use different folder to place different language resw file. PixPin_2024-11-15_17-38-17

But latest visualstudio updated its resource explorer . it is better to use filename rather folder. PixPin_2024-11-15_17-42-12

For new resource explorer, different resw file in different folders is reagrded as different resource PixPin_2024-11-15_17-38-05 PixPin_2024-11-15_17-57-47

But if they are in same folder, it will be same resource.

PixPin_2024-11-15_17-56-25

Originally posted by @DJDQfff in https://github.com/unoplatform/uno/discussions/18801

jeromelaban commented 2 hours ago

Note to contributors

The implementation should be located here:

https://github.com/unoplatform/uno/blob/ce498ef9e916936f8df4d24476085641899ab151/src/SourceGenerators/Uno.UI.Tasks/ResourcesGenerator/ResourcesGenerationTask.cs#L75

and

https://github.com/unoplatform/uno/blob/ce498ef9e916936f8df4d24476085641899ab151/src/Uno.UWP/ApplicationModel/Resources/Core/ResourceCandidate.cs#L32-L44