feat(i18n): localize OpenAI-Compatible template taglines and help text - #609
Open
waterWang wants to merge 1 commit into
Open
feat(i18n): localize OpenAI-Compatible template taglines and help text#609waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
Extract hardcoded English tagline and helpText strings from OpenAiCompatibleTemplate into the i18n resource bundle. - Add provider.template.*.tagline / *.help keys to messages.properties - Add taglineKey / helpKey lookup helpers on OpenAiCompatibleTemplate - Render template.tagline via stringResource() in ProviderSelectionDialog Closes askimo-ai#607
|
|
Collaborator
|
Thank you @waterWang ! The PR looks good to me. Can you sign the CLA so I can merge? |
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.
Summary
Extracts hardcoded English strings from
OpenAiCompatibleTemplateinto the i18n resource bundle so they can be translated.Changes
messages.properties— Added 10 new i18n keys (provider.template.*.tagline/*.help) for all 5 predefined OpenAI-compatible provider templates (Cloudflare AI, Groq, NVIDIA NIM, OpenRouter, Together AI).OpenAiCompatibleTemplate.kt— Addedi18nKey,taglineKey, andhelpKeycomputed properties that return the correct resource key based on the enum name. This lets callers look up the localized string without hardcoding key names.ProviderSelectionDialog.kt— Switchedentry.template.tagline→stringResource(entry.template.taglineKey)so the tagline is rendered in the user's current locale.Scope
Per the issue, this covers all 5 templates. The
displayNamefield is intentionally left as-is — it's a short proper noun (e.g. "Cloudflare AI") that doesn't benefit from translation.Testing
pnpm typecheck— passesstringResource()which triggers recomposition on locale changeCloses #607