[PR #19131] Expose a library's Resource Loader, allow a user to "subset" it #31714

Open
opened 2026-01-31 09:49:05 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19131

State: closed
Merged: Yes


This pull request elevates ScopedResourceLoader to the API surface of LibraryResources, which will allow any library resource consumer to directly interact with its resource loader.

One of those new interactions is to make a sub-context with a specific narrowed-down qualifier. Like this:

auto englishOnlyLoader = GetLibraryResourceLoader().WithQualifier(L"language", L"en-us");
/* auto foo = */ englishOnlyLoader.GetLocalizedString(USES_RESOURCE(L"AppName"));
**Original Pull Request:** https://github.com/microsoft/terminal/pull/19131 **State:** closed **Merged:** Yes --- This pull request elevates ScopedResourceLoader to the API surface of LibraryResources, which will allow any library resource consumer to directly interact with its resource loader. One of those new interactions is to make a sub-context with a specific narrowed-down qualifier. Like this: ```c++ auto englishOnlyLoader = GetLibraryResourceLoader().WithQualifier(L"language", L"en-us"); /* auto foo = */ englishOnlyLoader.GetLocalizedString(USES_RESOURCE(L"AppName")); ```
claunia added the pull-request label 2026-01-31 09:49:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31714