Skip to content

feat(i18n): localize OpenAI-Compatible template taglines and help text - #609

Open
waterWang wants to merge 1 commit into
askimo-ai:mainfrom
waterWang:feat/localize-openai-compatible-templates-607
Open

feat(i18n): localize OpenAI-Compatible template taglines and help text#609
waterWang wants to merge 1 commit into
askimo-ai:mainfrom
waterWang:feat/localize-openai-compatible-templates-607

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Extracts hardcoded English strings from OpenAiCompatibleTemplate into the i18n resource bundle so they can be translated.

Changes

  1. 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).

  2. OpenAiCompatibleTemplate.kt — Added i18nKey, taglineKey, and helpKey computed properties that return the correct resource key based on the enum name. This lets callers look up the localized string without hardcoding key names.

  3. ProviderSelectionDialog.kt — Switched entry.template.taglinestringResource(entry.template.taglineKey) so the tagline is rendered in the user's current locale.

Scope

Per the issue, this covers all 5 templates. The displayName field is intentionally left as-is — it's a short proper noun (e.g. "Cloudflare AI") that doesn't benefit from translation.

Testing

  • pnpm typecheck — passes
  • The tagline now renders via stringResource() which triggers recomposition on locale change

Closes #607

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
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Thank you @waterWang ! The PR looks good to me. Can you sign the CLA so I can merge?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Localize all hardcoded strings in OpenAI-Compatible provider UI

3 participants