]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/translation.md
Generate translations
[github/Chocobozzz/PeerTube.git] / support / doc / translation.md
CommitLineData
6a1787c1
C
1# Translation
2
cd1d6c23
C
3We use [Weblate](https://weblate.org) as translation platform.
4Please do not edit translation files directly from Git, you have to use Weblate!
6a1787c1 5
cd1d6c23
C
6If you don't see your locale in the platform you can add it directly in the Weblate interface.
7Then, if you think there are enough translated strings, please [create an issue](https://github.com/Chocobozzz/PeerTube/issues) so we add the new locale in PeerTube!
6a1787c1
C
8
9
10## How to
11
cd1d6c23
C
12 * Create an account: https://weblate.framasoft.org/accounts/register/
13 * Validate your email and follow the link sent
14 * Create your password (keep the `Current password` field empty) and setup your account
15 * Go to the PeerTube page https://weblate.framasoft.org/projects/peertube/
16 * Choose the file and the locale you want to translate
6a1787c1
C
17
18
19## Files
20
21There are 4 files:
22 * **angular**: contains client strings
23687332
C
23 * **player**: contains player strings.
24 Most of the strings come from VideoJS, so you can help yourself by using [video.js JSON files](https://github.com/videojs/video.js/tree/master/lang)
cd1d6c23 25 * **server**: contains server strings (privacies, licences...) and iso639 (languages) strings used by PeerTube to describe the audio language of a particular video.
2336a0e7 26 It's the reason why these strings should be translated too. There are many strings so do not hesitate to translate only main audio languages.
7b034aed 27
cd1d6c23 28
7b034aed
C
29## Tips
30
26aef7c3
C
31### Special tags
32
7b034aed
C
33You must not translate special tags like `<x id="INTERPOLATION" ... />`.
34
35For example:
36```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views```
37
38should be in french
26aef7c3
C
39```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> vues```
40
41
42### Singular/plural
43
cd1d6c23 44For singular/plural translations, you must translate values inside `{` and `}`. **Please don't translate the word *other***
26aef7c3
C
45
46For example:
47
48```{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> videos} }```
49
50should be in french
51
56d72521 52```{VAR_PLURAL, plural, =0 {Aucune vidéo} =1 {1 vidéo} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> vidéos} }```