Skip to content

feat: add German language support (de-DE)#215

Open
harshanaDisa wants to merge 3 commits intoTHU-MAIC:mainfrom
harshanaDisa:feature/german-language-support
Open

feat: add German language support (de-DE)#215
harshanaDisa wants to merge 3 commits intoTHU-MAIC:mainfrom
harshanaDisa:feature/german-language-support

Conversation

@harshanaDisa
Copy link
Copy Markdown

Summary

Related Issues

Changes

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or build changes

Verification

Steps to reproduce / test

What you personally verified

Evidence

  • CI passes (pnpm check && pnpm lint && npx tsc --noEmit)
  • Manually tested locally
  • Screenshots / recordings attached (if UI changes)

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have added/updated documentation as needed
  • My changes do not introduce new warnings

@wyuc
Copy link
Copy Markdown
Contributor

wyuc commented Apr 6, 2026

Hey, thanks for putting this together!

Since this PR was opened, we've refactored the i18n system. Adding a new locale now only needs two changes:

  1. A lib/i18n/locales/<locale>.json file with all translation keys
  2. One line in lib/i18n/locales.ts to register it

See the Translation Guide and #365 (Japanese) for reference.

Could you rebase onto current main and simplify your PR to follow this pattern? The translation strings you've already done are great, it's mainly the wiring that needs updating. Happy to merge once it's aligned.

1 similar comment
@wyuc
Copy link
Copy Markdown
Contributor

wyuc commented Apr 6, 2026

Hey, thanks for putting this together!

Since this PR was opened, we've refactored the i18n system. Adding a new locale now only needs two changes:

  1. A lib/i18n/locales/<locale>.json file with all translation keys
  2. One line in lib/i18n/locales.ts to register it

See the Translation Guide and #365 (Japanese) for reference.

Could you rebase onto current main and simplify your PR to follow this pattern? The translation strings you've already done are great, it's mainly the wiring that needs updating. Happy to merge once it's aligned.

Refactored the initial German language support to align with the newly
introduced i18n system.

Changes:
- Added de-DE.json with all translation keys.
- Registered de-DE in supportedLocales.
- Localized fallback strings in the generation pipeline.
- Updated UI components to dynamically use supportedLocales.
- Added Azure TTS German voices.
- Made prompts generic for multiple languages.

Closes THU-MAIC#215
@harshanaDisa harshanaDisa force-pushed the feature/german-language-support branch from 5c7bc47 to b194fc3 Compare April 6, 2026 22:37
@harshanaDisa
Copy link
Copy Markdown
Author

Hey @wyuc! Thanks for the review and the pointers.

I've rebased the PR onto the current main branch and simplified the implementation to follow the new i18n system as requested.

Here is what's been updated:

  • Migrated all the German translations directly into lib/i18n/locales/de-DE.json (and added a few missing keys from the latest updates).
  • Registered the locale in lib/i18n/locales.ts.
  • Updated the generation pipeline and UI toolbars to dynamically support all registered locales (removing the hardcoded zh-CN | en-US checks).
  • Added German Azure TTS voices and dynamic language tagging for the speech generation.

Let me know if everything looks good or if there's anything else that needs adjusting!

@harshanaDisa
Copy link
Copy Markdown
Author

Quick update: I've fixed the CI failures related to the recent refactor.

Changes included:

  • Resolved TypeScript compilation errors in classroom-generation.ts and scene-generator.ts by correctly importing and using the new Locale types.
  • Fixed missing dependencies in roundtable/index.tsx useEffect hooks.
  • Cleaned up unused variables and imports in media-popover.tsx.
  • Fixed all Prettier formatting issues.

CI should pass now!

@wyuc
Copy link
Copy Markdown
Contributor

wyuc commented Apr 7, 2026

Hey, thanks for the rebase and CI fixes!

The de-DE.json + locales.ts registration part looks good. However, the other 14 files (generation pipeline, TTS voices, toolbar, etc.) go beyond i18n and should be a separate PR. We have a broader language redesign planned (discussion #333) that will replace the hardcoded language branches.

Could you trim this PR down to just the two i18n files? The generation pipeline changes can go in a follow-up PR. Happy to merge the translation once it's scoped down.

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.

2 participants