Verified Commit e763badd authored by Chocobozzz's avatar Chocobozzz
Browse files

Add translations

parent 9c37c5e7
......@@ -75,6 +75,9 @@ function onApplicationInit (peertubeHelpers) {
const topLeftBlock = document.querySelector('.top-left-block')
topLeftBlock.style.backgroundImage = 'url(' + imageUrl + ')'
peertubeHelpers.translate('User name')
.then(translation => console.log('Translated User name by ' + translation))
}
function addSymbolToVideoNameResult (result, symbol) {
......
{
"User name": "Nom d'utilisateur",
"Admin name": "Nom d'administrateur"
}
async function register ({ registerHook, registerSetting, settingsManager, storageManager }) {
async function register ({
registerHook,
registerSetting,
settingsManager,
storageManager,
videoCategoryManager,
videoLicenceManager,
videoLanguageManager
}) {
const defaultAdmin = 'PeerTube admin'
registerHook({
......@@ -30,6 +38,15 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
console.log(value)
await storageManager.storeData('toto', 'hello' + new Date())
videoLanguageManager.addLanguage('al_bhed', 'Al Bhed')
videoLanguageManager.deleteLanguage('fr')
videoCategoryManager.addCategory(42, 'Best category')
videoCategoryManager.deleteCategory(1) // Music
videoLicenceManager.addLicence(42, 'Best licence')
videoLicenceManager.deleteLicence(7) // Public domain
}
async function unregister () {
......
{
"name": "peertube-plugin-hello-world",
"version": "0.0.12",
"version": "0.0.13",
"description": "Hello world PeerTube plugin example",
"engine": {
"peertube": ">=1.3.0"
......@@ -33,5 +33,8 @@
"script": "client/search-client-plugin.js",
"scopes": [ "search" ]
}
]
],
"translations": {
"fr-FR": "./languages/fr.json"
}
}
{
"name": "peertube-plugin-matomo",
"version": "0.0.1",
"version": "0.0.2",
"description": "Hello world PeerTube plugin example",
"engine": {
"peertube": ">=1.3.0"
......@@ -20,5 +20,6 @@
"script": "client/common-client-plugin.js",
"scopes": [ "common" ]
}
]
],
"translations": {}
}
{
"name": "peertube-theme-background-red",
"version": "0.0.3",
"version": "0.0.4",
"description": "Example PeerTube theme",
"engine": {
"peertube": ">=1.3.1"
......@@ -24,5 +24,6 @@
"script": "client/video-watch-client-plugin.js",
"scopes": [ "video-watch" ]
}
]
],
"translations": {}
}
{
"name": "peertube-theme-dark",
"version": "0.0.1",
"version": "0.0.2",
"description": "PeerTube dark theme",
"engine": {
"peertube": ">=1.3.0"
......@@ -16,5 +16,6 @@
"css": [
"assets/style.css"
],
"clientScripts": []
"clientScripts": [],
"translations": {}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment