]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/translation.md
Escape % signs in crontab example (CLI tools docs)
[github/Chocobozzz/PeerTube.git] / support / doc / translation.md
1 # Translation
2
3 We use [Weblate](https://weblate.org) as translation platform.
4 Please do not edit translation files directly from Git, you have to use Weblate!
5
6 If you don't see your locale in the platform you can add it directly in the Weblate interface.
7 Then, 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!
8
9
10 ## How to
11
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
17
18
19 ## Files
20
21 There are 4 files:
22 * **angular**: contains client strings
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)
25 * **server**: contains server strings (privacies, licences...) and iso639 (languages) strings used by PeerTube to describe the audio language of a particular video.
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.
27
28
29 ## Tips
30
31 ### Special tags
32
33 You must not translate special tags like `<x id="INTERPOLATION" ... />`.
34
35 For example:
36 ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views```
37
38 should be in french
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
44 For singular/plural translations, you must translate values inside `{` and `}`. **Please don't translate the word *other***
45
46 For example:
47
48 ```{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> videos} }```
49
50 should be in french
51
52 ```{VAR_PLURAL, plural, =0 {Aucune vidéo} =1 {1 vidéo} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> vidéos} }```