Add hooks documentation
[oweals/peertube.git] / support / doc / translation.md
1 # Translation
2
3 We use [Zanata](http://zanata.org/) as translation platform.
4 Please do not edit xml files directly from Git, you have to use Zanata!
5
6 If you don't see your locale in the platform, please [create an issue](https://github.com/Chocobozzz/PeerTube/issues) so we add it!
7
8
9 ## How to
10
11  * Create an account: https://trad.framasoft.org/account/register
12  * Join a language team: https://trad.framasoft.org/languages
13  * Go to the PeerTube page https://trad.framasoft.org/iteration/view/peertube/develop
14  * Choose the locale and begin to translate PeerTube!
15  
16
17 ## Files
18
19 There are 4 files:
20  * **angular**: contains client strings
21  * **player**: contains player strings. 
22  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)
23  * **server**: contains server strings (privacies, licences...)
24  * **iso639**: contains iso639 (languages) strings used by PeerTube to describe the audio language of a particular video.
25  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.
26
27 ## Tips
28
29 ### Special tags
30
31 You must not translate special tags like `<x id="INTERPOLATION" ... />`.
32
33 For example: 
34 ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views```
35
36 should be in french 
37 ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> vues```
38
39
40 ### Singular/plural
41
42 For singular/plural translations, you must translate values inside `{` and `}`.
43
44 For example:
45
46 ```{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> videos} }```
47
48 should be in french 
49
50 ```{VAR_PLURAL, plural, =0 {Aucune vidéos} =1 {1 vidéo} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> vidéos} }```