2018-06-21 08:07:53 -04:00
# Translation
2019-11-13 03:45:27 -05:00
We use [Weblate ](https://weblate.org ) as translation platform.
Please do not edit translation files directly from Git, you have to use Weblate!
2018-06-21 08:07:53 -04:00
2019-11-13 03:45:27 -05:00
If you don't see your locale in the platform you can add it directly in the Weblate interface.
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!
2018-06-21 08:07:53 -04:00
2024-03-08 04:07:29 -05:00
Translations are manually pulled and merged in PeerTube software and are publicly available in the next official release.
You can get a chance to see translations before the official release by going to https://peertube2.cpy.re which is updated every night with the latest PeerTube changes.
2018-06-21 08:07:53 -04:00
## How to
2019-11-13 03:45:27 -05:00
* Create an account: https://weblate.framasoft.org/accounts/register/
* Validate your email and follow the link sent
* Create your password (keep the `Current password` field empty) and setup your account
* Go to the PeerTube page https://weblate.framasoft.org/projects/peertube/
* Choose the file and the locale you want to translate
2023-02-22 04:40:11 -05:00
2018-06-21 08:07:53 -04:00
## Files
There are 4 files:
* **angular**: contains client strings
2023-02-22 04:40:11 -05:00
* **player**: contains player strings.
2018-06-21 12:29:28 -04:00
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 )
2019-11-13 03:45:27 -05:00
* **server**: contains server strings (privacies, licences...) and iso639 (languages) strings used by PeerTube to describe the audio language of a particular video.
2018-06-21 09:21:02 -04:00
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.
2018-06-27 02:28:43 -04:00
2019-11-13 03:45:27 -05:00
2018-06-27 02:28:43 -04:00
## Tips
2019-05-13 11:45:00 -04:00
### Special tags
2018-06-27 02:28:43 -04:00
You must not translate special tags like `<x id="INTERPOLATION" ... />` .
2023-02-22 04:40:11 -05:00
For example:
```
< x id = "INTERPOLATION" equiv-text = "{{ video.publishedAt | myFromNow }}" / > - < x id = "INTERPOLATION_1" equiv-text = "{{ video.views | myNumberFormatter }}" / > views
```
2018-06-27 02:28:43 -04:00
2023-02-22 04:40:11 -05:00
should be in french
```
< x id = "INTERPOLATION" equiv-text = "{{ video.publishedAt | myFromNow }}" / > - < x id = "INTERPOLATION_1" equiv-text = "{{ video.views | myNumberFormatter }}" / > vues
```
2019-05-13 11:45:00 -04:00
### Singular/plural
2019-11-13 03:45:27 -05:00
For singular/plural translations, you must translate values inside `{` and `}` . **Please don't translate the word *other** *
2019-05-13 11:45:00 -04:00
For example:
2023-02-22 04:40:11 -05:00
```
{VAR_PLURAL, plural, =0 {No videos} =1 {1 video} other {< x id = "INTERPOLATION" equiv-text = "{{ playlist.videosLength }}" / > videos} }
```
2019-05-13 11:45:00 -04:00
2023-02-22 04:40:11 -05:00
should be in french
2019-05-13 11:45:00 -04:00
2023-02-22 04:40:11 -05:00
```
{VAR_PLURAL, plural, =0 {Aucune vidéo} =1 {1 vidéo} other {< x id = "INTERPOLATION" equiv-text = "{{ playlist.videosLength }}" / > vidéos} }
```