aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins/guide.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r--support/doc/plugins/guide.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 1aae65a1c..b4f3e6638 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -30,6 +30,7 @@
30- [Tips](#tips) 30- [Tips](#tips)
31 - [Compatibility with PeerTube](#compatibility-with-peertube) 31 - [Compatibility with PeerTube](#compatibility-with-peertube)
32 - [Spam/moderation plugin](#spammoderation-plugin) 32 - [Spam/moderation plugin](#spammoderation-plugin)
33 - [Other plugin examples](#other-plugin-examples)
33 34
34<!-- END doctoc generated TOC please keep comment here to allow auto update --> 35<!-- END doctoc generated TOC please keep comment here to allow auto update -->
35 36
@@ -323,6 +324,15 @@ If you want to translate strings of your plugin (like labels of your registered
323The key should be one of the locales defined in [i18n.ts](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/i18n/i18n.ts). 324The key should be one of the locales defined in [i18n.ts](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/i18n/i18n.ts).
324You **must** use the complete locales (`fr-FR` instead of `fr`). 325You **must** use the complete locales (`fr-FR` instead of `fr`).
325 326
327Translation files are just objects, with the english sentence as the key and the translation as the value.
328`fr.json` could contain for example:
329
330```json
331{
332 "Hello world": "Hello le monde"
333}
334```
335
326### Test your plugin/theme 336### Test your plugin/theme
327 337
328You'll need to have a local PeerTube instance: 338You'll need to have a local PeerTube instance:
@@ -410,3 +420,6 @@ If you want to create an antispam/moderation plugin, you could use the following
410 * `filter:api.video-thread-comments.list.result`: to change/hide the text of replies 420 * `filter:api.video-thread-comments.list.result`: to change/hide the text of replies
411 * `filter:video.auto-blacklist.result`: to automatically blacklist local or remote videos 421 * `filter:video.auto-blacklist.result`: to automatically blacklist local or remote videos
412 422
423### Other plugin examples
424
425You can take a look to "official" PeerTube plugins if you want to take inspiration from them: https://framagit.org/framasoft/peertube/official-plugins