]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - support/doc/translation.md
Fix E2E with firefox
[github/Chocobozzz/PeerTube.git] / support / doc / translation.md
... / ...
CommitLineData
1# Translation
2
3We use [Weblate](https://weblate.org) as translation platform.
4Please do not edit translation files directly from Git, you have to use Weblate!
5
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!
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
21There 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
33You must not translate special tags like `<x id="INTERPOLATION" ... />`.
34
35For example:
36```
37<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views
38```
39
40should be in french
41```
42<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> vues
43```
44
45
46### Singular/plural
47
48For singular/plural translations, you must translate values inside `{` and `}`. **Please don't translate the word *other***
49
50For example:
51
52```
53{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> videos} }
54```
55
56should be in french
57
58```
59{VAR_PLURAL, plural, =0 {Aucune vidéo} =1 {1 vidéo} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> vidéos} }
60```