Add injectable localization hook for InterfaceKit strings#470
Merged
Conversation
3c89d5e to
98055ab
Compare
piercifani
reviewed
May 13, 2026
piercifani
reviewed
May 13, 2026
| /// Android/Skip apps, in particular, should inject this closure from the host | ||
| /// app so strings are resolved through the app localization system, resources, | ||
| /// or any runtime translation provider. | ||
| public static nonisolated(unsafe) var localized: (String) -> String = { |
Contributor
There was a problem hiding this comment.
What a great comment, I can tell the LLM loves you
Contributor
Author
There was a problem hiding this comment.
AI is amazing when you give it the right words 😄
piercifani
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small localization hook so BSWInterfaceKit strings can be resolved by the host app instead of always using Bundle.main.
On Apple platforms, Bundle.main works for app-owned localized resources. On other runtimes, especially Android/Skip, those strings need to be resolved through the host app localization system.
This keeps the existing Bundle.main behavior as the default while allowing apps to inject a custom resolver, for example to bridge InterfaceKit strings to Android resources or a runtime translation provider.
Example integration in a host app: