From 67baf6478a56e4fabb22da27ee91783add7ed369 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Apr 2021 16:14:09 +0200 Subject: Allow plugins to set short translation locale --- support/doc/plugins/guide.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'support/doc/plugins') diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 17c681afd..5b5a3065d 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md @@ -744,7 +744,7 @@ If you want to translate strings of your plugin (like labels of your registered { ..., "translations": { - "fr-FR": "./languages/fr.json", + "fr": "./languages/fr.json", "pt-BR": "./languages/pt-BR.json" }, ... @@ -752,7 +752,6 @@ If you want to translate strings of your plugin (like labels of your registered ``` The key should be one of the locales defined in [i18n.ts](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/i18n/i18n.ts). -You **must** use the complete locales (`fr-FR` instead of `fr`). Translation files are just objects, with the english sentence as the key and the translation as the value. `fr.json` could contain for example: -- cgit v1.2.3