ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

localization.md 1.2 KiB

1234567891011121314151617181920212223242526272829303132333435
  1. # Application localization documentation
  2. Source files are in `client/src/locale` and translated files merged from [Weblate](https://weblate.framasoft.org/translate/peertube).
  3. ## Generation
  4. Will generate XLIFF base files for Angular (`angular.xlf`) and JSON files for the player (`player.en-US.json`) and the server (`server.en-US.json`).
  5. Then, it will merge new translation keys into localized Angular files (`angular.fr-FR.xlf` etc).
  6. ```
  7. npm run i18n:update
  8. ```
  9. ## Upload on Weblate
  10. Nothing to do here, Github will automatically send a webhook to Weblate that will pull changes.
  11. ## Pull translation
  12. * First, save translations on Weblate so it commits changes.
  13. * Then, fetch these commits: `git fetch weblate && git merge weblate/develop`
  14. ## Support a new language
  15. * Add it to [/packages/models/i18n/i18n.ts](/packages/core-utils/src/i18n/i18n.ts)
  16. * Add it to [/scripts/build/client.sh](/scripts/build/client.sh)
  17. * Add it to [/client/angular.json](/client/angular.json)
  18. * Add it to [/scripts/i18n/update.sh](/scripts/i18n/update.sh)
  19. * Lock [weblate project](https://weblate.framasoft.org/projects/peertube)
  20. * Run `npm run i18n:update`
  21. * Build the application and check the new language correctly works