Documentation translation (#199)

Documentation translation using weblate.

* Use po4a to generate .po files from the english markdowns, then to generate translated files
* Some pages can be marked as «english only» (for technical documentation for example)
* New Hugo shortcode to use application strings in documentation (for example for settings names)
* The code of conduct is no more translated, but there is a link to official Contributor Covenant translations
* Adding all plugin's supported languages

Related to https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/117
This commit is contained in:
John Livingston 2023-07-14 19:15:30 +02:00 committed by GitHub
parent a82e5eb390
commit 56df985745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
161 changed files with 74117 additions and 2866 deletions

View File

@ -8,19 +8,25 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Install po4a
run: sudo apt update && sudo apt install po4a -y
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.80.0'
# extended: true
- name: Generate documentation translations
run: bash ./doc-translate.sh
- name: Build
run: hugo --minify --baseURL='https://johnxlivingston.github.io/peertube-plugin-livechat' -s support/documentation

5
.gitignore vendored
View File

@ -4,4 +4,7 @@ dist
.vscode
build
support/documentation/public
public
support/documentation/po/po4a.conf
support/documentation/content/translations/**/*.md
support/documentation/i18n
public

View File

@ -1,12 +1,29 @@
image: monachus/hugo
stages:
- build
- deploy
builddoctranslations:
stage: build
image: debian:stable
script:
- apt update && apt install po4a -y
- bash ./doc-translate.sh
artifacts:
paths:
- support/documentation/i18n/
- support/documentation/content/translations/
pages:
stage: deploy
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_PATHS: support/documentation/themes/hugo-theme-learn
script:
# gitlab need the generated documentation to be in the /public dir.
- hugo -s support/documentation/ -d ../../public/ --baseURL='https://livingston.frama.io/peertube-plugin-livechat/'
dependencies:
- builddoctranslations
artifacts:
paths:
- public

View File

@ -10,6 +10,8 @@
### Minor changes and fixes
* Translation updates.
* Documentation can now also be translated using [Weblate](https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/).
* Documentation can use hugo shortcode livechat_label to get application strings.
## 7.1.0

View File

@ -1,32 +0,0 @@
#!/bin/bash
set -euo pipefail
function getLangs() {
grep -P '\[Languages.\w+\]' support/documentation/config.toml | sed -E 's/^.*\.(\w+)\].*$/\1/' | grep -v en
}
function createMissingFile() {
source_file=$1
wanted_file=$2
echo " creating $wanted_file from $source_file"
# getting everything between +++ and +++:
sed -n '/\+\+\+/,/\+\+\+/p' "$source_file" > "$wanted_file"
# Adding the warning notice:
echo "
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}" >> "$wanted_file"
}
find support/documentation/content -name '*.en.md' | while read source_file; do
echo "File $source_file:"
getLangs | while read lang; do
wanted_file=$(echo "$source_file" | sed -E "s/.en.md\$/.$lang.md/")
if test -f $wanted_file; then
echo " File $wanted_file OK"
else
createMissingFile "$source_file" "$wanted_file"
fi
done
done

129
doc-translate.sh Normal file
View File

@ -0,0 +1,129 @@
#!/bin/bash
set -euo pipefail
po4afile="support/documentation/po/po4a.conf"
build_pot_in_folder="build/documentation/pot_in"
ignore_pattern='^#*\s*\{\{%\s*livechat_label[^\}]+\s*\}\}\s*$'
# Is po4a new enough?
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
required_version='0.66'
current_version=$(po4a --version | sed -En 's,po4a version ([0-9][0-9.]+[0-9]).*,\1,p')
if version_gt "$required_version" "$current_version"; then
echo "ERROR: po4a v$required_version or higher required. Current version: $current_version"
exit 1
fi
mkdir -p $build_pot_in_folder
mkdir -p "support/documentation/i18n/"
function getLangs() {
grep -P '\[Languages\..+\]' support/documentation/config.toml | sed -E 's/^.*\.(.+)\].*$/\1/' | grep -v en
}
function generatePo4aConf() {
echo "Creating $po4afile file..."
echo "" > $po4afile
# First, list all existing langs, from the config.toml file:
echo -n "[po4a_langs] " >> $po4afile
getLangs | while read lang; do
echo -n "$lang " >> $po4afile
done
echo "" >> $po4afile
# po4a_paths:
echo "[po4a_paths] support/documentation/po/livechat.en.pot \$lang:support/documentation/po/livechat.\$lang.po" >> $po4afile
# options:
echo -n "[options] " >> $po4afile
echo -n 'opt:"--addendum-charset=UTF-8" ' >> $po4afile
echo -n 'opt:"--localized-charset=UTF-8" ' >> $po4afile
echo -n 'opt:"--master-charset=UTF-8" ' >> $po4afile
echo -n 'opt:"--master-language=en_US" ' >> $po4afile
echo -n 'opt:"--msgmerge-opt=--no-wrap" ' >> $po4afile
echo -n 'opt:"--porefs=file" ' >> $po4afile
echo -n 'opt:"--wrap-po=newlines" ' >> $po4afile
echo -n 'opt:"--package-name=peertube-plugin-livechat-documentation" ' >> $po4afile
echo "" >> $po4afile
# Markdown related options:
echo -n '[po4a_alias:markdown] text ' >> $po4afile
echo -n 'opt:"--option markdown" ' >> $po4afile
# keys from the «Front Matter» section to translate:
echo -n 'opt:"--option yfm_keys=title,description" ' >> $po4afile
# dont wrap lines:
echo -n 'opt:"--option neverwrap" ' >> $po4afile
# handling hugo directive (when full line). For example: {{% notice tip %}}, {{% children %}}, ...
echo -n 'opt:"--option breaks=' >> $po4afile
echo -n "'" >> $po4afile
echo -n '^\{\{%.*%\}\}$' >> $po4afile
echo -n "'" >> $po4afile
echo -n '" ' >> $po4afile
echo -n 'opt:"--addendum-charset=UTF-8" ' >> $po4afile
echo -n 'opt:"--localized-charset=UTF-8" ' >> $po4afile
echo -n 'opt:"--master-charset=UTF-8" ' >> $po4afile
# generate translation even if incomplete:
echo -n 'opt:"--keep=0" ' >> $po4afile
echo "" >> $po4afile
echo "" >> $po4afile
# We must now list all english files to translate:
find support/documentation/content/en/ -name '*.md' | sort | while read source_file; do
target_file=$(echo "$source_file" | sed -E "s/\/content\/en\//\/content\/translations\/\$lang\//")
echo -n '[type: markdown] ' >> $po4afile
echo -n $source_file >> $po4afile
echo -n " " >> $po4afile
# Some files have strings to ignore. For example, when the whole line/title is using the livechat_label shortcode.
# To do so, we will use the pot_in option (see https://po4a.org/man/man1/po4a.1.php).
# We are generating a filtered file, that will be used.
# There is also a special case:
# If the file Yaml Font Matter contains the livechatnotranslation option, we just copy the file.
# To do so, we use the pot_in option, by generating an empty file.
pot_in_file=$(echo "$source_file" | sed -E 's/support\/documentation\/content\/en\//build\/documentation\/pot_in\//')
pot_in_file_dir=$(dirname "$pot_in_file")
use_pot_in=""
if grep -q -P '^livechatnotranslation\s*:\s*true\s*$' "$source_file"; then
echo "File $source_file must not be translated."
mkdir -p "$pot_in_file_dir"
echo "" > "$pot_in_file"
echo -n "pot_in:$pot_in_file " >> $po4afile
else
if grep -q -P "$ignore_pattern" $source_file; then
echo "File $source_file contains pattern to ignore, we must create a filtered pot_in file."
mkdir -p "$pot_in_file_dir"
grep -v -P "$ignore_pattern" $source_file > "$pot_in_file";
echo -n "pot_in:$pot_in_file " >> $po4afile
fi
fi
echo -n '$lang:'$target_file >> $po4afile
echo "" >> $po4afile
done
}
function runPo4a() {
echo "Running po4a..."
po4a $po4afile
}
function copyLivechatLanguages() {
echo "Copying livechat yml languages files to the hugo directory..."
find languages/ -name '*.yml' | while read file; do
# We need to rename .yml to .yaml... don't ask, hugo stuff...
new_filename=$(echo "$file" | sed -E "s/languages\/(.*)\.yml$/support\/documentation\/i18n\/\1.yaml/")
cp $file $new_filename
done
}
generatePo4aConf
copyLivechatLanguages
runPo4a

View File

@ -83,8 +83,8 @@
],
"library": "./dist/server/main.js",
"scripts": {
"clean": "rm -rf dist/* build/*",
"clean:light": "rm -rf dist/*",
"clean": "rm -rf dist/* build/* support/documentation/content/translations/* support/documentation/i18n/*",
"clean:light": "rm -rf dist/* support/documentation/content/translations/* support/documentation/i18n/*",
"prepare": "npm run clean && npm run build",
"build:converse": "bash conversejs/build-conversejs.sh",
"build:prosody": "bash build-prosody.sh",
@ -102,7 +102,7 @@
"lint:script": "npx eslint --ext .js --ext .ts .",
"lint:styles": "stylelint 'conversejs/**/*.scss' 'assets/styles/**/*.css'",
"show:npmfiles": "npx npm-packlist",
"doc:generatemissingtranslations": "bash doc-generate-missing-translations.sh"
"doc:translate": "bash doc-translate.sh"
},
"staticDirs": {
"static": "dist/client/static",

View File

@ -32,21 +32,180 @@ weight = 20
[Languages.en]
title = "Peertube plugin livechat documentation"
languageName = "English"
contentDir = "content/en"
[Languages.fr]
title = "Documentation plugin Peertube livechat"
languageName = "Français"
landingPageName = "<i class='fas fa-home'></i> Accueil"
landingPageURL = "/peertube-plugin-livechat/fr/"
[Languages.ar]
languageName = "العربية"
landingPageURL = "/peertube-plugin-livechat/ar/"
contentDir = "content/translations/ar"
[Languages.ca]
languageName = "Català"
landingPageURL = "/peertube-plugin-livechat/ca/"
contentDir = "content/translations/ca"
[Languages.cs]
languageName = "Čeština"
landingPageURL = "/peertube-plugin-livechat/cs/"
contentDir = "content/translations/cs"
[Languages.de]
title = "Peertube Plugin Livechat Dokumentation"
languageName = "Deutsch"
landingPageName = "<i class='fas fa-home'></i> Home"
landingPageURL = "/peertube-plugin-livechat/de/"
contentDir = "content/translations/de"
[Languages.el]
languageName = "ελληνικά"
landingPageURL = "/peertube-plugin-livechat/el/"
contentDir = "content/translations/el"
[Languages.eo]
languageName = "Esperanto"
landingPageURL = "/peertube-plugin-livechat/eo/"
contentDir = "content/translations/eo"
[Languages.es]
languageName = "Español"
landingPageURL = "/peertube-plugin-livechat/es/"
contentDir = "content/translations/es"
[Languages.eu]
languageName = "Euskara"
landingPageURL = "/peertube-plugin-livechat/eu/"
contentDir = "content/translations/eu"
[Languages.fa]
languageName = "فارسی"
landingPageURL = "/peertube-plugin-livechat/fa/"
contentDir = "content/translations/fa"
[Languages.fi]
languageName = "Suomi"
landingPageURL = "/peertube-plugin-livechat/fi/"
contentDir = "content/translations/fi"
[Languages.fr]
title = "Documentation plugin Peertube livechat"
languageName = "Français"
landingPageName = "<i class='fas fa-home'></i> Accueil"
landingPageURL = "/peertube-plugin-livechat/fr/"
contentDir = "content/translations/fr"
[Languages.gd]
languageName = "Gàidhlig"
landingPageURL = "/peertube-plugin-livechat/gd/"
contentDir = "content/translations/gd"
[Languages.gl]
languageName = "Galego"
landingPageURL = "/peertube-plugin-livechat/gl/"
contentDir = "content/translations/gl"
[Languages.hr]
languageName = "Hrvatski"
landingPageURL = "/peertube-plugin-livechat/hr/"
contentDir = "content/translations/hr"
[Languages.hu]
languageName = "Magyar"
landingPageURL = "/peertube-plugin-livechat/hu/"
contentDir = "content/translations/hu"
[Languages.is]
languageName = "Íslenska"
landingPageURL = "/peertube-plugin-livechat/is/"
contentDir = "content/translations/is"
[Languages.it]
languageName = "Italiano"
landingPageURL = "/peertube-plugin-livechat/it/"
contentDir = "content/translations/it"
[Languages.ja]
title = "PeerTube ライブチャットプラグイン"
languageName = "日本語バージョン"
landingPageName = "<i class='fas fa-home'></i> Home"
landingPageURL = "/peertube-plugin-livechat/ja/"
contentDir = "content/translations/ja"
[Languages.kab]
languageName = "Taqbaylit"
landingPageURL = "/peertube-plugin-livechat/ka/"
contentDir = "content/translations/kab"
[Languages.nb]
languageName = "Norsk bokmål"
landingPageURL = "/peertube-plugin-livechat/nb/"
contentDir = "content/translations/nb"
[Languages.nl]
languageName = "Nederlands"
landingPageURL = "/peertube-plugin-livechat/nl/"
contentDir = "content/translations/nl"
[Languages.nn]
languageName = "Norsk nynorsk"
landingPageURL = "/peertube-plugin-livechat/nn/"
contentDir = "content/translations/nn"
[Languages.oc]
languageName = "Occitan"
landingPageURL = "/peertube-plugin-livechat/oc/"
contentDir = "content/translations/oc"
[Languages.pl]
languageName = "Polski"
landingPageURL = "/peertube-plugin-livechat/pl/"
contentDir = "content/translations/pl"
[Languages.pt]
languageName = "uguês"
landingPageURL = "/peertube-plugin-livechat/pt/"
contentDir = "content/translations/pt"
[Languages.ru]
languageName = "Pусский"
landingPageURL = "/peertube-plugin-livechat/ru/"
contentDir = "content/translations/ru"
[Languages.sq]
languageName = "Shqip"
landingPageURL = "/peertube-plugin-livechat/sq/"
contentDir = "content/translations/sq"
[Languages.sv]
languageName = "Svenska"
landingPageURL = "/peertube-plugin-livechat/sv/"
contentDir = "content/translations/sv"
[Languages.th]
languageName = "ไทย"
landingPageURL = "/peertube-plugin-livechat/th/"
contentDir = "content/translations/th"
[Languages.tok]
languageName = "Toki Pona"
landingPageURL = "/peertube-plugin-livechat/to/"
contentDir = "content/translations/tok"
[Languages.uk]
languageName = "украї́нська мо́ва"
landingPageURL = "/peertube-plugin-livechat/uk/"
contentDir = "content/translations/uk"
[Languages.vi]
languageName = "Tiếng Việt"
landingPageURL = "/peertube-plugin-livechat/vi/"
contentDir = "content/translations/vi"
[Languages.zh-Hans]
languageName = "简体中文(中国)"
landingPageURL = "/peertube-plugin-livechat/zh-Hans/"
contentDir = "content/translations/zh-Hans"
[Languages.zh-Hant]
languageName = "繁體中文(台灣"
landingPageURL = "/peertube-plugin-livechat/zh-Hant/"
contentDir = "content/translations/zh-Hant"

View File

@ -1,7 +0,0 @@
# PeerTube plugin livechat
{{% notice info %}}
Bevor Sie auf eine Hauptversion aktualisieren, lesen Sie bitte die Versionshinweise und die Liste der wichtigsten Änderungen : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,7 +0,0 @@
# PeerTube plugin livechat
{{% notice info %}}
Avant de mettre à jour le plugin vers une nouvelle version majeure, merci de lire les notes de version, et la liste des éventuelless modifications non rétro-compatibles : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,7 +0,0 @@
# PeerTube ライブチャットプラグイン
{{% notice info %}}
メジャーリリースのアップデート実施前に、リリースノートをお読み頂き、変更をご確認ください : [変更履歴](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,12 +0,0 @@
+++
title="Kontakt"
description="Kontakt"
weight=80
chapter=false
+++
Wenn Sie eine Frage haben oder über dieses Plugin sprechen möchten, können Sie diesem XMPP-Raum mit einem beliebigen Jabber-Client beitreten: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).
Wenn Sie das Projekt finanziell unterstützen möchten, können Sie mich per E-Mail unter git.[at].john-livingston.fr kontaktieren oder mein [Liberapay-Profil](https://liberapay.com/JohnLivingston/) ansehen.
`Bitte schreiben Sie mich in den Sprachen Englisch oder Französisch an.`

View File

@ -1,10 +0,0 @@
+++
title="Me contacter"
description="Contacter l'auteur"
weight=80
chapter=false
+++
Si vous avez des questions ou souhaitez parler de ce plugin, vous pouvez rejoindre ce salon XMPP avec n'importe quel client Jabber : [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).
Si vous souhaitez supporter le projet financièrement, vous pouvez me contacter par mail à l'adresse git.[arobase].john-livingston.fr, ou passer par mon [profil Liberapay](https://liberapay.com/JohnLivingston/).

View File

@ -1,10 +0,0 @@
+++
title="お問い合わせ"
description="お問い合わせ"
weight=80
chapter=false
+++
もし、ご質問、このプラグインに関して話したいことがある場合、お好きなJabberクライアントを使って、こちらのXMPPルームに参加してください: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).
もし、プロジェクトを金銭面でご支援頂ける場合は、メールにて git.[at].john-livingston.fr, までご連絡頂くか、私の[Liberapay profile](https://liberapay.com/JohnLivingston/)をご確認頂けますと幸いです。

View File

@ -1,10 +0,0 @@
+++
title="Beitragen"
description="Beitragen"
weight=60
chapter=false
+++
Interessiert beizutragen? Super!
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,10 +0,0 @@
+++
title="Contribuer"
description="Contribuer"
weight=60
chapter=false
+++
Intéressé⋅e pour contribuer ? Super !
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,10 +0,0 @@
+++
title="コントリビュート"
description="コントリビュート"
weight=60
chapter=false
+++
Interested in contributing? Awesome!
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,146 +0,0 @@
+++
title="Verhaltenskodex"
description="Vereinbarung über Verhaltenskodex für Mitwirkende"
weight=10
chapter=false
+++
## Unsere Verpflichtung
Wir als Mitglieder, Teilnehmende und Verantwortliche unserer Gemeinschaft
verpflichten uns, allen Teilnehmenden an dem Projekt und unserer Gemeinschaft
eine belästigungsfreie Beteiligung, unabhängig von Alter, Körpergröße,
Behinderung, ethnischer Zuordnung, Geschlechtermerkmalen, -identität und -ausdruck,
Grad der Erfahrung, Bildung, sozialem Status, Nationalität, persönlicher
Erscheinung, Rasse, Religion oder sexueller Identität und Orientierung
zu ermöglichen.
Wir verpflichten uns, in einer Weise zu handeln und zu interagieren, die zu
einer offenen, einladenden, vielfältigen, inklusiven und gesunden Gemeinschaft
beiträgt.
## Unsere Standards
Beispiele für Verhaltensweisen, die zu einem positiven Umfeld für unsere
Gemeinschaft beitragen, sind:
- Einfühlungsvermögen und Freundlichkeit gegenüber anderen Menschen zeigen
- Unterschiedliche Meinungen, Standpunkte und Erfahrungen respektieren
- Konstruktives Feedback geben und würdevoll annehmen
- Verantwortung übernehmen und uns bei denjenigen entschuldigen, die von unseren
Fehlern betroffen sind, und aus den Erfahrungen lernen
- Konzentration auf das, was nicht nur für uns als Individuen, sondern für die
gesamte Gemeinschaft das Beste ist
Beispiele für inakzeptables Verhalten sind:
- Die Verwendung sexualisierter Sprache, Bilder oder Symbolik sowie unerwünschte
Versuche sexueller Annäherung
- Beleidigende oder abwertende Kommentare, persönliche oder politische Angriffe
und Trollen
- Öffentliche oder private Belästigungen
- Das Veröffentlichen von privaten Informationen Anderer, wie zum Beispiel
physische oder elektronische Adressen, ohne deren ausdrückliche Erlaubnis
- Anderes Verhalten, welches in einem professionellen Umfeld begründet als
unangemessen betrachtet werden kann
## Verantwortlichkeiten bei der Durchsetzung
Die Gemeinschaftsleitung ist verantwortlich dafür, unsere Standards für ein
akzeptables Verhalten klarzustellen und wird angemessen und fair
korrigierende Maßnahmen ergreifen um auf jegliches Verhalten, das sie für
unangemessen, bedrohlich oder beleidigend hält, zu reagieren.
Die Gemeinschaftsleitung hat das Recht und die Verantwortung, Kommentare,
Commits, Code, Wiki-Bearbeitungen, Support-Tickets und andere Beiträge, die
nicht mit diesem Verhaltenskodex vereinbar sind, zu entfernen, zu bearbeiten
oder abzulehnen, und wird die Gründe für eine Mäßigung mitteilen, wenn es
angebracht ist.
## Geltungsbereich
Dieser Verhaltenskodex gilt für alle Gemeinschaftsbereiche und gilt auch, wenn
eine Einzelperson die Gemeinschaft offiziell in öffentlichen Bereichen vertritt.
Beispiele für die Repräsentation unserer Gemeinschaft sind die Verwendung einer
offiziellen E-Mail-Adresse, das Posten über ein offizielles Social-Media-Konto
oder das Auftreten als ernannte Vertretung bei einer Online- oder
Offline-Veranstaltung.
## Durchsetzung
Fälle von missbräuchlichem, belästigendem oder anderweitig inakzeptablem
Verhalten können unter git.[at].john-livingston.fr der für die Durchsetzung
zuständigen Gemeinschaftsleitung gemeldet werden. Alle Beschwerden werden
zeitnah und fair geprüft und ermittelt.
Die gesamte Gemeinschaftsleitung ist verpflichtet, die Privatsphäre und die
Sicherheit derjenigen, die einen Vorfall gemeldet haben, zu respektieren.
## Durchsetzungsrichtlinien
Die Gemeinschaftsleitung wird sich bei der Bestimmung der Konsequenzen für
jede Handlung, die ihrer Ansicht nach gegen diesen Verhaltenskodex verstößt, an
diese Richtlinien über die Auswirkungen in der Gemeinschaft halten:
### 1. Berichtigung
**Auswirkungen in der Gemeinschaft**: Verwendung unangemessener Sprache oder
anderes Verhalten, das in der Gemeinschaft als unprofessionell oder unwillkommen
gilt.
**Folge**: Eine private, schriftliche Verwarnung der Gemeinschaftsleitung,
die Klarheit über die Art des Verstoßes und eine Erklärung dafür bietet, warum
das Verhalten unangemessen war. Eine öffentliche Entschuldigung kann verlangt
werden.
### 2. Verwarnung
**Auswirkungen in der Gemeinschaft**: Eine Verletzung durch einen einzelnen
Vorfall oder eine Reihe von Handlungen.
**Folge**: Eine Warnung mit Konsequenzen bei wiederholtem Fehlverhalten. Keine
Interaktion mit den beteiligten Personen, einschließlich unaufgeforderter
Interaktion mit denjenigen, die den Verhaltenskodex durchsetzen, für einen
bestimmten Zeitraum. Dazu gehört die Vermeidung von Interaktionen in
Gemeinschaftsräumen sowie in externen Kanälen wie sozialen Medien. Ein Verstoß
gegen diese Bedingungen kann zu einem vorübergehenden oder dauerhaften Verbot
führen.
### 3. Vorübergehender Ausschluss
**Auswirkungen in der Gemeinschaft**: Eine schwerwiegende Verletzung von
Gemeinschaftsstandards, einschließlich anhaltend unangemessenen Verhaltens.
**Folge**: Ein zeitlich begrenztes Verbot jeglicher Art von Interaktion oder
öffentlicher Kommunikation mit der Gemeinschaft. Während dieses Zeitraums ist
keine öffentliche oder private Interaktion mit den beteiligten Personen erlaubt.
Auch keine unaufgeforderte Interaktion mit denjenigen, die den Verhaltenskodex
durchsetzen. Ein Verstoß gegen diese Bedingungen kann zu einem dauerhaften
Verbot führen.
### 4. Dauerhafter Ausschluss
**Auswirkungen in der Gemeinschaft**: Aufzeigen eines Musters von Verletzungen
der Gemeinschaftsstandards, einschließlich anhaltend unangemessenen Verhaltens,
Belästigung einer Person oder Aggression gegen oder Herabsetzung von Gruppen von
Personen.
**Folge**: Ein dauerhaftes Verbot jeglicher Art von öffentlicher Interaktion
innerhalb der Gemeinschaft.
## Bezug
Dieser Verhaltenskodex basiert auf dem [Contributor Covenant][homepage],
Version 2.0, verfügbar unter
<https://www.contributor-covenant.org/de/version/2/0/code_of_conduct>
Community Impact Guidelines wurden von
[Mozillas Code of Conduct Enforcement Ladder][mozilla] inspiriert.
Antworten auf häufig gestellte Fragen zu diesem Verhaltenskodex finden Sie in
den häufig gestellten Fragen unter <https://www.contributor-covenant.org/faq>
(in Englisch). Andere Übersetzungen sind verfügbar unter
<https://www.contributor-covenant.org/translations>.
[homepage]: https://www.contributor-covenant.org
[mozilla]: https://github.com/mozilla/inclusion

View File

@ -1,135 +0,0 @@
+++
title="Code de conduite"
description="Convention de Code de conduite Contributeur⋅rices"
weight=10
chapter=false
+++
## Notre engagement
En tant que membres, contributeur·trice·s et dirigeant·e·s, nous nous
engageons à faire de la participation à notre communauté
une expérience sans harcèlement, quel que soit l'âge,
la taille corporelle, le handicap visible ou invisible, l'appartenance ethnique,
les caractéristiques sexuelles, l'identité et l'expression de genre,
le niveau d'expérience, l'éducation, le statut socio-économique,
la nationalité, l'apparence personnelle, la race, la religion,
ou l'identité et l'orientation sexuelle.
Nous nous engageons à agir et interagir de manière à contribuer à une communauté
ouverte, accueillante, diversifiée, inclusive et saine.
## Nos critères
Exemples de comportements qui contribuent à créer un environnement positif :
* Faire preuve d'empathie et de bienveillance envers les autres
* Être respectueux des opinions, points de vue et expériences divergents
* Donner et recevoir avec grâce les critiques constructives
* Assumer ses responsabilités et s'excuser auprès des personnes affectées par nos erreurs et apprendre de ces expériences
* Se concentrer sur ce qui est le meilleur non pas uniquement pour nous en tant qu'individu, mais aussi pour l'ensemble de la communauté
Exemples de comportements inacceptables :
* L'utilisation de langage ou d'images sexualisés et d'attentions ou d'avances sexuelles de toute nature
* Le _trolling_, les commentaires insultants ou désobligeants et les attaques
personnelles ou d'ordre politique
* Le harcèlement en public ou en privé
* La publication d'informations privées d'autrui, telle qu'une
adresse postale ou une adresse électronique, sans leur autorisation explicite
* Toute autre conduite qui pourrait raisonnablement être considérée comme inappropriée
dans un cadre professionnel
## Responsabilités d'application
Les dirigeant·e·s de la communauté sont chargé·e·s de clarifier et de faire respecter nos normes de
comportements acceptables et prendront des mesures correctives appropriées et équitables en
réponse à tout comportement qu'ils ou elles jugent inapproprié, menaçant, offensant ou nuisible.
Les dirigeant·e·s de la communauté ont le droit et la responsabilité de supprimer, modifier ou rejeter
les commentaires, les contributions, le code, les modifications de wikis, les rapports d'incidents ou de bogues et autres contributions qui
ne sont pas alignés sur ce code de conduite, et communiqueront les raisons des décisions de modération
le cas échéant.
## Portée d'application
Ce code de conduite s'applique à la fois au sein des espaces du projet ainsi que
dans les espaces publics lorsqu'un individu représente officiellement le projet ou sa
communauté. Font parties des exemples de représentation d'un projet ou d'une
communauté l'utilisation d'une adresse électronique officielle, la publication sur
les réseaux sociaux à l'aide d'un compte officiel ou le fait d'agir en tant que représentant·e désigné·e
lors d'un événement en ligne ou hors-ligne.
## Application
Les cas de comportements abusifs, harcelants ou tout autre comportement
inacceptables peuvent être signalés aux dirigeant·e·s de la communauté responsables de l'application du code de conduite à git.[at].john-livingston.fr.
Toutes les plaintes seront examinées et feront l'objet d'une enquête rapide et équitable.
Tou·te·s les dirigeant·e·s de la communauté sont tenu·e·s de respecter la vie privée et la sécurité des
personnes ayant signalé un incident.
## Directives d'application
Les dirigeant·e·s de communauté suivront ces directives d'application sur l'impact communautaire afin de déterminer
les conséquences de toute action qu'ils jugent contraire au présent code de conduite :
### 1. Correction
**Impact communautaire** : utilisation d'un langage inapproprié ou tout autre comportement jugé
non professionnel ou indésirable dans la communauté.
**Conséquence** : un avertissement écrit et privé de la part des dirigeant·e·s de la communauté, clarifiant
la nature du non-respect et expliquant pourquoi
le comportement était inapproprié. Des excuses publiques peuvent être demandées.
### 2. Avertissement
**Impact communautaire** : un non-respect par un seul incident ou une série d'actions.
**Conséquence** : un avertissement avec des conséquences dû à la poursuite du comportement.
Aucune interaction avec les personnes concernées, y compris l'interaction non sollicitée avec
celles et ceux qui sont chargé·e·s de l'application de ce code de conduite, pendant une période déterminée.
Cela comprend le fait d'éviter les interactions dans les espaces communautaires ainsi que sur les canaux externes
comme les médias sociaux. Le non-respect de ces conditions peut entraîner
un bannissement temporaire ou permanent.
### 3. Bannissement temporaire
**Impact communautaire** : un non-respect grave des normes communautaires, notamment
un comportement inapproprié soutenu.
**Conséquence** : un bannissement temporaire de toutes formes d'interactions ou de
communications avec la communauté pendant une période déterminée. Aucune interaction publique ou
privée avec les personnes concernées, y compris les interactions non sollicitées
avec celles et ceux qui appliquent ce code de conduite, n'est autorisée pendant cette période.
Le non-respect de ces conditions peut entraîner un bannissement permanent.
### 4. Bannissement permanent
**Impact communautaire** : démontrer un schéma récurrent de non-respect des normes de la
communauté y compris un comportement inapproprié soutenu, le harcèlement d'un individu
ainsi que l'agression ou le dénigrement de catégories d'individus.
**Conséquence** : un bannissement permanent de toutes formes d'interactions publiques au sein de
la communauté.
## Attributions
Ce code de conduite est adapté du
[Contributor Covenant](https://www.contributor-covenant.org), version 2.0,
disponible à
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
Les Directives d'application ont été inspirées par le
[Code of conduct enforcement ladder][Mozilla CoC] de Mozilla.
Pour obtenir des réponses aux questions courantes sur ce code de conduite, consultez la FAQ à
[https://www.contributor-covenant.org/faq][FAQ]. Les traductions sont disponibles
sur [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@ -1,91 +0,0 @@
+++
title="コントリビューター行動規範"
description="コントリビューター行動規範"
weight=10
chapter=false
+++
## 私たちの約束
メンバー、コントリビューター、およびリーダーとして、年齢、体の大きさ、目に見えるまたは目に見えない障害、民族性、性別、
性同一性、表現、経験のレベル、教育、社会経済的地位、国籍、人格、人種、宗教、または性的同一性と指向に関係なく、
コミュニティへの参加をハラスメントのない体験にすることを誓います。
私たちは、オープンで親しみやすく、多様で包括的で健全なコミュニティに貢献する方法で行動し、交流することを誓います。
## 私たちの標準
前向きな環境を作り上げることに貢献する行動の例:
* 他人への共感と優しさを示す
* 異なる意見、視点、経験を尊重する
* 建設的なフィードバックを与え、礼儀正しく受け入れる
* 私たちの過ちの影響を受けた人々に責任を受け入れ、謝罪し、そしてその経験から学ぶ
* 個人としてだけでなく、コミュニティ全体にとっても最善であることに焦点を当てる
許容できない行動の例は次のとおりです。
* 性的な言葉や画像の使用、および性的な注意またはその他あらゆる種類の問題行為
* トローリング、侮辱的または中傷的なコメント、個人的または政治的攻撃
* 公的またはプライベートの嫌がらせ
* 明示的な許可なしに、住所や電子メールアドレスなど、他者の個人情報を公開する
* 職業上不適切と合理的に考えられるその他の行為
## 執行責任
コミュニティリーダーは、許容される行動の基準を明確にし、実施する責任があり、不適切、脅迫的、攻撃的、または有害と見なされる行動に応じて、適切で公正な是正措置を講じます。
コミュニティリーダーは、コメント、コミット、コード、wikiの編集、問題、およびこの行動規範に沿っていないその他の貢献を削除、編集、または拒否する権利と責任を持ち、適切な場合はモデレーションの決定の理由を伝えます。
## 適用範囲
この行動規範は、すべてのコミュニティスペース内で適用され、個人がパブリックスペースでコミュニティを公式に代表している場合にも適用されます。
私たちのコミュニティを代表する例には、公式の電子メールアドレスの使用、公式のソーシャルメディアアカウントを介した投稿、オンラインまたはオフラインのイベントでの指定代理人としての行動などがあります。
## 執行
虐待的、嫌がらせ、またはその他の許容できない行動の事例は、執行を担当するコミュニティリーダーに対して git.[at].john-livingston.fr で報告される場合があります。
すべての苦情は迅速かつ公正にレビューおよび調査されます。
すべてのコミュニティリーダーは、問題の報告者のプライバシーとセキュリティを尊重する義務があります。
## 執行ガイドライン
コミュニティリーダーは、この行動規範に違反していると見なした行動への帰結を判断する際に、これらのコミュニティガイドラインに従います。
### 1. 更生
**コミュニティへの影響**: コミュニティで専門家にふさわしくない、または歓迎されないと思われる不適切な言葉の使用やその他の不適切な行動をすること。
**帰結**: コミュニティリーダーからの非公開の書面による警告。違反の理由を明確にし、行動が不適切だった理由を説明します。 公の謝罪が要求される場合があります。
### 2. 警告
**コミュニティへの影響**: 単一の出来事または一連の動作による違反。
**帰結**: 持続的な行動の結果を伴う警告。 指定された期間、行動規範の実施者との一方的な対話を含め、関係者との対話はありません。 これには、コミュニティスペースやソーシャルメディアなどの外部チャネルでの相互作用の回避が含まれます。 これらの条件に違反すると、一時的または永続的に禁止される場合があります。
### 3. 一時的な禁止
**コミュニティへの影響**: 持続的で不適切な行動を含む、コミュニティ標準の重大な違反。
**帰結**: 指定された期間のコミュニティとのあらゆる種類の相互関係または公的なコミュニケーションの一時的な禁止。 この期間中、行動規範を実施する人々との一方的な対話を含め、関係する人々との公的または私的な対話は許可されません。
これらの条件に違反すると、永久的に禁止される場合があります。
### 4. 永久的な禁止
**コミュニティへの影響**: 連続的な不適切な行動、個人への嫌がらせ、または個人の集団に対する攻撃または名誉毀損を含む、コミュニティの標準への違反のパターンを示す。
**帰結**: コミュニティ内でのあらゆる種類の公的な相互関係の永久的な禁止。
## 帰属
この行動規範は、https://www.contributor-covenant.org/version/2/0/code_of_conduct.html で利用可能な [Contributor Covenant][homepage] バージョン2.0を基に作成されています。
コミュニティへの影響ガイドラインは[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity)に適合しています。
[homepage]: https://www.contributor-covenant.org
この行動規範に関する一般的な質問への回答については、https://www.contributor-covenant.org/faq のFAQを参照してください。翻訳はhttps://www.contributor-covenant.org/translations で入手できます。

View File

@ -1,134 +0,0 @@
+++
title="Entwickeln"
description="Entwickeln"
weight=40
chapter=false
+++
Sprechen Sie immer über die Funktionen, die Sie entwickeln wollen, indem Sie das Issue, das Ihr Problem behandelt, erstellen/finden und kommentieren bevor Sie mit der Arbeit daran beginnen und informieren Sie die Gemeinschaft darüber, dass Sie mit der Programmierung beginnen, indem Sie das Thema für sich beanspruchen.
Bitte benutzen Sie den `main` Zweig.
{{% notice note %}}
Until march 2023, contribution were made on the `develop` branch. This procedure is now deprecated.
{{% /notice %}}
Voraussetzung für die Erstellung dieses Plugins:
- Sie müssen `npm` installiert haben
- Sie müssen python venv installiert haben (z.B. das Paket `python3-venv` auf Debian)
Um das Repository zu klonen:
```bash
# Clone the repository
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git
# Checkout the main branch
git checkout main
# Initialize the submodules. This command must be run again if any submodules' version changes.
git submodule update --init --recursive
# Install NPM dependencies and build the module for the first time:
npm install
# Build the plugin after a modification:
npm run build
# If you have a fork from the repository, add it as remote (example):
git remote add me git@github.com:MY_GITHUB_ACCOUNT/peertube-plugin-livechat.git
# Create a local branch for you developments, and checkout it (example):
git checkout my_development # Note: if an issue is associated, use fix_1234 as your branch name (where 1234 is the issue's number)
# To propose your modifications, push your branch to your repository (example):
git push --set-upstream me my_development
# Then go to your github repository with your web browser to propose the Pull Request (see additional instructions below)
```
Sobald Sie bereit sind, Ihren Code zu zeigen und um Feedback zu bitten, reichen Sie einen *Entwurf* für einen Pull Request ein.
Sobald Sie bereit für eine Codeüberprüfung vor der Zusammenführung sind, reichen Sie einen Pull Request ein. In jedem Fall sollten Sie Ihren PR mit dem Problem, die er behebt, verlinken, indem Sie die GitHub-Syntax verwenden: "fixes #issue_number".
Der Front-End-Code befindet sich im Ordner `client`, der Back-End-Code im Ordner `server`. Es gibt einige gemeinsam genutzte Codes im `shared` Ordner.
Für allgemeine Anweisungen (Entwicklung von Plugins, Erstellung, Installation, ...), lesen Sie bitte die [Peertube Dokumentation](https://docs.joinpeertube.org/contribute-plugins?id=write-a-plugintheme).
Sie können das Plugin mit zusätzlichen Debug-Funktionen bauen, indem Sie es einfach benutzen:
```bash
NODE_ENV=dev npm run build
```
## ESBuild vs Typescript
Dieses Plugin verwendet ESBuild für die Generierung von Frontend-Code, wie das offizielle `peertube-plugin-quickstart` Plugin.
ESBuild kann mit Typescript umgehen, prüft aber keine Typen
(siehe [ESBuild-Dokumentation](https://esbuild.github.io/content-types/#typescript)).
Deshalb kompilieren wir Typescript zuerst mit der Option `-noEmit`, nur um die Typen zu überprüfen (`check:client:ts` in der package.json Datei).
Dann, wenn alles in Ordnung ist, führen wir ESBuild aus, um das kompilierte Javascript zu erzeugen.
## Debug Mode
There is a debug mode for this plugin, that shorten some delay.
For example, some log files will rotate every two minutes, instead of once per day.
This permit to test more easily certain actions, for which it could normally take hours or days to wait.
To enable this mode, you juste have to create the
`/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/debug_mode` file
(replacing `/var/www/peertube/storage/` by the correct path on your installation).
The simple existence of this file is sufficient to trigger the debug mode.
To make sure it's taken into account, you can restart your Peertube instance.
This file can contain some JSON to enable more advanced options.
To have a list of existing parameters, check `server/lib/debug.ts`.
Restart Peertube after each content modification.
{{% notice warning %}}
Don't enable this mode on a production server, neither on a public server.
This could cause security issues.
{{% /notice %}}
### Restart Prosody
When debug mode is enabled, you can restart Prosody using this API call:
`http://your_instance.tld/plugins/livechat/router/api/restart_prosody`.
This call don't need any authentificaiton.
It can be done from a command line, for example using
`curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody`.
### Prosody debugger
It is possible to connect the Prosody AppImage to a remote debugger using [MobDebug](https://luarocks.org/modules/paulclinger/mobdebug).
To do so, you have to setup MobDebug in a folder that can be accessed by the `peertube` user.
Then, add this in the `debub_mode` file:
```json
{
"debug_prosody": {
"debugger_path": "/the_path_to_mobdebug/src",
"host": "localhost",
"port": "8172"
}
}
```
`host` and `port` are optional. `debugger_path` must point to the folder where the `MobDebug` `.lua` file is.
Restart Peertube.
Start your debugger server.
For Prosody to connect to the debugger, call the API
`http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.
This call does not need any authentication.
It can be done from a command line, for example with
`curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.
You can even configure your debug server to launch this request automatically.
Prosody will then restart, connecting to the debugger.
## Quick dev environment using Docker
There is a tutorial, in french, on the
[le Peertube forum](https://framacolibri.org/t/tutoriel-creer-un-environnement-de-developpement-de-plugin-peertube-rapidement-en-utilisant-docker-et-qui-permet-de-tester-la-federation/17631)
that explains how to quickly build a dev env using Docker.

View File

@ -1,143 +0,0 @@
+++
title="Développer"
description="Développer et proposer des modifications de code"
weight=40
chapter=false
+++
Toujours annoncer les fonctionnalités sur lesquelles vous voulez travailler en créant un ticket ou en commentant un ticket existant, avant de commencer à travailler dessus. Et annoncez clairement à la communauté que vous commencez à travailler dessus. Ceci afin d'éviter que plusieurs personnes travaillent sur la même chose et entrent en conflit.
Les Pull Request sont à faire sur la branche `main`.
{{% notice note %}}
Jusqu'à mars 2023, il fallait contribuer sur la branche `develop`. Cette procédure est désormais obsolète.
{{% /notice %}}
Pré-requis pour compiler le plugin:
- vous devez avoir installé `npm`
- vous devez avoir installé les venv python (paquet `python3-venv` sous Debian par exemple)
Pour clôner le dépot :
```bash
# Cloner le dépot
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git
# Passer sur la branche main si ce n'est pas déjà le cas
git checkout main
# Initialiser les sous-modules. Cette commande est à refaire si jamais la version d'un l'un des sous-module change.
git submodule update --init --recursive
# Installer les dépendances NPM et compiler le plugin pour la première fois :
npm install
# Compiler le plugin après une modification :
npm run build
# Si vous avez un fork du dépot, ajoutez le en remote (exemple) :
git remote add me git@github.com:MON_COMPTE_GITHUB/peertube-plugin-livechat.git
# Créez une branche locale pour vos développements et placez vous dessus (exemple) :
git checkout mon_developpement # NB: si un ticket y est associé, utilisé le nom fix_1234 (où 1234 est le numéro du ticket)
# Pour proposer vos modifications, poussez votre branche sur votre dépot (exemple) :
git push --set-upstream me mon_developpement
# Rendez-vous ensuite sur votre dépot github avec votre navigateur web pour proposer la Pull Request (voir les instructions complémentaires ci-dessous)
```
Quand vous êtes prêt⋅e à montrer votre code pour avoir un retour, soumettez une Pull Request *draft*.
Quand vous êtes prêt⋅e pour une relecture de code avant merge, soumettez une Pull Request. Dans tous les cas, merci de lier votre Pull Request au ticket concerné en utilisant la syntax de GitHub : «fixes #issue_number».
Le code du front-end est dans le dossier `client`. Le code backend dans `server`. Il y a du code partagé entre les deux dans `shared`.
Pour les instructions génériques concernant le développement de plugins (building, installation, ...), merci de vous référer à la [documentation Peertube](https://docs.joinpeertube.org/contribute-plugins?id=write-a-plugintheme).
Vous pouvez *builder* le plugin avec des infos de debug supplémentaires en utilisant :
```bash
NODE_ENV=dev npm run build
```
## ESBuild vs Typescript
Ce plugin utilise ESBuild pour compiler le code front-end, comme le plugin `peertube-plugin-quickstart` officiel.
ESBuild peut gérer Typescript, mais ne vérifie pas les types
(voir [la documentation ESBuild](https://esbuild.github.io/content-types/#typescript)).
C'est pourquoi on compile d'abord Typescript avec l'option `-noEmit`, juste pour vérifier les types (`check:client:ts` dans le fichier package.json).
Ensuite, si tout est ok, on lance ESBuild pour générer le javascript compilé.
## Debug Mode
Il existe un mode de debug pour le plugin, qui va raccourcir le délais de certaines actions.
Par exemple, il va faire tourner les journaux toutes les deux minutes, au lieu de tous les jours.
Cela permet de tester plus facilement certaines actions, pour lesquelles il faudrait normalement attendre
des heures ou des jours.
Pour activer ce mode, il suffit de créer un fichier
`/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/debug_mode`
(en adaptant `/var/www/peertube/storage/` à votre installation le cas échéant).
La simple existance de ce fichier suffit à déclencher le mode debug.
Pour être sûr qu'il est pris en compte, vous pouvez redémarrer votre instance Peertube.
Ce fichier peut également contenir du JSON qui pourra activer d'autres options.
Pour en avoir la liste, vous pouvez regarder le code de `server/lib/debug.ts`.
Redémarrez Peertube après chaque modification de son contenu.
{{% notice warning %}}
N'activer jamais ce mode sur un serveur de production, ni même sur un serveur public.
Cela pourrait poser des problèmes de sécurité.
{{% /notice %}}
### Redémarrer Prosody
Pour redémarrer Prosody quand le mode debug est activé, vous pouvez appeler l'API
`http://votre_instance.tld/plugins/livechat/router/api/restart_prosody`.
Cet appel n'a pas besoin d'authentification.
Il peut se faire depuis une ligne de commande, par exemple avec
`curl http://votre_instance.tld/plugins/livechat/router/api/restart_prosody`.
### Prosody debugger
Il est possible de connecter l'AppImage Prosody à un debugger distant en utilisant
[MobDebug](https://luarocks.org/modules/paulclinger/mobdebug).
Pour cela, placer MobDebug dans un dossier accessible par le user `peertube`.
Ensuite, ajouter cela dans le fichier `debug_mode` du plugin:
```json
{
"debug_prosody": {
"debugger_path": "/the_path_to_mobdebug/src",
"host": "localhost",
"port": "8172"
}
}
```
`host` et `port` sont optionnels. `debugger_path` doit pointer vers le dossier où
se trouve le fichier `.lua` de `MobDebug`.
Redémarrer Peertube.
Lancer votre serveur de debug.
Pour que Prosody se connecte au debugger, appelez l'API
`http://votre_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.
Cet appel n'a pas besoin d'authentification.
Il peut se faire depuis une ligne de commande, par exemple avec
`curl http://votre_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.
Vous pouvez même configurer votre serveur de debuggage pour lancer cette commande
automatiquement.
Prosody va alors redémarrer en se connectant au debugger.
## Environnement de développement rapide via Docker
Un tutoriel est disponible sur [le forum Peertube](https://framacolibri.org/t/tutoriel-creer-un-environnement-de-developpement-de-plugin-peertube-rapidement-en-utilisant-docker-et-qui-permet-de-tester-la-federation/17631)
pour expliquer comment monter rapidement un environnement de développement en utilisant Docker.
Un dépot a été crée sur la base de ce tutoriel: https://codeberg.org/mose/pt-plugin-dev
Note: pour une raison obscure, Prosody n'arrive pas à résoudre les adresses DNS des conteneurs quand la librairie
lua-unbound est utilisée. Pour contourner cela, il y a un «dirty hack»: il suffit de créer une fichier
`/data/plugins/data/peertube-plugin-livechat/no_lua_unbound` dans vos docker-volumes, puis de les redémarrer.

View File

@ -1,10 +0,0 @@
+++
title="Develop"
description="Develop"
weight=40
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,64 +0,0 @@
+++
title="Dokumentation"
description="Dokumentieren Sie das Plugin, oder übersetzen Sie die Dokumentation."
weight=50
chapter=false
+++
## Allgemeine Informationen
Informieren Sie die Community immer vor der Arbeit (indem Sie ein neues Problem erstellen oder ein bestehendes kommentieren). Damit soll vermieden werden, dass zwei Personen
an der gleichen Sache arbeiten, und Konflikte zu verhindern.
Bitte benutzen Sie den `main`-Zweig.
Der Quellcode der Dokumentation befindet sich im Ordner `support/documentation/content`.
Die Dokumentation wird mit [Hugo](https://gohugo.io/) erstellt.
Sie müssen es auf Ihrem Computer installieren, wenn Sie eine Vorschau Ihrer Arbeit sehen wollen.
Das verwendete Thema ist [hugo-theme-learn](https://learn.netlify.app/).
Sie sollten dessen Dokumentation lesen, bevor Sie mit der Bearbeitung der Dokumentation beginnen.
When a new plugin version is released, or when documentation is updated,
plugin maintainers will merge the `main` branch to the `documentation` branche.
This will trigger github and gitlab pipelines, and update published documentation.
## Übersätzungen
Die Hauptsprache ist Englisch (Code `en`).
Die verschiedenen Übersetzungen der gleichen Datei stehen nebeneinander im Verzeichnis und sind durch einen Sprachcode in der Dateinamenerweiterung gekennzeichnet.
Beispiel: `_index.fr.md` ist die französische Übersetzung von `_index.en.md`.
Bitte beachten Sie, dass eine fehlende Übersetzungsdatei nicht in den Menüs der generierten Website erscheint.
**Stellen Sie sicher, dass Sie immer alle Dateien für die Sprachen erstellen**, auch wenn die Übersetzung noch nicht verfügbar ist.
Dafür gibt es ein Skript `doc-generate-missing-translations.sh` im Stammverzeichnis des Projektes. Wenn Sie eine neue Datei hinzufügen, müssen Sie nur die englische Version erstellen und dann dieses Skript ausführen. Es erstellt alle fehlenden Übersetzungen und fügt eine Beispielmeldung hinzu, die den Benutzer auffordert, die englische Version zu lesen.
## Eine neue Sprache hinzufügen
Kopieren und ändern Sie den Abschnitt `[Languages.fr]` in der Datei `support/documentation/config.toml`.
Führen Sie dann das Skript `doc-generate-missing-translations.sh` aus.
Es wird alle fehlenden Dateien erstellen.
Dann können Sie sie eine Datei nach der anderen übersetzen.
Wenn die Übersetzungen nicht vollständig sind, macht das nichts, die generierten Dateien zeigen eine Meldung an, die vorschlägt, die Sprache zu ändern.
## Vorschau
Um eine Vorschau Ihrer Änderungen zu sehen, führen Sie einfach diesen Befehl aus:
```bash
hugo serve -s support/documentation/
```
Öffnen Sie dann Ihren Browser und gehen Sie auf die Adresse
[http://localhost:1313/peertube-plugin-livechat/](http://localhost:1313/peertube-plugin-livechat/).
Diese Seite wird bei jeder Änderung automatisch aktualisiert.
## Veröffentlichung
Die Veröffentlichung der Dokumentation erfolgt automatisch, sobald die Änderungen in den `main` Zweig eingefügt wurden.

View File

@ -1,65 +0,0 @@
+++
title="Documentation"
description="Document the plugin, or translate the documentation."
weight=50
chapter=false
+++
## General information
Always inform the community before working (by creating a new issue, or commenting an existing one). This is to avoid that two persons are
working on the same thing, and prevent conflicts.
Documentation work has to be merged in the `main` branch.
The documentation source code is in the `support/documentation/content` folder.
The documentation is generated using [Hugo](https://gohugo.io/).
You have to install it on your computer if you want to preview your work.
The used theme is [hugo-theme-learn](https://learn.netlify.app/).
You should read its documentation before starting editing the documentation.
When a new plugin version is released, or when documentation is updated,
plugin maintainers will merge the `main` branch to the `documentation` branche.
This will trigger github and gitlab pipelines, and update published documentation.
## Translations
The principal language is english (`en` code).
The different translations of the same file are side by side in the
tree, and are identified by a language code in the file name extension.
Example: `_index.fr.md` is the French translation of `_index.en.md`.
Please note that a missing translation file will not appear in the menus of the generated site.
**Always make sure to create files for all languages**, even if the translation is not yet available.
For this, there is a script `doc-generate-missing-translations.sh` in the root of the repository. When you add a new file, you just have to create the english version, then run this script. It will create all missing translations, putting a sample message inviting the user to read the english version.
## Add a new language
In the `support/documentation/config.toml` file, please copy and modify the `[Languages.fr]` section.
Then, run the `doc-generate-missing-translations.sh` script.
It will create all the missing files.
Then you can translate them one by one.
If the translations are not complete, it does not matter, the generated files will display a message suggesting to change the language.
## Preview
To preview your modifications, just run:
```bash
hugo serve -s support/documentation/
```
Then open your browser on the address
[http://localhost:1313/peertube-plugin-livechat/](http://localhost:1313/peertube-plugin-livechat/).
This page will automatically refresh on each modification.
## Publication
Publishing the documentation is automatic, as soon as the changes are merged into the `main' branch.

View File

@ -1,78 +0,0 @@
+++
title="Documenter"
description="Documenter le plugin, ou traduire la documentation."
weight=50
chapter=false
+++
## Généralités
Toujours vous annoncer avant de commencer à travailler (en créant un ticket ou
en commentant un ticket existant). Ceci afin d'éviter que plusieurs personnes
travaillent sur la même chose et entrent en conflit.
Le travail de documentation se fait sur la branche `main`.
Le code source de la documentation se trouve dans le dossier
`support/documentation/content` du dépot de code.
La documentation est générée via l'outils [Hugo](https://gohugo.io/).
Celui-ci doit être installé sur votre machine pour pouvoir prévisualiser la
documentation.
Le thème utilisé est [hugo-theme-learn](https://learn.netlify.app/).
Il est recommandé d'en lire la documentation avant de commencer.
Quand une version du plugin est publiée, ou quand la documentation est mise
à jour, les mainteneur⋅euses du plugin fusionnerons la branche `main` dans
la branche `documentation`, ce qui aura pour effet de déclencher les pipelines
github et gitlab pour mettre à jour les versions publiées.
## Traductions
La langue principale est l'anglais (code `en`).
Les différentes traductions d'un même fichier sont côte-à-côte dans
l'arborescence, et sont identifiées par un code langue dans l'extension du
nom de fichier. Exemple: `_index.fr.md` est la tranduction française de
`_index.en.md`.
Attention, un fichier de traduction manquant n'apparaitra pas dans les menus
du site générés.
**On veillera donc toujours à créer les fichiers pour toutes les langues**, même
si la traduction n'est pas encore disponible.
Pour cela, il y a un script `doc-generate-missing-translations.sh` à la racine
du dépot. Quand on ajoute un nouveau fichier, il suffit de créer la version
anglaise, puis de lancer ce script. Il va créer toutes les traductions
manquantes, on y mettant un message type invitant l'utilisateur⋅rice à lire la
version anglaise.
## Ajout d'une nouvelle langue
Dans le fichier `support/documentation/config.toml`, inspirez vous de la
section `[Languages.fr]` pour déclarer la nouvelle langue.
Ensuite, lancez le script `doc-generate-missing-translations.sh` à la racine
du dépot. Celui-ci crééra tous les fichiers manquants pour la nouvelle langue.
Il ne vous reste plus qu'à les traduire.
Si les traductions ne sont pas complètes, ce n'est pas grave, les fichiers
générés afficherons un message proposant de changer de langue.
## Prévisualiser
Pour prévisualiser vos modification, il suffit de lancer:
```bash
hugo serve -s support/documentation/
```
Puis d'ouvrir votre navigateur à l'adresse
[http://localhost:1313/peertube-plugin-livechat/](http://localhost:1313/peertube-plugin-livechat/).
Cette page se raffraichira automatiquement à chaque modification.
## Publication
La publication de la documentation est automatique, dès que les modifications
sont fusionnées dans la branche `main`.

View File

@ -1,10 +0,0 @@
+++
title="Document"
description="Documenter the plugin, or translate the documentation."
weight=50
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,11 +0,0 @@
+++
title="Feedback"
description="Gib dein Feedback"
weight=30
chapter=false
+++
Sie müssen keine Programmierkenntnisse haben, um zu diesem Plugin beizutragen! Andere
Beiträge sind auch sehr wertvoll, darunter:
Sie können die Software testen und Fehler melden, Sie können Feedback geben, Funktionen die Sie
interessieren, Benutzeroberfläche, Design, ...

View File

@ -1,11 +0,0 @@
+++
title="Give your feedback"
description="Give your feedback"
weight=30
chapter=false
+++
You don't need to know how to code to start contributing to this plugin! Other
contributions are very valuable too, among which: you can test the software and
report bugs, you can give feedback, features that you are
interested in, user interface, design, ...

View File

@ -1,9 +0,0 @@
+++
title="Donnez vos retours"
description="Donnez vos retours"
weight=30
chapter=false
+++
Vous n'avez pas besoin de coder pour commencer à contribuer à ce plugin !
Les autres formes de contributions sont également précieuses, parmis lesquelles : vous pouvez tester le plugin et remonter les bugs que vous rencontrez, partager vos retours d'expérience, proposer des fonctionnalités qui vous intéressent, remonter vos remarques sur l'interface, le design, etc.

View File

@ -1,10 +0,0 @@
+++
title="Give your feedback"
description="Give your feedback"
weight=30
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="Übersätzen"
description="Das Plugin übersätzen"
weight=20
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,88 +0,0 @@
+++
title="Traduction"
description="Traduire le plugin"
weight=20
chapter=false
+++
Vous pouvez contribuer à la traduction de ce plugin Peertube.
Les traductions sont gérées par le logiciel [Weblate](https://weblate.org/),
via [l'instance Weblate de Framasoft](https://weblate.framasoft.org/).
{{% notice warning %}}
Ne modifiez jamais directement les fichiers dans le dossier `languages` du plugin,
vous risqueriez de créer des conflits.
{{% /notice %}}
## Comment faire
* Créez-vous un compte: https://weblate.framasoft.org/accounts/register/
* Validez votre email en cliquant sur le lien reçu
* Choisissez votre mot de passe, et configurez votre compte
* Allez sur le projet du plugin de tchat: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/
* Choisissez la langue que vous voulez traduire
* Il ne vous reste plus qu'à ajouter les traductions manquantes, ou corriger celles qui vous semblent erronées.
{{% notice warning %}}
Il peut y avoir des chaînes «assez techniques».
Si vous n'êtes pas sûr⋅e à 100% du sens, ou de la traduction,
il vaut mieux ne pas la traduire du tout ;
ainsi la version anglaise s'affichera.
{{% /notice %}}
## Traduction de la documentation
Pour l'instant, cela n'est pas encore géré dans Weblate. Je suis encore à la recherche de la bonne
solution technique.
Voir la page de documentation dédiée à la documentation.
## Ajout d'une nouvelle langue
Si la langue qui vous intéresse n'est pas présente, assurez-vous d'abord qu'elle est bien supportée par Peertube.
Si c'est le cas, vous pouvez [ouvrir un ticket](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues)
pour en demander l'ajout.
## Ajout de nouveau segment / utilisation dans le code
Si vous travaillez sur une nouvelle fonctionnalité, et que vous avez besoin de nouveaux segments,
créez les directement dans Weblate.
La version anglaise est obligatoire, commencez par celle-ci.
Chaque segment est lié à une clé (par exemple `use_chat`).
Choisissez une clé en anglais, suffisamment explicite, et en minuscule.
Si vous avez besoin de tester vos localisations sans attendre la fusion venant de Weblate,
vous pouvez modifier les fichiers `languages/*.yml`, mais évitez de les commit
(pour minimiser le risque de conflits).
### Utiliser un segment dans le code front-end
Avant d'utiliser une chaîne en front-end, il faut déclarer une nouvelle constante dans `client/@types/global.d.ts`.
La constante doit :
* commencer par le préfixe "LOC_"
* utiliser la clé de la chaîne, en majuscule
* vous ne devez déclarer que son type, pas sa valeur
Par exemple, pour utiliser "use_chat", vous devez déclarer :
e, to use "use_chat", you have to declare:
```typescript
declare const LOC_USE_CHAT: string
```
Le script `build-client.js` va lire ce fichier `client/@types/global.d.ts`, chercher pour de telles constantes, et charger leurs valeurs depuis le fichier de langue.
Vous pouvez maintenant utiliser `peertubeHelpers.translate(LOC_USE_CHAT)` dans votre code.
### Utiliser un segment dans le code back-end
En théorie, les seules parties du code qui ont besoin de traductions sont les déclarations de paramètres et la génération de données standardisées (ActivityPub, RSS, ...).
Ici on a besoin de récupérer les chaînes anglaises à partir des clés de traduction.
Note: vous ne devriez jamais avoir besoin d'autres langues que l'anglais pour le code backend.
Les traductions doivent se faire coté front-end.
Il y a un module `lib/loc.ts` qui fourni une function `loc()`.
Passez juste la clé pour récupérer la phrase anglaise: `loc('diagnostic')`.

View File

@ -1,10 +0,0 @@
+++
title="Translate"
description="Translate the plugin"
weight=20
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,24 +0,0 @@
+++
title="Impressum"
description="Impressum des Plugins"
weight=90
chapter=false
+++
[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json),
[COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md)
and [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE)
Dateien beinhalten die Lizenzinformationen für dieses Programm und seiner Abhängigkeiten.
Das Plugin wird von [John Livingston](https://www.john-livingston.fr/) betrieben.
Dank an David Revoy für seine Arbeit an dem Peertube Maskottchen, [Sepia](https://www.davidrevoy.com/index.php?tag/peertube).
Das Charakterdesign steht unter CC-By-Lizenz, und die SVG-Dateien, die zur Erstellung einiger Logos und Avatare in diesem Plugin verwendet werden, sind GPLv3.0.
Vielen Dank an [Framasoft](https://framasoft.org)für die Ermöglichung von [Peertube](https://joinpeertube.org/), für die finanzielle Unterstützung, und für das [Weblate](https://weblate.framasoft.org).
Vielen Dank an [ritimo](https://www.ritimo.org/) für die finanzielle Unterstützung.
Vielen Dank an [Code Lutin](https://www.codelutin.com/) und [Rétribution Copie Publique](https://copiepublique.fr/) für die finanzielle Unterstützung.
Vielen Dank an [NlNet](https://nlnet.nl/) und die [NGI0 Entrust fund](https://nlnet.nl/entrust/) für die finanzielle Unterstützung.

View File

@ -1,25 +0,0 @@
+++
title="Crédits"
description="Crédits pour le plugin"
weight=90
chapter=false
+++
Les fichiers
[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json),
[COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md)
et [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE)
contiennent les informations sur la licence du présent logiciel (en anglais).
Le plugin est maintenu par [John Livingston](https://www.john-livingston.fr/).
Merci à David Revoy pour son travail sur la mascotte de Peertube, [Sepia](https://www.davidrevoy.com/index.php?tag/peertube).
Le character design est en licence CC-By, et les fichiers SVG utilisés pour créer certains logos et avatars en GPLv3.0.
Merci à [Framasoft](https://framasoft.org) pour avoir rendu [Peertube](https://joinpeertube.org/) possible, pour le support financier, et pour héberger les traductions du projet sur [leur instance Weblate](https://weblate.framasoft.org).
Merci à [ritimo](https://www.ritimo.org/) pour le support financier.
Merci à [Code Lutin](https://www.codelutin.com/) et à la [Rétribution Copie Publique](https://copiepublique.fr) pour le support financier.
Merci à [NlNet](https://nlnet.nl/) et au [fond NGI0 Entrust](https://nlnet.nl/entrust/) pour le support financier.

View File

@ -1,24 +0,0 @@
+++
title="クレジット"
description="クレジット"
weight=90
chapter=false
+++
[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json)、
[COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md)
と [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE)
ファイルには、このソフトウェアと使用しているライブラリなどのライセンス情報が含まれています。
The plugin is maintained by [John Livingston](https://www.john-livingston.fr/).
Peertubeのマスコット[Sepia](https://www.davidrevoy.com/index.php?tag/peertube)を制作してくださったDavid Revoy氏に感謝致します。
キャラクターデザインは、CC-Byライセンスであり、本プラグインの一部のロゴとアバターを作成する為に使用されているSVGファイルはGPLv3.0です。
[Peertube](https://joinpeertube.org/)を実現し、また経済的な支援も行っている[Framasoft](https://framasoft.org)に感謝致します。
経済的な支援を行って頂いている[ritimo](https://www.ritimo.org/)に感謝致します。
経済的な支援を行って頂いている[Code Lutin](https://www.codelutin.com/)/[Rétribution Copie Publique](https://copiepublique.fr/)に感謝致します。
経済的な支援を行って頂いている[NlNet](https://nlnet.nl/)/[NGI0 Entrust fund](https://nlnet.nl/entrust/)(https://copiepublique.fr/)に感謝致します。

View File

@ -1,8 +0,0 @@
+++
title="Dokumentation"
description="Plugin Dokumentation"
weight=10
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Documentation"
description="Plugin documentation"
weight=10
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Documentation"
description="Documentation du plugin"
weight=10
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="ドキュメンテーション"
description="ドキュメンテーション"
weight=10
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Admin Dokumentation"
description="Plugin Peertube Livechat Administration"
weight=30
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Admin documentation"
description="Plugin Peertube Livechat administration"
weight=30
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Admin documentation"
description="Plugin Peertube Livechat administration"
weight=30
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Admin documentation"
description="Plugin Peertube Livechat administration"
weight=30
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Fortgeschrittene Nutzung"
description="Einige erweiterte Funktionen"
weight=20
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Advanced usage"
description="Some advanced features"
weight=20
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Advanced usage"
description="Some advanced features"
weight=20
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Advanced usage"
description="Some advanced features"
weight=20
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Matterbridge benutzen"
description="Matterbridge als Brücke zu anderen Chats nutzen"
weight=50
chapter=false
+++
Hier ist ein Tutorial um Matterbridge mit diesem Plugin zu benutzen (nur auf englisch): <https://gitlab.com/refrac/obs-matterbridge-overlay/-/blob/master/documentation/peertube.md>

View File

@ -1,10 +0,0 @@
+++
title="Using Matterbridge"
description="Using Matterbridge to bridge with other chats"
weight=50
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="Using Matterbridge"
description="Using Matterbridge to bridge with other chats"
weight=50
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="Allow connection using XMPP clients"
description="Allow connections using external XMPP accounts and XMPP clients"
weight=30
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,216 +0,0 @@
+++
title="Clients XMPP"
description="Autoriser la connexion en utilisant des clients XMPP."
weight=30
chapter=false
+++
Ce module de tchat repose sur le protocole XMPP, aussi connu sous le nom de Jabber.
Il est donc possible de se connecter aux tchats en utilisant des
[logiciels clients XMPP](https://fr.wikipedia.org/wiki/Clients_XMPP).
Cela peut par exemple être utile pour faciliter les opérations de modération.
Pour la documentation utilisateur⋅rice associé à ces fonctionnalités, veuillez
vous référer à la page [de documentation utilisateur⋅rice](/peertube-plugin-livechat/fr/documentation/user/xmpp_clients/).
{{% notice info %}}
L'activation de ces fonctionnalités demande des changements de configuration
sur le serveur, et sur les enregistrements DNS. Il n'est pas possible de les
activer uniquement depuis l'interface de Peertube, et cela demande d'avoir
quelques compétences basiques d'admin système.
{{% /notice %}}
## Connexion à votre compte Peertube
{{% notice warning %}}
Cette fonctionnalité n'est pas encore disponible, et viendra dans une
prochaine version du plugin.
{{% /notice %}}
## Connexion en utilisant un compte XMPP externe
Pour activer cette fonctionnalité, il va falloir paraméter votre serveur et vos
enregistrements DNS, de sorte que les clients XMPP puissent trouver et accéder
au serveur [Prosody](https://prosody.im) que ce plugin utilise en interne.
### Paramètres du plugin
Commencez par aller dans les paramètres du plugin livechat de votre instance,
puis activez le paramètre «Autoriser les connexions aux salons via des comptes XMPP externes».
En cochant celui-ci, de nouveaux champs apparaissent en dessous.
Tout d'abord, le champs «Port Prosody serveur vers serveur». Celui-ci prend par
défaut la valeur 5269, qui est le port standard pour ce service.
Vous pouvez toutefois changer pour un autre port, si celui-ci est déjà utilisé
sur votre serveur.
Ensuite, le champs «Interfaces réseau pour les connexions serveur vers serveur»
vous permet d'indiquer sur quelles interfaces réseau le serveur doit écouter.
La valeur par défaut «*, ::» indique d'écouter sur toutes les addresses IP.
Vous pouvez changer ces valeurs, si vous souhaiter n'écouter que sur certaines
IP. La syntaxe est expliquée à coté du champs.
Pour le champs «Dossiers des certificats», vous pouvez le laisser vide.
Dans ce cas là, le plugin va générer automatiquement des certificats auto-signés.
Il se pourrait que certains serveurs XMPP refusent de se connecter, cela dépendant
de leur paramétrage.
Dans ce cas, vous pouvez indiquer ici un chemin sur le serveur, dans lequel vous
placerez des certificats à utiliser par le module.
Charge à vous de les générer et de les renouveller.
Voir plus loin pour une explication plus détaillée.
### Pare-feu
Vous devez ouvrir le port configuré (5269 par défaut) sur votre pare-feu.
Si vous utilisez Docker pour votre Peertube, il faut modifier le fichier
`docker-compose.yml` pour ouvrir le port 5269 du conteneur `peertube` au
monde extérieur.
### DNS
Vous devez ajouter un [enregistrement DNS](https://prosody.im/doc/dns) permettant
aux serveurs distant de trouver le composant «room.votre_instance.tld».
Le plus simple pour cela est d'ajouter un enregistrement SRV pour le
[sous-domaine](https://prosody.im/doc/dns#subdomains) «room»:
* nom de l'enregistrement: _xmpp-server._tcp.room.votre_instance.tld. (remplacez «votre_instance.tld» par la valeur adéquate)
* TTL: 3600
* class: IN
* SRV: 0
* priority: 0
* weight: 5
* port: 5269 (adaptez si vous avez changé le port)
* target: votre_instance.tld. (remplacez par la valeur adéquate)
Attention à bien conserver le point après «votre_instance.tld».
En utilisant la commande `dig` pour vérifier votre enregistrement,
vous devriez obtenir un résultat similaire à celui-ci:
```bash
$ dig +short _xmpp-server._tcp.room.videos.john-livingston.fr. SRV
0 5 5269 videos.john-livingston.fr.
```
Si vous **n'utilisez pas le port standard `5269`**, vous devez ajouter un autre enregistrement SRV pour
`_xmpp-server._tcp.votre_instance.tld.` (pareil que précédemment, mais en enlevant le préfixe `room.`).
Bien sûr, vous pouvez l'ajouter même si vous utilisez le port standard. Cela fonctionnera également.
### Utilisation de certificats de confiance
Les certificats auto-signés que le plugin utilise par défaut peuvent ne pas convenir à tous les serveurs distants.
En effet, ceux-ci peuvent les refuser pour raison de sécurité.
Il est possible d'utiliser des certificats validés par une autorité de certification.
Cependant cela demande des connaissances d'administration système avancées.
En effet, devant la multitude de cas possibles, il est impossible de documenter ici toutes les situations.
La présente documentation va donc se contenter de vous expliquer le but à atteindre, et donner un example
qui ne conviendra qu'à une situation «basique» (installation manuelle de Peertube, avec utilisation de letsencrypt).
Si vous êtes dans une autre situation (installation Docker, certificats signés par une autre autorité, etc...), il
vous faudra adapter la démarche.
#### Principe de base
À vous de générer des certificats valides pour les domaines `votre_instance.tld` et `room.votre_instance.tld`.
Vous pouvez utiliser n'importe quelle [méthode supportées par Prosody](https://prosody.im/doc/certificates).
Vous devez ensuite placer ces certificats dans un dossier qui sera accessible au user `peertube`, puis indiquer
ce dossier dans le paramètre du plugin «Dossiers des certificats».
{{% notice tip %}}
Si vous voulez utiliser l'utilitaire ProsodyCtl (pour importer des certificats
letsencrypts, générer des certificats, etc...), cet utilitaire est disponible
(une fois Peertube démarré) en utilisant la commande qui suit (en adaptant le chemin vers votre dossier data Peertube,
et en remplaçant «xxx» par les arguments que vous souhaitez passer à prosodyctl) :
`sudo -u peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl xxx`
{{% /notice %}}
Le plugin va vérifier une fois par jour si des fichiers ont été modifiés dans ce dossier, et recharger Prosody le cas échéant.
#### Méthode dans le cas simple
Nous supposons ici que votre installation de Peertube est «classique» (pas d'utilisation de Docker), et que les
certificats sont générés par letsencrypt, en utilisant l'outils certbot.
Tout d'abord, on va devoir créer un certificat pour le sous-domain `room.votre_instance.tld` : c'est l'uri du composant
MUC (salons de discussion XMPP). Même si les connections se font sur `votre_instance.tld`, il va nous falloir un
certificat valide pour ce sous-domaine.
Commencez donc par paraméter une entrée DNS pour `room.votre_instance.tld`, qui pointe sur votre serveur.
Vous pouvez tout à faire faire une entrée CNAME (ou une entrée A et une entrée AAAA).
Ensuite, nous allons utiliser nginx (déjà installé pour votre Peertube) pour générer le certificat certbot.
On va créer un nouveau site. Dans le fichier `/etc/nginx/site-available/room.peertube`, ajoutez:
```nginx
server {
listen 80;
listen [::]:80;
server_name room.votre_instance.tld;
location /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/certbot;
}
location / { return 301 https://votre_instance.tld; }
}
```
Ensuite on active ce site:
```bash
ln -s /etc/nginx/sites-available/room.peertube /etc/nginx/sites-enabled/
systemc reload nginx
```
On prépare ensuite le dossier dans lequel on va plus tard importer les certificats.
On suppose ici que vous avez déjà le plugin actif. On va créer le dossier suivant (s'il n'existe pas déjà),
avec le user `peertube` pour être sûr qu'il n'y a pas de problème de droits:
```bash
sudo -u peertube mkdir /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs
```
Il faut maintenant configurer ce dossier dans les paramètres du plugin, pour «Dossiers des certificats».
C'est important de le faire avant la suite, sinon le script d'import des certificats va les placer au mauvais endroit.
On va configurer certbot pour qu'il importe les certificats générés dans le dossier de Prosody.
On va pouvoir utiliser l'utilistaire ProsodyCtl packagé dans le plugin.
Note: pour qu'il soit disponible, il faut que le plugin ai démarré au moins une fois.
On va créer un fichier `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh` contenant:
```bash
#!/bin/sh
/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl \
--root \
--config /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua \
cert import \
room.votre_instance.tld votre_instance.tld /etc/letsencrypt/live
```
Puis on demande à générer le certificat :
```bash
certbot -d room.videos.john-livingston.fr
```
Si certbot vous propose plusieurs méthodes pour générer le certificat, choisissez «nginx».
Normalement vous devriez maintenant trouver les certificats dans le dossier configuré.
Note: la première fois que vous faites tout ça, il va falloir recharger Prosody. Le plus simple pour cela est de
redémarrer Peertube.
#### Méthode en cas d'utilisation de Docker
Merci de vous référer à la documentation en anglais.
### En cas de problème
Si cela ne fonctionne pas, vous pouvez utiliser l'outils de diagnostic
(un bouton se trouve en haut de la page des paramètres du plugin),
et notamment regarder ce que dit la section «Prosody check».

View File

@ -1,10 +0,0 @@
+++
title="Allow connection using XMPP clients"
description="Allow connections using external XMPP accounts and XMPP clients"
weight=30
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,214 +0,0 @@
+++
title="Einstellungen"
description="Plugin Peertube Livechat Einstellungen"
weight=10
chapter=false
+++
{{% notice note %}}
Die Einstellungsseite des Plugins kann momentan nicht übersätzt werden und ist daher nur auf englisch verfügbar. Deswegen wird hier die englische Bezeichnung der Knöpfe, Abschnitte, etc. verwendet. Für weitere Informationen bitte [dieses Problem](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/115) kontrollieren.
{{% /notice %}}
Dieser Abschnitt beschreibt die Einstellungsseite des Plugins.
## List existing rooms (Bestehende Räume auflisten)
Wenn der «Bestehende Räume auflisten» («List rooms») Knopf gedrückt wird, werden alle bestehenden Chaträume aufgelistet.
Sie können die Chaträume damit finden und moderieren.
## Federation
Following settings concern the fedration with other Peertube instances,
and other fediverse softwares.
### Don't display remote chats
By checking this setting, your instance will never display chats from remote videos.
### Don't publish chat information
By checking this setting, your instance will not publish chat information on the fediverse.
Remote Peertube instances will not be aware that they are chat rooms associated to your videos.
**Please note**: if you already had chats in progress, it is possible that the information has already been published.
You will have to wait for the next video update before the information is unpublished.
Also, if you disable this setting, you'll have to wait for the videos to be updated before the information are
published again. This update happens among others when a live event resumes or stops.
**Please note**: this setting only affects the publication of information via the ActivityPub protocol.
It will not prevent a remote application from otherwise detecting the presence of chats, and trying to connect to it.
## Chat behaviour (Chatverhalten)
### Room type (Raumtyp)
Sie können hier wählen, ob Sie für jedes Video einen eigenen Raum haben möchten oder ob Sie sie nach Kanälen gruppieren möchten.
### Automatically open the chat (Chat automatisch öffnen)
Wenn ausgewählt wird der Chat geladen, sobald Sie auf der Videoseite sind.
### Show the «open in new window» button (Zeige den «open in new window» Knopf)
Wenn Ihr Webchat-Tool in einem eigenen Fenster geöffnet werden kann, können Sie einen Knopf hinzufügen um dies zu tun.
Wenn Sie ein externes Web-Chat-Tool verwenden (siehe den Chat-Modus «Use an external web chat tool»), funktioniert es möglicherweise nicht im Vollbildmodus (z. B. wenn es auf das übergeordnete Fenster zugreifen muss, um Videoinformationen zu erhalten). Sie können diese Schaltfläche deaktivieren, indem Sie das Häkchen bei dieser Einstellung entfernen.
### Show the «share chat link» button (Zeige den Chat Link teilen Knopf)
Diese Funktion aktiviert das Dialogfenster «Chat-Link teilen». Mit diesem Fenster können Sie URLs generieren, um dem Chat beizutreten.
Der Chat kann angepasst werden (schreibgeschützter Modus, Verwendung des aktuellen Themas, ...).
Sie können zum Beispiel einen schreibgeschützten Link generieren und diesen in OBS verwenden, um den Chat in Ihren Live-Stream zu integrieren!
Diese Einstellung ermöglicht es Ihnen, festzulegen, wer auf dieses Fenster zugreifen kann.
### Chats are only available for local videos (Chats sind nur für lokale Videos verfügbar)
Peertube ist ein gemeinschaftlicher Dienst. Plugins sind nur auf dem Server verfügbar, auf dem Sie sich gerade befinden.
Wenn Sie also ein externes Video ansehen, steht der Webchat nur Ihnen zur Verfügung, nicht aber den Nutzern der anderen Instanzen.
Daher ist diese Option standardmäßig aktiviert und verhindert die Anzeige eines Webchats für entfernte Videos.
### Users can activate the chat for their lives (Nutzer können den Chat für ihre Live-Videos aktivieren)
Wenn diese Option aktiviert ist, haben alle Live-Videos in ihren Eigenschaften ein Feld zur Aktivierung des Webchats.
Der Videoeigentümer kann Webchats aktivieren.
### Activate chat for all lives (Den Chat für alle Live-Videos aktivieren)
Der Chat wird für alle Peertube-Live-Videos auf Ihrer Instanz verfügbar sein.
### Activate chat for all non-lives (Aktiviere den Chat für alle Nicht-Live-Videos)
Der Chat wird für alle Peertube-Videos verfügbar sein, die nicht live sind.
### Activate chat for these videos (Aktivieren Sie den Chat für diese Videos)
Sie können einige UUIDs auswählen, für die der Chat verfügbar sein soll.
Wenn Sie die Funktion für alle Videos nicht aktivieren möchten, können Sie dieses Feld verwenden, um die UUIDs der Videos aufzulisten.
Sie können Kommentare hinzufügen: alles, was dem Zeichen # entspricht, wird entfernt, ebenso wie leere Zeilen.
### Hide the chat for anonymous users (Den Chat für anonyme Benutzer ausblenden)
Wenn diese Option aktiviert ist, können anonyme Peertube-Nutzer den Chat nicht sehen.
Hinweis: Im Moment blendet diese Funktion einfach den Chat aus.
In einer zukünftigen Version wird der Chat durch eine Meldung ersetzt, die besagt "Bitte melden Sie sich an, um [...]".
Siehe [v5.7.0 Release Notes](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md#570) für weitere Informationen.
## Theming
### ConverseJS theme (ConverseJS Thema)
Sie können wählen, welches Thema Sie für ConverseJS verwenden möchten:
- Peertube-Theme: Dies ist ein spezielles Thema, das speziell für die Integration von Peertube erstellt wurde.
- Standard-ConverseJS-Theme: Dies ist das Standard-Thema von ConverseJS.
- ConverseJS-concord-Theme: Dies ist ein Thema, das von ConverseJS bereitgestellt wird.
### Automatic color detection (Automatische Farberkennung)
Versucht, die Farben aus dem aktuellen Thema des Benutzers automatisch zu erkennen.
Wenn diese Einstellung aktiviert ist, versucht das Plugin, die Farben für das Chat-Thema automatisch zu erkennen.
Wenn dies für einige Ihrer Peertube-Themen nicht korrekt funktioniert, können Sie diese Option deaktivieren.
### Webchat iframe style attribute (Webchat Iframe Stil-Attribute)
Sie können einige benutzerdefinierte Stile hinzufügen, die dem Iframe hinzugefügt werden.
Zum Beispiel eine benutzerdefinierte Breite:
```width:400px;```
## Chat server advanced settings (Erweiterte Einstellungen des Chatservers)
### Use system Prosody (System Prosody benutzen)
Das Plugin wird mit einem AppImage geliefert, das zum Ausführen des [Prosody XMPP-Servers] (https://prosody.im) verwendet wird.
Wenn dieses AppImage nicht funktioniert, können Sie auf das Prosody-Paket zurückgreifen, das für Ihren Server erstellt wurde. Installieren Sie einfach das Paket `prosody`.
Diese Einstellung sollte nur verwendet werden, wenn das Plugin defekt ist und auf einen Patch wartet.
### Disable Websocket (Websocket deaktivieren)
Mit Peertube >= 5.0.0 versucht dieses Plugin, eine Websocket-Verbindung zum Chatten zu verwenden.
Wenn der Browser oder die Verbindung des Benutzers nicht kompatibel ist, wird der Browser automatisch auf das BOSH-Protokoll zurückgreifen.
Aber in seltenen Fällen kann dies fehlschlagen. Zum Beispiel, wenn Sie einen Reverse Proxy vor Peertube haben, der keine
Websocket-Verbindung für Plugins erlaubt.
In diesem Fall können Sie diese Einstellungen überprüfen, um Websocket-Verbindungen zu deaktivieren.
### Prosody port
Dies ist der Port, den der Prosody-Server verwenden wird. Standardmäßig ist er auf 52800 eingestellt. Wenn Sie einen anderen Port verwenden möchten, ändern Sie einfach den Wert hier.
### Peertube URL for API calls (Peertube-URL für API-Aufrufe)
In einigen seltenen Fällen kann Prosody die API von Peertube nicht über seine öffentliche Adresse (URI) aufrufen.
Wenn Sie solche Probleme haben (siehe das Ergebnis des Diagnosetools), können Sie versuchen, den Wert
dieser Einstellung auf `http://localhost:9000` oder `http://127.0.0.1:9000` zu setzen
zu setzen (unter der Annahme, dass Ihr Peertube auf Port `9000` hört). Überprüfen Sie das in Ihrer Peertube `config/production.yaml` Datei).
### Log rooms content by default (Standardmäßig Inhalte von Räumen protokollieren)
Wenn diese Option aktiviert ist, wird der Rauminhalt standardmäßig auf dem Server archiviert.
Das bedeutet, dass Benutzer, die dem Chat beitreten, Nachrichten sehen, die vor ihrem Beitritt gesendet wurden.
Bitte beachten Sie, dass es immer möglich ist, die Inhaltsprotokollierung für einen bestimmten Raum zu aktivieren/deaktivieren,
indem Sie seine Eigenschaften bearbeiten.
### Room logs expiration (Ablaufzeit von Raumprotokollen)
Hier können Sie die Ablaufzeit für Raumprotokolle einstellen.
Siehe die Online-Hilfe für akzeptierte Werte.
### Enable connection to room using external XMPP accounts
By enabling this option, it will be possible to connect to rooms using external XMPP accounts and XMPP clients.<br>
Warning, enabling this option can request extra server and DNS configuration.
Please refer to the documentation: [Enable external XMPP account connections](/peertube-plugin-livechat/documentation/admin/advanced/xmpp_clients/).
### Prosody server to server port
The port that will be used for XMPP s2s (server to server) connections.<br>
You should use the standard 5269 port.
Otherwise you should [setup a specific DNS record](https://prosody.im/doc/s2s).
### Server to server network interfaces
The network interfaces to listen on for server to server connections.<br>
List of IP to listen on, coma separated (spaces will be stripped).<br>
You can use «*» to listen on all IPv4 interfaces, and «::» for all IPv6.<br>
Examples:
- `*, ::`
- `*`
- `127.0.0.1, ::1`
- `172.18.0.42`
### Certificates directory
If this field is empty, the plugin will generate and use self-signed certificates.<br>
If you want to use other certificates, just specify here the folder where
Prosody can find them. Note: the `peertube` user must have read access to this directory.
### Enable client to server connections (Aktivieren von Client-Server-Verbindungen)
Diese Einstellung ermöglicht es XMPP-Clients, sich mit dem eingebauten Prosody-Server zu verbinden.
Im Moment erlaubt diese Option **nur Verbindungen von localhost-Clients**.
Zum Beispiel kann diese Option einer Instanz von Matterbridge (sobald sie einen anonymen Login verwenden kann) *auf demselben Rechner* erlauben, Ihren Chat mit einem anderen Dienst wie einem Matrix-Raum zu verbinden.
#### Prosody client to server port (Prosody Client-Server-Verbindungsport)
Der Port, der vom c2s-Modul des eingebauten Prosody-Servers verwendet wird.
XMPP-Clients sollen diesen Port für die Verbindung verwenden.
Ändern Sie ihn, wenn dieser Port bereits auf Ihrem Server verwendet wird.
### Enable external XMPP components (Aktivieren externer XMPP-Komponenten)
Diese Einstellung ermöglicht es externen XMPP-Komponenten, sich mit dem Server zu verbinden.
Im Moment erlaubt diese Option **nur Verbindungen von localhost-Komponenten**.
Diese Funktion könnte genutzt werden, um Bridges oder Bots zu verbinden.
Weitere Informationen über externe Prosody-Komponenten [hier](https://prosody.im/doc/components).

View File

@ -1,210 +0,0 @@
+++
title="Settings"
description="Plugin Peertube Livechat settings"
weight=10
chapter=false
+++
This section describes the plugin settings page.
## List existing rooms
When pressing the «List rooms» button, all existing chatrooms will be listed.
You can then find them and moderated them.
## Federation
Following settings concern the fedration with other Peertube instances,
and other fediverse softwares.
### Don't display remote chats
By checking this setting, your instance will never display chats from remote videos.
### Don't publish chat information
By checking this setting, your instance will not publish chat information on the fediverse.
Remote Peertube instances will not be aware that they are chat rooms associated to your videos.
**Please note**: if you already had chats in progress, it is possible that the information has already been published.
You will have to wait for the next video update before the information is unpublished.
Also, if you disable this setting, you'll have to wait for the videos to be updated before the information are
published again. This update happens among others when a live event resumes or stops.
**Please note**: this setting only affects the publication of information via the ActivityPub protocol.
It will not prevent a remote application from otherwise detecting the presence of chats, and trying to connect to it.
## Chat behaviour
### Room type
You can choose here to have separate rooms for each video, or to group them by channel.
### Automatically open the chat
If checked, the chat will be loaded as soon as you are on the video page.
### Show the «open in new window» button
If your web chat tool can be opened in a full window, you can add a button to do so.
If you are using an external web chat tool (see the chat mode «Use an external web chat tool»), maybe it will not work in fullscreen (for example if it needs to access the parent window to get video informations). You can disable this button by unchecking this settings.
### Show the «share chat link» button
This feature enables a «share chat link» modal. With this modal, you can generate URLs to join the chat.
The chat can be customized (readonly mode, use the current theme, ...).
You can for example generate a readonly URL and use it in OBS to integrate the chat in your live stream!
This settings allows you to choose who can access this modal.
### Chats are only available for local videos
Peertube is a federated service. Plugins are only available on the server you are browsing.
So, if you are watching a remote video, only you will have the webchat, not users from remote instances.
Therefore, this options is checked by default and prevent displaying a webchat for remote videos.
### Users can activate the chat for their lives
If checked, all live videos will have a checkbox in their properties for enabling the web chat.
The video owner will be able to activate web chats.
### Activate chat for all lives
The chat will be available for all Peertube live videos on your instance.
### Activate chat for all non-lives
The chat will be available for all Peertube video that are not live.
### Activate chat for these videos
You can choose some UUIDs for which the chat will be available.
If you don't want te enable the feature for all videos, you can use this field to list videos UUIDs.
You can add comments: everything rights to the # character will be stripped off, as for empty lines.
### Hide the chat for anonymous users
If checked, anonymous Peertube users won't see the chat.
Note: for now this feature simply hide the chat.
In a future release, the chat will be replaced by a message saying «please log in to [...]».
See [v5.7.0 Release Notes](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md#570) for more information.
## Theming
### ConverseJS theme
You can choose which theme to use for ConverseJS:
- Peertube theme: this is a special theme, made especially for peertube's integration.
- Default ConverseJS theme: this is the default ConverseJS theme.
- ConverseJS concord theme: this is a theme provided by ConverseJS.
### Automatic color detection
Try to autodetect colors from user's current theme.
When this settings is enabled, the plugin tries to auto-detect colors to apply to the chat theme.
If this is not correctly working for some of your Peertube theme, you can disable this option.
### Webchat iframe style attribute
You can add some custom styles that will be added to the iframe.
For example a custom width:
```width:400px;```
## Chat server advanced settings
### Use system Prosody
The plugin comes with an AppImage that is used to run the [Prosody XMPP server](https://prosody.im).
If this AppImage is not working, you can fallback to the Prosody that is packaged for your server. Just install the `prosody` package.
This settings should only be used if the plugin is broken, and waiting for a patch.
### Disable Websocket
With Peertube >= 5.0.0, this plugin try to use Websocket connection for chatting.
If the user's browser or connection is not compatible, the browser will automatically fallback on the BOSH protocol.
But in rare case, this can fail. For example if you have a reverse proxy in front of Peertube that does not
allow Websocket connection for plugins.
In this case, you can check this setting to disable Websocket connections.
### Prosody port
This is the port that the Prosody server will use. By default it is set to 52800. If you want to use another port, just change the value here.
### Peertube URL for API calls
In some rare cases, Prosody can't call Peertube's API from its public URI.
If you have such issues (see the diagnostic tool result), you can try to set the value
of this settings to `http://localhost:9000` or `http://127.0.0.1:9000`
(supposing your Peertube is listening on port `9000`. Check that in your Peertube `config/production.yaml` file).
### Log rooms content by default
If checked, room content will be archived on the server by default.
This means that users who join the chan will see messages sent before they have joined.
Please note that it is always possible to enable/disable the content logging for a specific room,
by editing its properties.
### Room logs expiration
You can set here the expiration delay for room logs.
See the online help for accepted values.
### Enable connection to room using external XMPP accounts
By enabling this option, it will be possible to connect to rooms using external XMPP accounts and XMPP clients.<br>
Warning, enabling this option can request extra server and DNS configuration.
Please refer to the documentation: [Enable external XMPP account connections](/peertube-plugin-livechat/documentation/admin/advanced/xmpp_clients/).
### Prosody server to server port
The port that will be used for XMPP s2s (server to server) connections.<br>
You should use the standard 5269 port.
Otherwise you should [setup a specific DNS record](https://prosody.im/doc/s2s).
### Server to server network interfaces
The network interfaces to listen on for server to server connections.<br>
List of IP to listen on, coma separated (spaces will be stripped).<br>
You can use «*» to listen on all IPv4 interfaces, and «::» for all IPv6.<br>
Examples:
- `*, ::`
- `*`
- `127.0.0.1, ::1`
- `172.18.0.42`
### Certificates directory
If this field is empty, the plugin will generate and use self-signed certificates.<br>
If you want to use other certificates, just specify here the folder where
Prosody can find them. Note: the `peertube` user must have read access to this directory.
### Enable client to server connections
This setting enable XMPP clients to connect to the built-in Prosody server.
For now, this option **only allows connections from localhost clients**.
As example, this option can allow an instance of Matterbridge (once it could use anonymous login) *on the same machine* to bridge your chat with another services like a Matrix room.
#### Prosody client to server port
The port that will be used by the c2s module of the built-in Prosody server.
XMPP clients shall use this port to connect.
Change it if this port is already in use on your server.
### Enable external XMPP components
This settings enable XMPP external components to connect to the server.
For now, this option **only allows connections from localhost components**.
This feature could be used to connect bridges or bots.
More informations on Prosody external components [here](https://prosody.im/doc/components).

View File

@ -1,10 +0,0 @@
+++
title="Settings"
description="Plugin Peertube Livechat settings"
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="Settings"
description="Plugin Peertube Livechat settings"
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,18 +0,0 @@
+++
title="Installationsanleitung"
description="Plugin peertube-plugin-livechat Installationsanleitung"
weight=10
chapter=false
+++
{{% notice info %}}
Bevor Sie auf eine Hauptversion aktualisieren, lesen Sie bitte die Versionshinweise und die Liste der wichtigsten Änderungen : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
{{% notice tip %}}
Um das Plugin zu installieren oder zu aktualisieren **einfach das Peertube Web-Admin-Interface benutzen**.
{{% /notice %}}
Hier sind weitere, spezifischere Anweisungen:
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,18 +0,0 @@
+++
title="Documentation d'installation"
description="Installation du plugin peertube-plugin-livechat"
weight=10
chapter=false
+++
{{% notice info %}}
Avant de mettre à jour le plugin vers une nouvelle version majeure, merci de lire les notes de version, et la liste des éventuelless modifications non rétro-compatibles : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
{{% notice tip %}}
Pour installer ou mettre à jour ce plugin, **utilisez simplement l'interface web d'administration de votre Peertube**.
{{% /notice %}}
Vous trouverez ci-dessous d'autres instructions :
{{% children style="li" depth="3" description="true" %}}

View File

@ -1,83 +0,0 @@
+++
title="Installation guide"
description="Plugin peertube-plugin-livechat installation guide"
weight=10
chapter=false
+++
{{% notice info %}}
メジャーリリースのアップデート実施前に、リリースノートをお読み頂き、変更をご確認ください : [変更履歴](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).
{{% /notice %}}
本プラグインをインストールまたはアップデートは、PeerTubeの管理画面から実施できます。
## 重要事項
v6.0.0から、このプラグインはProsodyのインストールが不要になりました。
このバージョンより前の環境で本プラグインを既にご使用中で、手動でProsodyをインストールした場合は、Prosodyのアンインストールが可能です。
Prosodyが内蔵されたカスタムDockerイメージをご利用の場合は、公式のPeerTube Dockerイメージに切り替えることができるようになりました。
## Known issues: CPU compatibility
The Prosody AppImage included in the plugin will only work on x86_64 and arm64 CPU.
It is not compatible with arm64 and other CPU architectures.
To use the plugin, you will have to manually install Prosody on your server
(see below).
Note: the plugin requires Prosody >= 0.12.0.
If you are using an older version, Chat Federation could be broken, and it could have some unexpected behaviour.
Once it is done, you have to check `Use system Prosody` in the plugin settings.
### On non-docker Peertube installation
For standard installation, you just have to install the official `prosody` package
for your linux distribution.
For example, on Debian/Ubuntu:
```bash
sudo apt install prosody
```
You can then disable the service that starts automatically when you install
Prosody (the plugin will launch a Prosody process, there is no need for the
service to run).
For example, on Debian/Ubuntu (and other Systemd based linux distributions):
```bash
sudo systemctl disable prosody && sudo systemctl stop prosody
```
Warning: do not disable Prosody if it is used for another service on your server,
like for example Jitsi.
### Docker
You will have to generate a Peertube image that includes Prosody in the same
container that Peertube.
I know this is not the standard way to do this with Docker, but keep in mind it
is a temporary workaround.
To generate and use such an image, please refer to the Docker documentation.
The Docker file to generate the image should be:
```Docker
FROM chocobozzz/peertube:production-bullseye
RUN apt -y update && apt install -y prosody && apt -y clean
```
### Yunohost
You have to disable `metronome` (the XMPP server provided by Yunohost), and
install `prosody`.
This is already done by the Yunohost Peertube application, as it was required for the
plugin before the v6.0.0.
But it may be removed in a near feature (to avoid drawbacks of this method).
I have to discuss with Yunohost team, to decide how we can do to minimize drawbacks,
and maximize compatibility.

View File

@ -1,59 +0,0 @@
+++
title="Bekannte Probleme: CPU Kompatibilität"
description="Derzeit funktioniert das Plugin standartmäßig nur für x86_64 CPU Architekturen. Hier sind einige Anleitungen für andere CPU Architekturen."
weight=10
chapter=false
+++
Das im Plugin enthaltene Prosody AppImage funktioniert nur mit x86_64 und arm64 CPU Architekturen.
Es ist nicht kompatibel mit anderen CPU-Architekturen.
Um das Plugin zu verwenden, müssen Sie Prosody manuell auf Ihrem Server installieren
(siehe unten).
Note: the plugin requires Prosody >= 0.12.0.
If you are using an older version, Chat Federation could be broken, and it could have some unexpected behaviour.
Sobald dies geschehen ist, müssen Sie in den Plugin-Einstellungen das Häkchen bei `Use system Prosody` setzen.
## Nicht-Docker Peertube installation
Für die Standardinstallation müssen Sie nur das offizielle `prosody`-Paket für Ihre Linux-Distribution installieren.
Zum Beispiel, auf Debian/Ubuntu:
```bash
sudo apt install prosody
```
Sie können dann den Dienst deaktivieren, der automatisch startet, wenn Sie Prosody installieren (das Plugin startet einen Prosody-Prozess, der Dienst muss nicht dauerhaft laufen).
Zum Beispiel unter Debian/Ubuntu (und anderen Systemd-basierten Linux-Distributionen):
```bash
sudo systemctl disable prosody && sudo systemctl stop prosody
```
Achtung: Deaktivieren Sie Prosody nicht, wenn es für einen anderen Dienst auf Ihrem Server verwendet wird, wie zum Beispiel Jitsi.
## Docker
Sie müssen ein Peertube-Image generieren, das Prosody in demselben
Container enthält, der auch Peertube beinhaltet.
Ich weiß, dass dies nicht der Standardweg ist, um dies mit Docker zu tun, aber bedenken Sie, dass eine vorübergehende Lösung ist.
Um ein solches Image zu erzeugen und zu verwenden, lesen Sie bitte die Docker-Dokumentation.
Die Docker-Datei, um das Paket zu erzeugen, sollte wie folgt sein:
```Docker
FROM chocobozzz/peertube:production-bullseye
RUN apt -y update && apt install -y prosody && apt -y clean
```
## Yunohost
Sie müssen `metronome` (der von Yunohost bereitgestellte XMPP-Server) deaktivieren, und `prosody` installieren.
Dies wird bereits von der Yunohost Peertube Anwendung gemacht, da es für das Plugin vor v6.0.0 erforderlich war.
Es kann aber sein, dass es in naher Zukunft entfernt wird (um die Nachteile dieser Methode zu vermeiden).
Ich muss mit dem Yunohost Team diskutieren, um zu entscheiden, wie wir die Nachteile minimieren können, und die Kompatibilität zu maximieren.

View File

@ -1,70 +0,0 @@
+++
title="Problème connu: compatibilité CPU"
description="Pour l'instant le plugin ne supporte de base que les architectures CPU x86_64 et arm64. Veuillez trouver ici des instructions pour le faire fonctionner sur d'autres architectures CPU."
weight=10
chapter=false
+++
L'AppImage Prosody inclue dans le plugin ne fonctionne que sur des CPU x86_64 et arm64.
Elle n'est pas compatible avec d'autres architectures CPU.
Pour utiliser le plugin, vous allez devoir installer manuellement Prosody sur
votre serveur (voir plus bas).
Note: la version de Prosody devrait être supérieure ou égale à 0.12.0.
Si vous utilisez une version plus ancienne, il pourrait y avoir des bugs sur la fédération du tchat,
et d'autres comportements inattendus.
Une fois cela fait, vous aurez à cocher le paramètre `Use system Prosody` du plugin.
## Installation autres que Docker
Pour les installations standard, vous avez juste à installer le paquet `prosody` officiellement
disponible pour votre distribution linux.
Par exemple, sur Debian/Ubuntu:
```bash
sudo apt install prosody
```
Vous pouvez alors désactiver le service qui démarre automatiquement quand vous
installé le paquet (le plugin va lancer son propre processus Prosody, et n'a pas
besoin que le service tourne sur le serveur).
Par exemple, sur Debian/Ubuntu (et les autres distributions se basant sur Systemd):
```bash
sudo systemctl disable prosody && sudo systemctl stop prosody
```
Attention: ne désactivez pas Prosody s'il est utilisé par un autre service sur
votre serveur, par exemple pour Jitsi.
## Docker
Vous allez devoir générer une image de Peertube qui inclu Prosody dans le même
conteneur que Peertube.
Je sais que ce n'est pas la façon de faire standard avec Docker, mais gardez
en tête que ceci est une solution de contournement temporaire.
Pour générer cette image, merci de vous référer à la documentation de Docker.
Le fichier Docker pour générer l'image devrait être:
```Docker
FROM chocobozzz/peertube:production-bullseye
RUN apt -y update && apt install -y prosody && apt -y clean
```
## Yunohost
Vous avez à désactiver `metronome` (le serveur XMPP utilisé par Yunohost),
et installer`prosody`.
Ceci est déjà fait par l'application Yunohost Peertube, étant donné que c'était
un pré-requis pour les version du plugin antérieures à la v6.0.0.
Mais il se pourrait que ce soit retiré de l'application Yunohost Peertube dans un
futur proche (pour éviter les inconvénients de cette méthode).
Je dois discuter avec l'équipe Yunohost, pour décider de la bonne façon de faire
pour minimiser les inconvénients et maximiser la compatibilité.

View File

@ -1,10 +0,0 @@
+++
title="Known issues: CPU Compatibility"
description="For now, the plugin only works out of the box for x86_64 CPU architecture. Here are some instructions for other CPU architectures."
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,14 +0,0 @@
+++
title="Aktualisieren von Versionen vor 6.0.0"
description="Wichtige Hinweise zum aktualisieren von älteren Versionen."
weight=50
chapter=false
+++
## WICHTIGER HINWEIS
Seit Version v6.0.0 benötigt dieses Plugin keine andere Prosody-Installation.
Falls Sie dieses Plugin vor dieser Version benutzt haben und Sie Prosody manuell installiert haben, können Sie Prosody sicher deinstallieren.
Falls Sie ein eigenes Peertube Docker Paket genutzt haben, welches Prosody eingebettet hatte, können Sie zu den offiziellen Peertube Paketen zurück wechseln.

View File

@ -1,14 +0,0 @@
+++
title="Mise à jour depuis une version antérieure à 6.0.0"
description="Notes importantes pour la mise à jour depuis une ancienne version du plugin."
weight=50
chapter=false
+++
## IMPORTANT NOTE
Depuis la version v6.0.0, ce plugin ne nécessite plus l'installation de Prosody.
Si vous utilisiez ce plugin avant, et que vous aviez installé Prosody manuellement, vous pouvez le désinstaller en tout sécurité.
Si vous utilisiez l'image docker spéciale de Peertube (qui incluais Prosody), vous pouvez basculer sur l'image officielle de Peertube.

View File

@ -1,10 +0,0 @@
+++
title="Upgrade from version older than 6.0.0"
description="Important notes when upgrading for an older version."
weight=50
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,8 +0,0 @@
+++
title="Benutzer Dokumentation"
description="Plugin peertube-plugin-livechat Benutzer Dokumentation"
weight=40
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="User documentation"
description="Plugin peertube-plugin-livechat user documentation"
weight=40
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="Documentation utilisateur⋅rice"
description="Documentation utilisateur⋅rice du plugin peertube-plugin-livechat"
weight=40
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +0,0 @@
+++
title="User documentation"
description="Plugin peertube-plugin-livechat user documentation"
weight=40
chapter=false
+++
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,20 +0,0 @@
+++
title="Moderation"
description="Plugin peertube-plugin-livechat Moderation"
weight=10
chapter=false
+++
Sie können auf die Raumeinstellungen und Moderationswerkzeuge zugreifen, indem Sie den Chat in einem neuen Fenster öffnen, und das Dropdown-Menü oben rechts verwenden.
Sie können alle bestehenden Chaträume auflisten: in den Einstellungen des Plugins gibt es einen Knopf «Räume auflisten».
Sie können alte Räume löschen: Treten Sie dem Raum bei, und verwenden Sie das Menü oben, um den Raum zu löschen.
## Hinweise
Alle Instanzmoderatoren und Admins sind Eigentümer der erstellten Chaträume.
Wenn das Video lokal ist (nicht von einem entfernten Peertube), ist der Eigentümer des Videos der Administrator des Chatraums.
Sie können [ConverseJS-Moderationsbefehle](https://conversejs.org/docs/html/features.html#moderating-chatrooms) verwenden, um den Raum zu moderieren.
Wenn Sie den Chatraum im Vollbildmodus öffnen, finden Sie oben rechts ein Menü mit den entsprechenden Befehlen.

View File

@ -1,10 +0,0 @@
+++
title="Moderation"
description="Plugin peertube-plugin-livechat moderation"
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="Moderation"
description="Plugin peertube-plugin-livechat moderation"
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,34 +0,0 @@
+++
title="OBS"
description="Documentation to stream the chat content using OBS."
weight=10
chapter=false
+++
## OBS Overlay
Falls Sie OBS zum Streaming verwenden, können Sie den Chat ganz einfach in Ihren Stream integrieren.
Sie können die Funktion «Chat Link teilen» verwenden, um einen Link zu Ihrem Chat zu erstellen.
Die Schaltfläche sollte sich in der Nähe des Chats befinden, wenn Sie der Eigentümer des Videos sind (es sei denn, sie wurde von der Server-Administration deaktiviert).
Aktivieren Sie das Feld «schreibgeschützt» in dem Dialogfenster.
Verwenden Sie dann diesen Link als «Browser Quelle» in OBS.
Sie können die Option «Transparenter Hintergrund» verwenden, um einen transparenten Hintergrund in OBS zu erhalten.
Wenn Sie die Hintergrundtransparenz anpassen möchten, können Sie diesen CSS-Code in den Einstellungen Ihrer OBS-Browserquelle hinzufügen:
```css
:root {
--livechat-transparent: rgba(255 255 255 / 90%) !important;
}
```
Hinweis: Sie können die Farben anpassen. Dies ist noch nicht dokumentiert, aber Sie können dies versuchen:
Aktivieren Sie im Dialogfenster die Option «Aktuelle Themenfarben verwenden», und versuchen Sie dann, die Farbwerte in dem Link manuell zu ändern.
Sie müssen gültige CSS-Farbwerte verwenden, und diese müssen in dem Link korrekt kodiert sein.
## Mehrere Chats in Ihrem Live-Stream kombinieren
Sie können die [social_stream browser extension](https://github.com/steveseguin/social_stream#readme) verwenden, um mehrere Chat-Quellen (von Peertube, Twitch, Youtube, Facebook, ...) zu mischen und deren Inhalte in Ihren Live-Stream zu integrieren.
Die Kompatibilität mit diesem Plugin wurde in den letzten Versionen hinzugefügt.

View File

@ -1,10 +0,0 @@
+++
title="OBS"
description="Documentation to stream the chat content using OBS."
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="OBS"
description="Documentation to stream the chat content using OBS."
weight=10
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,10 +0,0 @@
+++
title="XMPP Clients"
description="Connect to chat using a XMPP client"
weight=40
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -1,47 +0,0 @@
+++
title="Clients XMPP"
description="Se connecter au tchat avec un client XMPP"
weight=40
chapter=false
+++
Ce module de tchat repose sur le protocole XMPP, aussi connu sous le nom de Jabber.
Il est donc possible de se connecter aux tchats en utilisant des
[logiciels clients XMPP](https://fr.wikipedia.org/wiki/Clients_XMPP).
Cela peut par exemple être utile pour faciliter les opérations de modération.
{{% notice info %}}
Les fonctions décrites dans cette page doivent être activées et configurées par
les administrateur⋅rices de votre instance Peertube. Il se peut donc que vous
n'y ayez pas accès.
{{% /notice %}}
## Connexion à votre compte Peertube
{{% notice warning %}}
Cette fonctionnalité n'est pas encore disponible, et viendra dans une
prochaine version du plugin.
{{% /notice %}}
## Connexion en utilisant un compte XMPP externe
Si cette fonctionnalité est activée sur votre instance, vous pouvez vous
connecter aux tchats Peertube en utilisant un compte XMPP quelconque.
Pour obtenir l'adresse du salon à rejoindre, vous pouvez utiliser la fenêtre
de «partage» du tchat, dont le bouton est situé au dessus du tchat:
![Partage](/peertube-plugin-livechat/images/share_button.png?classes=shadow,border&height=200px)
{{% notice info %}}
Par défaut, le bouton de partage n'est visible que pour le ou la propriétaire de la vidéo,
et les admins/modérateur⋅rices de l'instance.
Toutefois, les admins peuvent décider d'afficher ce bouton pour tout le monde.
{{% /notice %}}
Ensuite, dans la modale qui s'affiche, choississez «Connexion avec un client XMPP»:
![Partage XMPP](/peertube-plugin-livechat/images/share_xmpp_dialog.png?classes=shadow,border&height=200px)
Il vous suffit ensuite, soit de cliquer sur «ouvrir», soit de copier/coller l'adresse du salon dans votre client XMPP
(en utilisant la fonctionnalité «rejoindre un salon»).

View File

@ -1,10 +0,0 @@
+++
title="XMPP Clients"
description="Connect to chat using a XMPP client"
weight=40
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -2,6 +2,7 @@
{{% notice tip %}}
You can use the language selector in the left menu to view this documentation in different languages.
Some translations are missing or incomplete. In this case, you'll see the English version of the text.
{{% /notice %}}
{{% notice info %}}

View File

@ -1,9 +1,9 @@
+++
title="Contact me"
description="Contact the author"
weight=80
chapter=false
+++
---
title: "Contact me"
description: "Contact the author"
weight: 80
chapter: false
---
If you have any question, or if you want to talk about this plugin, you can join this XMPP room with any Jabber client: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).

View File

@ -1,9 +1,9 @@
+++
title="Contributing"
description="Contributing"
weight=60
chapter=false
+++
---
title: "Contributing"
description: "Contributing"
weight: 60
chapter: false
---
Interested in contributing? Awesome!

View File

@ -0,0 +1,14 @@
---
title: "Code of Conduct"
description: "Contributor Covenant Code of Conduct"
weight: 10
chapter: false
---
{{% notice tip %}}
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by mail at git.[at].john-livingston.fr.
{{% /notice %}}
{{% livechat_codeofconduct %}}

View File

@ -1,9 +1,9 @@
+++
title="Develop"
description="Develop"
weight=40
chapter=false
+++
---
title: "Develop"
description: "Develop"
weight: 40
chapter: false
---
Always talk about features you want to develop by creating/finding and commenting the issue tackling your problem
before you start working on it, and inform the community that you begin coding by claiming the issue.
@ -18,16 +18,13 @@ Prerequisite for building this plugin:
- you must have `npm` installed
- you must have python venv installed (`python3-venv` package on Debian for example)
- you must have `build-essential` installed
To clone the repository:
```bash
# Clone the repository
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git
# Be sure to checkout the main branch
git checkout main
# Initialize the submodules. This command must be run again if any submodules' version changes.
git submodule update --init --recursive
# Clone the repository. Dont forget the --recursive to clone submodules.
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git --recursive
# Install NPM dependencies and build the module for the first time:
npm install

View File

@ -0,0 +1,98 @@
---
title: "Documentation"
description: "Document the plugin, or translate the documentation."
weight: 50
chapter: false
---
## General information
Always inform the community before working (by creating a new issue, or commenting an existing one).
This is to avoid that two persons are working on the same thing, and prevent conflicts.
Documentation work has to be merged in the `main` branch.
The documentation source code is in the `support/documentation/content` folder.
The documentation is generated using [Hugo](https://gohugo.io/).
You have to install it on your computer if you want to preview your work.
The used theme is [hugo-theme-learn](https://learn.netlify.app/).
You should read its documentation before starting editing the documentation.
When a new plugin version is released, or when documentation is updated, plugin maintainers will merge the `main` branch to the `documentation` branch.
This will trigger github and gitlab pipelines, and update published documentation.
## Translations
The principal language is english (`en` code).
The `support/documentation/content/en` folder contains only english documentation files.
Documentation is translated using Weblate (see the [translation documentation](/peertube-plugin-livechat/contributing/translate/)).
To do so, we use the [po4a tool](https://po4a.org/), as we will se later in this page.
## Add a new language
In the `support/documentation/config.toml` file, please copy and modify the `[Languages.fr]` section.
If the translations are not complete, it does not matter, english will be used for missing strings.
## Preview
To preview your modifications, just run:
```bash
hugo serve -s support/documentation/
```
Then open your browser on the address [http://localhost:1313/peertube-plugin-livechat/](http://localhost:1313/peertube-plugin-livechat/).
This page will automatically refresh on each modification.
## Update localization files and generate documentation translations
For now, you only have the english version.
To update documentation strings, and generate translations, you have to run the `doc-translate.sh` script.
To do so, make sure you have `po4a` (version >= 0.66) installed on your computer.
{{% notice warning %}}
Some linux distro (like Debian Bullseye for example) have too old version of `po4a`.
Please make sure to install a compatible version.
If you are using Debian Bullseye for example, you can download the Bookwork po4a.deb file from https://packages.debian.org, and install it manually.
{{% /notice %}}
To handle translations, just do:
```bash
npm run doc:translate
```
You can then preview the result using `hugo serve -s support/documentation/`, and using the language selector.
## Write documentation
Just edit the english files in `support/documentation/content/en`.
Then, before commiting, always run `npm run doc:translate`, so that changes in english files can be propagated to the `support/documentation/po/livechat.en.pot` file.
You can use the `livechat_label` short code to use application strings.
See here: [Documentation translation](/peertube-plugin-livechat/contributing/translate/#documentation-translation).
It is possible to prevent a file from beeing translating, using `livechatnotranslation: true` in the Yaml Font Matter section.
See here: [Documentation translation](/peertube-plugin-livechat/contributing/translate/#documentation-translation).
Please use the `livechatnotranslation` option for technical documentation.
We don't want technical documentation to be translated, to avoid issues because of a wrong translation.
Avoid adding line breaks in middle of a sentence.
But add a line break after each sentence in a paragraph.
This is to facilitate the work for translators: so then can easily check that they don't miss a sentence when translating a parapraph.
### What if I can't use hugo and/or po4a?
Just edit english markdown files, and specify that you can't build translations when you make your Pull Request.
## Publication
Publishing the documentation is automatic, as soon as the changes are merged into the `documentation` branch.

View File

@ -0,0 +1,9 @@
---
title: "Give your feedback"
description: "Give your feedback"
weight: 30
chapter: false
---
You don't need to know how to code to start contributing to this plugin!
Other contributions are very valuable too, among which: you can test the software and report bugs, you can give feedback, features that you are interested in, user interface, design, ...

View File

@ -1,9 +1,9 @@
+++
title="Translate"
description="Translate the plugin"
weight=20
chapter=false
+++
---
title: "Translate"
description: "Translate the plugin"
weight: 20
chapter: false
---
You can contribute to this plugin translation.
Translations are handled using the [Weblate](https://weblate.org/) software,
@ -28,12 +28,6 @@ the meaning, or of your translation, you better not translate it,
so it will display in english.
{{% /notice %}}
## Documentation translation
Fow now, this is not done on Weblate. I am still looking for the good technical solution.
Please refer to the "documentation" documentation page.
## Adding a new locale
If you think there is a missing locale, please check first if it is handled in Peertube.
@ -81,3 +75,38 @@ Localization must be done on front-end.
There is a `lib/loc.ts` module providing a `loc()` function.
Just pass it the key to have the english string: `loc('diagnostic')`'.
## Documentation translation
The documentation translation is done using the corresponding Weblate component.
There is a specific "Hugo shortcodes" you can use to display an application string.
Saying you want to display the name of the button "open_chat_new_window", you can use this in the documentation markdown file:
```hugo
{{%/* livechat_label open_chat_new_window */%}}
```
You can also prevent a whole page from being translating by adding `livechatnotranslation: true` in the Yaml Font Matter section:
```yaml
---
title: "Third party"
description: "Displaying the livechat with 3rd party software."
weight: 20
chapter: false
livechatnotranslation: true
---
```
Never translate a string in the `livechat.en.pot` file, it would be ignored.
Instead, edit directly the markdown files.
If a string contains a link, you can change it for the correct link in the translated language.
For example, for a link to this documentation, you can add the language code in the url.
Some strings are block of code.
Don't translate code.
But you can translate comments, or parameters if relevant.
If you are not sure, just don't translate, and ask what to do.

View File

@ -1,14 +1,11 @@
+++
title="Credits"
description="Plugin Credits"
weight=90
chapter=false
+++
---
title: "Credits"
description: "Plugin Credits"
weight: 90
chapter: false
---
[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json),
[COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md)
and [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE)
files contain the license information for this software and its dependencies.
[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json), [COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md) and [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE) files contain the license information for this software and its dependencies.
The plugin is maintained by [John Livingston](https://www.john-livingston.fr/).

View File

@ -0,0 +1,8 @@
---
title: "Documentation"
description: "Plugin documentation"
weight: 10
chapter: false
---
{{% children depth="3" style="li" description="true" %}}

View File

@ -0,0 +1,8 @@
---
title: "Admin documentation"
description: "Plugin Peertube Livechat administration"
weight: 30
chapter: false
---
{{% children depth="3" style="li" description="true" %}}

View File

@ -0,0 +1,8 @@
---
title: "Advanced usage"
description: "Some advanced features"
weight: 20
chapter: false
---
{{% children depth="3" style="li" description="true" %}}

View File

@ -1,8 +1,8 @@
+++
title="Using Matterbridge"
description="Using Matterbridge to bridge with other chats"
weight=50
chapter=false
+++
---
title: "Using Matterbridge"
description: "Using Matterbridge to bridge with other chats"
weight: 50
chapter: false
---
Here is a tutorial to use Matterbridge with the plugin: <https://gitlab.com/refrac/obs-matterbridge-overlay/-/blob/master/documentation/peertube.md>

View File

@ -1,9 +1,9 @@
+++
title="XMPP clients"
description="Allow connections using XMPP clients"
weight=30
chapter=false
+++
---
title: "XMPP clients"
description: "Allow connections using XMPP clients"
weight: 30
chapter: false
---
This chat module is based on the XMPP protocol, also known as Jabber.
It is therefore possible to connect to the chats using [XMPP client software](https://en.wikipedia.org/wiki/XMPP#Clients).
@ -12,10 +12,8 @@ This can for example be useful to facilitate moderation operations.
For the user documentation associated with these features, please refer to the [user documentation page](/peertube-plugin-livechat/documentation/user/xmpp_clients/).
{{% notice info %}}
Enabling these features requires configuration changes on the server, and
on the DNS records. It is not possible to configure this only from the
Peertube interface, and it requires some basic system some basic system
admin skills.
Enabling these features requires configuration changes on the server, and on the DNS records.
It is not possible to configure this only from the Peertube interface, and it requires some basic system some basic system admin skills.
{{% /notice %}}
## Login to your Peertube account
@ -26,31 +24,27 @@ This feature is not yet available, and will come in a future version of the plug
## Connection using an external XMPP account
To enable this feature, you will need to set up your server and DNS
records, so that XMPP clients can find and access the
To enable this feature, you will need to set up your server and DNS records, so that XMPP clients can find and access the
[Prosody server](https://prosody.im) that this plugin uses internally.
### Plugin settings
Start by going to the livechat plugin settings of your instance, then
enable the setting "Enable connection to room using external XMPP accounts".
Start by going to the livechat plugin settings of your instance, then enable the setting "Enable connection to room using external XMPP accounts".
By checking this settings, new settings appear below.
First of all, the "Prosody server to server port" field.
This one defaults to 5269, which is the standard port for this service.
You can however change to another port, if this is already in use on your server.
Next, the field "Server to server network interfaces" field allows you to specify
which network interfaces the server should listen on.
Next, the field "Server to server network interfaces" field allows you to specify which network interfaces the server should listen on.
The default value "*, ::" indicates to listen on all IP addresses.
You can change these values, if you wish to listen on only certain IP addresses.
The syntax is explained next to the setting.
For the "Certificate folder" setting, you can leave it empty.
In this case, the plugin will automatically generate self-signed certificates.
In this case, the plugin will automatically generate self-signed certificates.
Some XMPP servers may refuse to connect, depending on their configuration.
In this case, you can indicate here a path on the server, in which you
must place certificates to be used by the module.
In this case, you can indicate here a path on the server, in which you must place certificates to be used by the module.
It is up to you to generate and renew them.
See bellow for more information.
@ -58,17 +52,14 @@ See bellow for more information.
You must open the configured port (5269 by default) on your firewall.
If you are using Docker for your Peertube, you need to modify the
`docker-compose.yml` file to open port 5269 of the `peertube` container,
If you are using Docker for your Peertube, you need to modify the `docker-compose.yml` file to open port 5269 of the `peertube` container,
so that the outer world can connect to it.
### DNS
You need to add a [DNS record](https://prosody.im/doc/dns) allowing
remote servers to find the "room.your_instance.tld" component.
You need to add a [DNS record](https://prosody.im/doc/dns) allowing remote servers to find the "room.your_instance.tld" component.
The easiest way to do this is to add an SRV record for the "room"
[subdomain](https://prosody.im/doc/dns#subdomains):
The easiest way to do this is to add an SRV record for the "room" [subdomain](https://prosody.im/doc/dns#subdomains):
* record name: _xmpp-server._tcp.room.your_instance.tld. (replace «your_instance.tld» by your instance uri)
* TTL: 3600
@ -81,16 +72,14 @@ The easiest way to do this is to add an SRV record for the "room"
Be careful to keep the dot after "your_instance.tld".
Using the `dig` command to check your record,
you should get a result similar to this:
Using the `dig` command to check your record, you should get a result similar to this:
```bash
$ dig +short _xmpp-server._tcp.room.videos.john-livingston.fr. SRV
0 5 5269 videos.john-livingston.fr.
```
If you are **not using the standard `5269` port**, you must also add a SRV record
for `_xmpp-server._tcp.your_instance.tld.` (same as above, just without the `room.` prefix).
If you are **not using the standard `5269` port**, you must also add a SRV record for `_xmpp-server._tcp.your_instance.tld.` (same as above, just without the `room.` prefix).
Of course, you can also add this record if you use the standard port. It will also work.
### Using trusted certificates
@ -111,12 +100,8 @@ You can use any [method supported by Prosody](https://prosody.im/doc/certificate
You must then place these certificates in a folder that will be accessible to the `peertube` user, and specify this folder in the plugin setting "Certificate folder".
{{% notice tip %}}
If you want to use the ProsodyCtl utility to import
certificates, this utility is available (once Peertube is started) using
the following command (adapting the path to your Peertube data folder,
and replacing "xxx" with the arguments you wish to pass to
prosodyctl):
`sudo -u peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl xxx`
If you want to use the ProsodyCtl utility to import certificates, this utility is available (once Peertube is started) using the following command (adapting the path to your Peertube data folder, and replacing "xxx" with the arguments you wish to pass to
prosodyctl): `sudo -u peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl xxx`
{{% /notice %}}
The plugin will check once a day to see if any files have been modified in this folder, and reload Prosody if necessary.
@ -125,8 +110,8 @@ The plugin will check once a day to see if any files have been modified in this
We assume here that your Peertube installation is "classic" (no use of Docker), and that the certificates are generated by letsencrypt, using the certbot tool.
First of all, we'll have to create a certificate for the subdomain `room.your_instance.tld` : this is the uri of the
MUC (XMPP chat rooms) component. Even if the connections are made on `your_instance.tld`, we will need a valid certificate for this subdomain.
First of all, we'll have to create a certificate for the subdomain `room.your_instance.tld` : this is the uri of the MUC (XMPP chat rooms) component.
Even if the connections are made on `your_instance.tld`, we will need a valid certificate for this subdomain.
So start by setting up a DNS entry for `room.your_instance.tld`, which points to your server.
You can use a CNAME entry (or an A entry and a AAAA entry).
@ -156,8 +141,7 @@ systemc reload nginx
```
Then we prepare the folder in which we will later import the certificates.
We assume here that you already have the plugin active. We will create the following folder (if it doesn't already exist),
with the user `peertube` to make sure there are no permissions issues:
We assume here that you already have the plugin active. We will create the following folder (if it doesn't already exist), with the user `peertube` to make sure there are no permissions issues:
```bash
sudo -u peertube mkdir /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs
@ -216,7 +200,7 @@ Run certbot:
certbot
```
You will be presented with a series of prompts. Enter `2` for the authentication type:
You will be presented with a series of prompts. Enter `2` for the authentication type:
```text
How would you like to authenticate with the ACME CA?
@ -226,8 +210,7 @@ Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Enter the domain name `room.your_instance.tld`:
```text
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): room.your_instance.tld
Please enter the domain name(s) you would like on your certificate (comma and/or space separated) (Enter 'c' to cancel): room.your_instance.tld
```
Enter the directory where the PeerTube webserver serves requests for Let's Encrypt, `/var/www/certbot`:
@ -302,6 +285,4 @@ docker-compose exec -u peertube \
### Troubleshooting
If you can't make it work, you can use the diagnostic tool
(there is a button on top of the plugin settings page),
and take a close look on the «Prosody check» section.
If you can't make it work, you can use the diagnostic tool (there is a button on top of the plugin settings page), and take a close look on the «Prosody check» section.

View File

@ -0,0 +1,159 @@
---
title: "Settings"
description: "Plugin Peertube Livechat settings"
weight: 10
chapter: false
---
This section describes the plugin settings page.
## {{% livechat_label "list_rooms_label" %}}
When pressing the «List rooms» button, all existing chatrooms will be listed.
You can then find them and moderated them.
## Federation
Following settings concern the federation with other Peertube instances, and other fediverse softwares.
### {{% livechat_label federation_no_remote_chat_label %}}
{{% livechat_label federation_no_remote_chat_description %}}
### {{% livechat_label federation_dont_publish_remotely_label %}}
{{% livechat_label federation_dont_publish_remotely_description %}}
## Chat behaviour
### {{% livechat_label room_type_label %}}
{{% livechat_label room_type_description %}}
### {{% livechat_label auto_display_label %}}
{{% livechat_label auto_display_description %}}
### {{% livechat_label open_blank_label %}}
{{% livechat_label open_blank_description %}}
### {{% livechat_label share_url_label %}}
This feature enables a «share chat link» modal. With this modal, you can generate URLs to join the chat.
The chat can be customized (readonly mode, use the current theme, ...).
You can for example generate a readonly URL and use it in OBS to integrate the chat in your live stream!
This settings allows you to choose who can access this modal.
### {{% livechat_label per_live_video_label %}}
{{% livechat_label per_live_video_description %}}
The video owner will be able to activate web chats.
### {{% livechat_label all_lives_label %}}
{{% livechat_label all_lives_description %}}
### {{% livechat_label all_non_lives_label %}}
{{% livechat_label all_non_lives_label %}}
### {{% livechat_label videos_list_label %}}
{{% livechat_label videos_list_label %}}
### {{% livechat_label no_anonymous_label %}}
{{% livechat_label no_anonymous_description %}}
Note: for now this feature simply hide the chat.
In a future release, the chat will be replaced by a message saying «please log in to [...]».
See [v5.7.0 Release Notes](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md#570) for more information.
## Theming
### {{% livechat_label converse_theme_label %}}
You can choose which theme to use for ConverseJS:
- Peertube theme: this is a special theme, made especially for peertube's integration.
- Default ConverseJS theme: this is the default ConverseJS theme.
- ConverseJS concord theme: this is a theme provided by ConverseJS.
### {{% livechat_label autocolors_label %}}
{{% livechat_label autocolors_description %}}
### {{% livechat_label chat_style_label %}}
{{% livechat_label chat_style_description %}}
## Chat server advanced settings
### {{% livechat_label system_prosody_label %}}
The plugin comes with an AppImage that is used to run the [Prosody XMPP server](https://prosody.im).
If this AppImage is not working, you can fallback to the Prosody that is packaged for your server. Just install the `prosody` package.
This settings should only be used if the plugin is broken, and waiting for a patch.
### {{% livechat_label disable_websocket_label %}}
{{% livechat_label disable_websocket_description %}}
### {{% livechat_label prosody_port_label %}}
{{% livechat_label prosody_port_description %}}
### {{% livechat_label prosody_peertube_uri_label %}}
{{% livechat_label prosody_peertube_uri_description %}}
### {{% livechat_label prosody_muc_log_by_default_label %}}
{{% livechat_label prosody_muc_log_by_default_description %}}
### {{% livechat_label prosody_muc_expiration_label %}}
{{% livechat_label prosody_muc_expiration_description %}}
### {{% livechat_label prosody_room_allow_s2s_label %}}
{{% livechat_label prosody_room_allow_s2s_description %}}
### {{% livechat_label prosody_s2s_port_label %}}
{{% livechat_label prosody_s2s_port_description %}}
### {{% livechat_label prosody_s2s_interfaces_label %}}
{{% livechat_label prosody_s2s_interfaces_description %}}
### {{% livechat_label prosody_certificates_dir_label %}}
{{% livechat_label prosody_certificates_dir_description %}}
### {{% livechat_label prosody_c2s_label %}}
{{% livechat_label prosody_c2s_description %}}
This setting enable XMPP clients to connect to the built-in Prosody server.
For now, this option **only allows connections from localhost clients**.
As example, this option can allow an instance of Matterbridge (once it could use anonymous login) *on the same machine* to bridge your chat with another services like a Matrix room.
#### {{% livechat_label prosody_c2s_port_label %}}
{{% livechat_label prosody_c2s_port_description %}}
### {{% livechat_label prosody_components_label %}}
This settings enable XMPP external components to connect to the server.
For now, this option **only allows connections from localhost components**.
This feature could be used to connect bridges or bots.
More informations on Prosody external components [here](https://prosody.im/doc/components).

View File

@ -1,9 +1,9 @@
+++
title="Installation guide"
description="Plugin peertube-plugin-livechat installation guide"
weight=10
chapter=false
+++
---
title: "Installation guide"
description: "Plugin peertube-plugin-livechat installation guide"
weight: 10
chapter: false
---
{{% notice info %}}
Before updating to a major release, please read the release notes and breaking changes list : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).

View File

@ -1,9 +1,9 @@
+++
title="Known issues: CPU Compatibility"
description="For now, the plugin only works out of the box for x86_64 and arm64 CPU architecture. Here are some instructions for other CPU architectures."
weight=10
chapter=false
+++
---
title: "Known issues: CPU Compatibility"
description: "For now, the plugin only works out of the box for x86_64 and arm64 CPU architecture. Here are some instructions for other CPU architectures."
weight: 10
chapter: false
---
The Prosody AppImage included in the plugin will only work on x86_64 and arm64 CPU.
It is not compatible with other CPU architectures.
@ -18,8 +18,7 @@ Once it is done, you have to check `Use system Prosody` in the plugin settings.
## On non-docker Peertube installation
For standard installation, you just have to install the official `prosody` package
for your linux distribution.
For standard installation, you just have to install the official `prosody` package for your linux distribution.
For example, on Debian/Ubuntu:
@ -27,24 +26,19 @@ For example, on Debian/Ubuntu:
sudo apt install prosody
```
You can then disable the service that starts automatically when you install
Prosody (the plugin will launch a Prosody process, there is no need for the
service to run).
You can then disable the service that starts automatically when you install Prosody (the plugin will launch a Prosody process, there is no need for the service to run).
For example, on Debian/Ubuntu (and other Systemd based linux distributions):
```bash
sudo systemctl disable prosody && sudo systemctl stop prosody
```
Warning: do not disable Prosody if it is used for another service on your server,
like for example Jitsi.
Warning: do not disable Prosody if it is used for another service on your server, like for example Jitsi.
## Docker
You will have to generate a Peertube image that includes Prosody in the same
container that Peertube.
I know this is not the standard way to do this with Docker, but keep in mind it
is a temporary workaround.
You will have to generate a Peertube image that includes Prosody in the same container that Peertube.
I know this is not the standard way to do this with Docker, but keep in mind it is a temporary workaround.
To generate and use such an image, please refer to the Docker documentation.
The Docker file to generate the image should be:
@ -57,11 +51,9 @@ RUN apt -y update && apt install -y prosody && apt -y clean
## Yunohost
You have to disable `metronome` (the XMPP server provided by Yunohost), and
install `prosody`.
You have to disable `metronome` (the XMPP server provided by Yunohost), and install `prosody`.
This is already done by the Yunohost Peertube application, as it was required for the plugin before the v6.0.0.
This is already done by the Yunohost Peertube application, as it was required for the
plugin before the v6.0.0.
But it may be removed in a near feature (to avoid drawbacks of this method).
I have to discuss with Yunohost team, to decide how we can do to minimize drawbacks,
and maximize compatibility.
I have to discuss with Yunohost team, to decide how we can do to minimize drawbacks, and maximize compatibility.

View File

@ -1,9 +1,9 @@
+++
title="Upgrade from version older than 6.0.0"
description="Important notes when upgrading for an older version."
weight=50
chapter=false
+++
---
title: "Upgrade from version older than 6.0.0"
description: "Important notes when upgrading for an older version."
weight: 50
chapter: false
---
## IMPORTANT NOTE

View File

@ -0,0 +1,8 @@
---
title: "User documentation"
description: "Plugin peertube-plugin-livechat user documentation"
weight: 40
chapter: false
---
{{% children depth="3" style="li" description="true" %}}

Some files were not shown because too many files have changed in this diff Show More