Skip to content

Comments

feat(i18n): localize application module responses#247

Merged
karaktaka merged 2 commits intomainfrom
feat/i18n-application
Feb 22, 2026
Merged

feat(i18n): localize application module responses#247
karaktaka merged 2 commits intomainfrom
feat/i18n-application

Conversation

@karaktaka
Copy link
Contributor

Summary

  • Migrate all hardcoded English strings in application.py, views/application.py, and conversations/application.py to use get_string() / get_guild_language() infrastructure
  • Add ~85 locale keys to lang_en.yaml and lang_de.yaml covering commands, review embeds, modal titles, apply button, and error messages
  • Modal titles are localized per-interaction; persistent view button labels (Vote, Edit Vote, Message, Override, Apply) stay in English since a single instance serves all guilds
  • Add test_application_locale.py with 53 EN/DE tests covering cog commands, view buttons, modal titles, and embed builders
  • Fix existing tests (test_application_view.py, integration tests) to work with new get_string() calls by adding load_strings() fixtures and guild_id mock attributes

Test plan

  • All 53 new locale tests pass (EN and DE)
  • All 90 existing view tests pass
  • All 55 integration conversation tests pass
  • Full test suite: 846 passed, 0 failed
  • ruff check and ruff format --check clean

🤖 Generated with Claude Code

Migrate all hardcoded English strings in the application module,
views, and conversations to use the get_string()/get_guild_language()
infrastructure. Modal titles are localized per-interaction; persistent
view button labels stay in English (single instance serves all guilds).

Co-Authored-By: Claude <noreply@anthropic.com>
Built-in template names and questions are now resolved from YAML locale
files at use-time based on the guild's language setting. DB keeps English
names as stable identifiers; TEMPLATE_KEY_MAP bridges to YAML keys.

- Add get_raw() to utils/strings.py for non-string YAML lookups
- Add builtin_templates section to lang_en.yaml and lang_de.yaml
- Localize _template_autocomplete, _template_list, _template_use
- Add TEMPLATE_KEY_MAP for English DB name → YAML key mapping

Co-Authored-By: Claude <noreply@anthropic.com>
@karaktaka karaktaka force-pushed the feat/i18n-application branch from 729dcba to c8cd02e Compare February 22, 2026 21:28
@karaktaka karaktaka merged commit fe32dac into main Feb 22, 2026
6 checks passed
@karaktaka karaktaka deleted the feat/i18n-application branch February 22, 2026 21:31
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.

1 participant