* initialize de_DE file * German translation (#83) Formatting will be an issue! * update de_DE qm file * Update main_de.ts Fixed the German translations * regen translations * Fix typo (#84) * regen translations * Update selfdrive/ui/translations/main_de.ts Co-authored-by: Kurt Nistelberger <kurt.nistelberger@hotmail.com> * we don't keep these in-tree anymore? * Update main_de.ts Neue Strings ergänzt * update plurals * remove vanished, add new strings * don't translate a brand/service name * capitalize some things, cleanup * capitalize * more cleanup, mark too-long strings * proper (no) capitalization, line wrap * Update selfdrive/ui/translations/main_de.ts Co-authored-by: Shane Smiskol <shane@smiskol.com> * update translation strings * Updating the German translation (#89) Added new strings and shortened others to fit the UI * compromises for better button fit Co-authored-by: Vrabetz <mpell@web.de> Co-authored-by: CzokNorris <czoknorris@me.com> Co-authored-by: Kurt Nistelberger <kurt.nistelberger@hotmail.com> Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: d9fb64f0a15164e323c34f8c59a6950859719167
Multilanguage
Contributing
Before getting started, make sure you have set up the openpilot Ubuntu development environment by reading the tools README.md.
Policy
Most of the languages supported by openpilot come from and are maintained by the community via pull requests. A pull request likely to be merged is one that fixes a translation or adds missing translations.
We also generally merge pull requests adding support for a new language if there are community members willing to maintain it. Maintaining a language is ensuring quality and completion of translations before each openpilot release.
comma may remove or hide language support from releases depending on translation quality and completeness.
Adding a New Language
openpilot provides a few tools to help contributors manage their translations and to ensure quality. To get started:
- Add your new language to languages.json with the appropriate language code and the localized language name (Traditional Chinese is
中文(繁體)). - Generate the XML translation file (
*.ts):selfdrive/ui/update_translations.py - Edit the translation file, marking each translation as completed:
linguist selfdrive/ui/translations/your_language_file.ts - View your finished translations by compiling and starting the UI, then find it in the language selector:
scons -j$(nproc) selfdrive/ui && selfdrive/ui/ui
Improving an Existing Language
Follow step 3. above, you can review existing translations and add missing ones. Once you're done, just open a pull request to openpilot.
Updating the UI
Any time you edit source code in the UI, you need to update the translations to ensure the line numbers and contexts are up to date (first step above).
Testing
openpilot has a few unit tests to make sure all translations are up-to-date and that all strings are wrapped in a translation marker. They are run in CI, but you can also run them locally.
Tests translation files up to date:
selfdrive/ui/tests/test_translations.py
Tests all static source strings are wrapped:
selfdrive/ui/tests/create_test_translations.sh && selfdrive/ui/tests/test_translations
