Markus-Rost 4 лет назад
Родитель
Сommit
51acfe6453

+ 6 - 3
dashboard/guilds.js

@@ -129,12 +129,15 @@ function dashboard_guilds(res, state, reqURL, action, actionArgs) {
 	else if ( args[0] === 'owner' ) {
 		let guild = {
 			id, name: 'OWNER ACCESS',
-			acronym: '', userPermissions: 0,
-			patreon: true, botPermissions: 0,
+			acronym: '', userPermissions: 1 << 3,
+			patreon: true, botPermissions: 1 << 3,
 			channels: [], roles: []
 		};
 		$('head title').text(`${guild.name} – ` + $('head title').text());
-		$('<script>').text(`const isPatreon = ${guild.patreon};`).insertBefore('script#indexjs');
+		$('<script>').text(`
+			const isPatreon = ${guild.patreon};
+			const i18n = ${JSON.stringify(dashboardLang.get('indexjs'))};
+		`).insertBefore('script#indexjs');
 		$('.channel#settings').attr('href', `/guild/${guild.id}/settings?owner=true`);
 		$('.channel#verification').attr('href', `/guild/${guild.id}/verification?owner=true`);
 		$('.channel#rcscript').attr('href', `/guild/${guild.id}/rcscript?owner=true`);

+ 17 - 1
dashboard/i18n.js

@@ -2,8 +2,24 @@ const {defaultSettings} = require('../util/default.json');
 const {escapeText} = require('./util.js');
 const i18n = {
 	en: require('./i18n/en.json'),
+	bn: require('./i18n/bn.json'),
 	de: require('./i18n/de.json'),
-	pl: require('./i18n/pl.json')
+	es: require('./i18n/es.json'),
+	fr: require('./i18n/fr.json'),
+	hi: require('./i18n/hi.json'),
+	it: require('./i18n/it.json'),
+	ja: require('./i18n/ja.json'),
+	ko: require('./i18n/ko.json'),
+	nl: require('./i18n/nl.json'),
+	pl: require('./i18n/pl.json'),
+	pt: require('./i18n/pt-br.json'),
+	'pt-br': require('./i18n/pt-br.json'),
+	ru: require('./i18n/ru.json'),
+	th: require('./i18n/th.json'),
+	tr: require('./i18n/tr.json'),
+	zh: require('./i18n/zh-hans.json'),
+	'zh-hans': require('./i18n/zh-hans.json'),
+	'zh-hant': require('./i18n/zh-hant.json')
 };
 
 /**

+ 9 - 1
dashboard/i18n/es.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/fr.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/hi.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/ja.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/ko.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/nl.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 2 - 2
dashboard/i18n/pl.json

@@ -5,5 +5,5 @@
         " ",
         " ",
         " "
-	]
-}
+    ]
+}

+ 9 - 1
dashboard/i18n/ru.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/th.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/tr.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/zh-hans.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "zh-hant",
+        "en",
+        " ",
+        " ",
+        " "
+    ]
+}

+ 9 - 1
dashboard/i18n/zh-hant.json

@@ -1 +1,9 @@
-{}
+{
+    "fallback": [
+        "zh-hans",
+        "en",
+        " ",
+        " ",
+        " "
+    ]
+}