Sfoglia il codice sorgente

save new translators from the optional strings

Markus-Rost 4 anni fa
parent
commit
d5b9708dd3
4 ha cambiato i file con 258 aggiunte e 5 eliminazioni
  1. 0 0
      LICENSE.md
  2. 2 3
      cmds/test.js
  3. 154 0
      i18n/_new.json
  4. 102 2
      i18n/es.json

+ 0 - 0
LICENSE → LICENSE.md


+ 2 - 3
cmds/test.js

@@ -14,9 +14,8 @@ function cmd_test(lang, msg, args, line, wiki) {
 		if ( msg.channel.type !== 'text' || !pause[msg.guild.id] ) this.LINK(lang, msg, line, wiki);
 	} else if ( msg.channel.type !== 'text' || !pause[msg.guild.id] ) {
 		if ( msg.isAdmin() && msg.defaultSettings ) help_setup(lang, msg);
-		let textList = lang.get('test.text').filter( text => text );
-		var text = textList[Math.floor(Math.random() * ( textList.length * 5 ))]?.trim();
-		if ( !text ) text = lang.get('test.text.0');
+		let textList = lang.get('test.text').filter( text => text.trim() );
+		var text = textList[Math.floor(Math.random() * ( textList.length * 5 ))] || lang.get('test.text.0');
 		console.log( '- Test: Fully functioning!' );
 		var now = Date.now();
 		msg.replyMsg( text ).then( message => {

+ 154 - 0
i18n/_new.json

@@ -0,0 +1,154 @@
+{
+    "__translator": [
+        "",
+        " ",
+        " ",
+        " ",
+        " ",
+        " ",
+        " ",
+        " ",
+        " "
+    ],
+    "fallback": [
+        "en",
+        " ",
+        " ",
+        " ",
+        " "
+    ],
+    "aliases": {
+        "bug": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "command": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "diff": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "discussion": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "help": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "info": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "invite": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "overview": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "page": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "random": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "search": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "test": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "user": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "verify": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ]
+    },
+    "test": {
+        "text": [
+            "",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " ",
+            " "
+        ]
+    }
+}

+ 102 - 2
i18n/es.json

@@ -1,6 +1,6 @@
 {
     "__translator": [
-        " ",
+        "",
         " ",
         " ",
         " ",
@@ -17,9 +17,109 @@
         " ",
         " "
     ],
+    "aliases": {
+        "bug": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "command": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "diff": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "discussion": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "help": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "info": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "invite": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "overview": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "page": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "random": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "search": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "test": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "user": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ],
+        "verify": [
+            "",
+            " ",
+            " ",
+            " ",
+            " "
+        ]
+    },
     "test": {
         "text": [
-            null,
+            "",
             " ",
             " ",
             " ",