]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/translation.md
Fix E2E with firefox
[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
954dcefa 17
6a1787c1
C
18
19## Files
20
21There are 4 files:
22 * **angular**: contains client strings
954dcefa 23 * **player**: contains player strings.
23687332 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
954dcefa
C
35For example:
36```
37<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views
38```
7b034aed 39
954dcefa
C
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```
26aef7c3
C
44
45
46### Singular/plural
47
cd1d6c23 48For singular/plural translations, you must translate values inside `{` and `}`. **Please don't translate the word *other***
26aef7c3
C
49
50For example:
51
954dcefa
C
52```
53{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> videos} }
54```
26aef7c3 55
954dcefa 56should be in french
26aef7c3 57
954dcefa
C
58```
59{VAR_PLURAL, plural, =0 {Aucune vidéo} =1 {1 vidéo} other {<x id="INTERPOLATION" equiv-text="{{ playlist.videosLength }}"/> vidéos} }
60```