diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-13 17:45:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-13 17:45:00 +0200 |
commit | 26aef7c3fe5d81b7fcb84c4828a9d91ce7be7318 (patch) | |
tree | 32db94d4bee67f88c06833f1aa9a16bde2cda009 /support/doc/translation.md | |
parent | 2ed67a7dd2d596d77e45dab0dd1754985fb2681d (diff) | |
download | PeerTube-26aef7c3fe5d81b7fcb84c4828a9d91ce7be7318.tar.gz PeerTube-26aef7c3fe5d81b7fcb84c4828a9d91ce7be7318.tar.zst PeerTube-26aef7c3fe5d81b7fcb84c4828a9d91ce7be7318.zip |
Add singular/plural tip for translation
Diffstat (limited to 'support/doc/translation.md')
-rw-r--r-- | support/doc/translation.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/support/doc/translation.md b/support/doc/translation.md index 5267c3899..58b52f5f8 100644 --- a/support/doc/translation.md +++ b/support/doc/translation.md | |||
@@ -26,10 +26,25 @@ There are 4 files: | |||
26 | 26 | ||
27 | ## Tips | 27 | ## Tips |
28 | 28 | ||
29 | ### Special tags | ||
30 | |||
29 | You must not translate special tags like `<x id="INTERPOLATION" ... />`. | 31 | You must not translate special tags like `<x id="INTERPOLATION" ... />`. |
30 | 32 | ||
31 | For example: | 33 | For example: |
32 | ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views``` | 34 | ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> views``` |
33 | 35 | ||
34 | should be in french | 36 | should be in french |
35 | ```<x id="INTERPOLATION" equiv-text="{{ video.publishedAt | myFromNow }}"/> - <x id="INTERPOLATION_1" equiv-text="{{ video.views | myNumberFormatter }}"/> vues``` \ No newline at end of file | 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} }``` | ||