From ebfcfdf76e13b20a146fc4e88e40fe67621c6aec Mon Sep 17 00:00:00 2001 From: Wessel T Date: Sun, 3 Feb 2019 15:01:51 +0100 Subject: [PATCH] Add locale cmd, new lines and change User Agent --- src/assets/i18n/en_us/strings.yml | 33 ++++++-- src/assets/i18n/nl/strings.yml | 98 +++++++++++++++++++++++ src/commands/Discord/Core/locale.js | 71 ++++++++++++++++ src/commands/Discord/Information/stats.js | 2 +- src/core/clients/Discord.js | 2 + src/core/internal/Discord/Schemas.js | 3 +- src/core/registry/Discord/Commands.js | 2 +- src/core/registry/Discord/Locales.js | 1 + src/main.js | 2 +- 9 files changed, 203 insertions(+), 11 deletions(-) create mode 100644 src/assets/i18n/nl/strings.yml create mode 100644 src/commands/Discord/Core/locale.js diff --git a/src/assets/i18n/en_us/strings.yml b/src/assets/i18n/en_us/strings.yml index 8294620..c7ca690 100644 --- a/src/assets/i18n/en_us/strings.yml +++ b/src/assets/i18n/en_us/strings.yml @@ -1,18 +1,19 @@ translation : code : 'en_us' # Language code flag : '🇺🇸' # Language flag - full : 'English (United States)' # Full language name in english + full : 'English' # Full language name in english orig : 'English (United States)' # Full language name in your language + progress : 100 # Progression of the translation (%) translator : # Your information (can leave fields empty) - email : 'discord@go2it.eu' - website : 'https://wessel.meek.moe' + email : 'discord@go2it.eu' # Optional + website : 'https://wessel.meek.moe' # Optional discord : - name : 'Wesselgame' - userid : '107130754189766656' - discrim: '0498' + name : 'Wesselgame' # Required, can be set to "Clyde" + userid : '107130754189766656' # Required, can be set to "1" + discrim: '0498' # Required, can be set to "0001" error : - - '$[author:mention] **>** An error occured while executing this command' + - '$[author:mention] **>** An error occurred while executing this command' - 'If this problem keeps occurring, consider joining ***https://discord.gg/SV7DAE9*** and posting your problem there' - '```ini' - '[ Error Information ]' @@ -21,6 +22,24 @@ error : - '```' cooldown: '$[emoji#0] $[author:mention] **>** This command is on cooldown for **$[cooldown:left]**' +core : + locale : + dupe : '$[emoji#0] Your locale is already set to `$[uLocale:code]`' + gdupe : '$[emoji#1] The guild''s locale is already set to `$[gLocale:code]`' + list : + - '$[emoji#2] **>** Your current locale is `$[uLocale:code]`' + - '$[emoji#3] **>** The guild''s locale is `$[gLocale:code]`' + - '' + - '$[emoji#3] **Available locales**:' + - '$[locale:map]' + - '' + - 'Type `$[locale:changeCmd]` to update your/the guild''s locale' + - 'If you want to help translate wump, you can join my [Discord](https://discord.gg/SV7DAE9) and create a pull request on my [GitHub](https://github.com/PassTheWessel/wump/compare)' + gchanged: '$[emoji#4] The guild''s locale changed to `$[gLocale:code]`' + changed : '$[emoji#4] Your locale has changed to `$[uLocale:code]`' + invalid : '$[emoji#5] The locale you provided isn''t a valid locale' + gperms : '$[emoji#6] You''re missing permissions in order to execute this command (`MANAGE_GUILD`)' + util : ping : busy : '$[emoji#0] Pinging...' diff --git a/src/assets/i18n/nl/strings.yml b/src/assets/i18n/nl/strings.yml new file mode 100644 index 0000000..b2aad42 --- /dev/null +++ b/src/assets/i18n/nl/strings.yml @@ -0,0 +1,98 @@ +translation : + code : 'nl' # Language code + flag : '🇳🇱' # Language flag + full : 'Dutch' # Full language name in english + orig : 'Nederlands' # Full language name in your language + progress : 100 # Progression of the translation (%) + translator : # Your information (can leave fields empty) + email : 'discord@go2it.eu' # Optional + website : 'https://wessel.meek.moe' # Optional + discord : + name : 'Wesselgame' # Required, can be set to "Clyde" + userid : '107130754189766656' # Required, can be set to "1" + discrim: '0498' # Required, can be set to "0001" + +error : + - '$[author:mention] **>** Er is een fout opgetreden tijdens het uitvoeren van dit commando' + - 'Als dit probleem zich blijft voordoen, kunt u overwegen lid te worden van *** https: //discord.gg/SV7DAE9*** en uw probleem daar te plaatsen' + - '```ini' + - '[ Fout Informatie ]' + - 'Code = "$[err:code]"' + - 'Bericht = "$[err:message]"' + - '```' +cooldown: '$[emoji#0] $[author:mention] **>** Dit commando is op cooldown voor **$[cooldown:left]**' + +core : + locale : + dupe : '$[emoji#0] Uw landinstelling is al ingesteld op `$[uLocale:code]`' + gdupe : '$[emoji#1] The guild''s locale is already set to `$[gLocale:code]`' + list : + - '$[emoji#2] **>** Uw huidige landinstelling is `$[uLocale:code]`' + - '$[emoji#3] **>** De landinstelling van de gilde is `$[gLocale:code]`' + - '' + - '$[emoji#4] **Beschikbare talen**:' + - '$[locale:map]' + - '' + - 'Typ `$[locale:changeCmd]` om uw/de gilde zijn landinstelling bij te werken' + - 'Als u wilt helpen met het vertalen van wump, kunt u zij aansluiten bij mijn [Discord](https://discord.gg/SV7DAE9) en een pull request op [GitHub](https://github.com/PassTheWessel/wump/compare) te maken' + changed : '$[emoji#5] Uw landinstelling is veranderd naar `$[uLocale:code]`' + gchanged: '$[emoji#6] De landinstelling van de gilde is veranderd naar `$[gLocale:code]`' + invalid : '$[emoji#7] De landinstelling dat u heeft aangegeven is geen geldige landinstelling' + gperms : '$[emoji#8] U heeft onvoldoende rechten om dit commando uit te voeren (`MANAGE_GUILD`)' +util : + ping : + busy : '$[emoji#0] Pingen...' + health : + - 'Onbekend' + - 'Goed' + - 'Oke' + - 'Slecht' + result : + - '$[emoji#2] **Rondvaart**: $[roundtrip]ms' + - '$[emoji#1] **Hartslag**: $[latency]ms' + - '$[emoji#3] **Gezondheid**: $[health]' + math : + busy : '$[emoji#0] Aam het berekenen, dit kan enige tijd duren...' + blocked: ' De methode "$[math:function]" is om veiligheidsredenen uitgeschakeld ' + snipe : + fail : '$[emoji#0] Geen snipebare berichten gevonden' + footer : 'Sniped door $[author:tag] ($[author:id])' + +info : + stats : + fetching: '$[emoji#0] Statistieken aan het ophalen, dit kan enige tijd duren...' + commands: + multi : + - '$[emoji#0] Het voorvoegsel voor **$[guild:name]** is `$[guild:prefix]`' + - '$[emoji#1] typ `$[guild:prefix]command ` voor meer informatie' + - '$[emoji#2] **Links**: [`Uitnodiging`]($[bot:invite]) **|** [`Ondersteuning`](https://discord.gg/SV7DAE9) **|** [`GitHub`](https://github.com/PassTheWessel/wump) **|** [`Patreon`](https://patreon.com/wessel)' + single: + - '**Naam**: $[command:name]' + - '**Syntaxis**: $[command:syntax]' + - '**Aliassen**: $[command:aliases]' + - '**Cooldown**: $[command:cooldown#formatted]' + - '**Argumenten**: $[command:arguments]' + fields: + - 'Informatie' + - 'Plaatjes' + - 'Overig' + - 'Ontwikkelaar' + +image: + fetching : '$[emoji#0] Een willekeurig plaatje aan het ophalen, dit kan enige tijd duren...' + failed_cache: 'Kliek hier als het plaatje niet is geladen' + +developer: + echo : '$[emoji#0] Ongeldig bericht om te echoën' + eval : + args : '$[emoji#0] Ongeldig codefragment om te evalueren' + busy : '$[emoji#1] Aan het evalueren, Dit kan enige tijd duren...' + silent: '$[emoji#2] Codefragment stil uitgevoerd' + types : + - 'geslaagd' + - 'mislukt' + result: + - '$[emoji#3] **Resultaat** (`$[result:type]`):' + - '```js' + - '$[result:message]' + - '```' \ No newline at end of file diff --git a/src/commands/Discord/Core/locale.js b/src/commands/Discord/Core/locale.js new file mode 100644 index 0000000..62b2b29 --- /dev/null +++ b/src/commands/Discord/Core/locale.js @@ -0,0 +1,71 @@ +const { DiscordCommand } = require('../../../core'); + +const larg = require('larg'); + +module.exports = class Locale extends DiscordCommand { + constructor(bot) { + super(bot, { + name : 'locale', + syntax : 'locale <-u|-g>', + aliases : [], + argument : [ '-', '