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

Adjust ResourceLoader(String) to match documents #4329

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

YexuanXiao
Copy link

@YexuanXiao YexuanXiao commented Apr 11, 2024

In documents ResourceLoader and WindowsAppSDK Localize strings in your UI and the app package manifest, str in Microsoft.Windows.ApplicationModel.Resources.ResourceLoader.ResourceLoader(String str) represents resourceMap, usually the file name of resw. In the current implementation, str represents the file name of pri the str of the old obsolete API Windows.ApplicationModel.Resources.ResourceLoader(String str) represents the resourceMap.

So making the two more consistent seems to be a better solution, rather than using Microsoft.Windows.ApplicationModel.Resources.ResourceLoader.GetDefaultResourceFilePath().

documents:

ResourceLoader("ErrorMessages") // implicit "resources.pri" or "modulename.pri"

implement:

ResourceLoader(ResourceLoader.GetDefaultResourceFilePath(), "ErrorMessages")

this pr:
same as documents

breaking change

before:

ResourceLoader("filename.pri") // implicit "Resources" subtree

after:

ResourceLoader("filename.pri", "Resources")

Original issue: #4312 #2406

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants