Implements #153: Settings translations (#155)

Implementing a new translating system, so we can more easily translate
settings strings. Indeed, these strings are difficult to embed in
JSON format.

We still use JSON files for standard strings, but in addition we have
dedicated YAML files to translate settings strings.

There is a new build-languages.js script that merge all translations in JSON files.

Other modifications:
* Eslint: ignoring documentation and build scripts.
* french settings translations.
This commit is contained in:
John Livingston
2023-02-15 11:54:48 +01:00
committed by GitHub
parent 891a7336c4
commit 9d18e401a7
21 changed files with 857 additions and 182 deletions

View File

@ -99,14 +99,13 @@ function register ({ registerHook, registerSettingsScript, peertubeHelpers }: Re
const table = document.createElement('table')
table.classList.add('peertube-plugin-livechat-prosody-list-rooms')
container.append(table)
// TODO: translate labels.
const labels: any = {
RoomName: 'Room name',
RoomDescription: 'Room description',
NotFound: 'Not found',
Video: 'Video',
Channel: 'Channel',
LastActivity: 'Last activity'
RoomName: await peertubeHelpers.translate('Room name'),
RoomDescription: await peertubeHelpers.translate('Room description'),
NotFound: await peertubeHelpers.translate('Not found'),
Video: await peertubeHelpers.translate('Video'),
Channel: await peertubeHelpers.translate('Channel'),
LastActivity: await peertubeHelpers.translate('Last activity')
}
const titleLineEl = document.createElement('tr')