From 0779444017bd511e9b6c8632ee7bdb02c798373c Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:39:45 +0100 Subject: [PATCH 01/14] major restructuring and refresh of how languages are handled --- activate.js | 121 ---------- active/bot/placeholder.txt | 1 - active/langs/placeholder.txt | 1 - bot/en_gb/{ => general}/access_token.json | 0 bot/en_gb/{ => general}/buttons.json | 0 bot/en_gb/{ => general}/channel_types.json | 0 .../{ => general}/channel_update_types.json | 0 .../{ => general}/command_responses.json | 0 .../{ => general}/emoji_update_types.json | 0 bot/en_gb/{ => general}/gui_constants.json | 0 .../{ => general}/guild_update_types.json | 0 bot/en_gb/{ => general}/ignore_options.json | 0 bot/en_gb/{ => general}/log_categories.json | 0 bot/en_gb/{ => general}/log_formats.json | 0 bot/en_gb/{ => general}/permissions.json | 0 .../{ => general}/role_update_types.json | 0 bot/en_gb/{ => general}/tags_responses.json | 0 bot/en_gb/{ => general}/time.json | 0 bot/en_pr/{ => general}/access_token.json | 0 bot/en_pr/{ => general}/buttons.json | 0 .../{ => general}/channel_update_types.json | 0 .../{ => general}/command_responses.json | 0 .../{ => general}/emoji_update_types.json | 0 .../{ => general}/guild_update_types.json | 0 bot/en_pr/{ => general}/ignore_options.json | 0 bot/en_pr/{ => general}/log_categories.json | 0 bot/en_pr/{ => general}/log_formats.json | 0 bot/en_pr/{ => general}/permissions.json | 0 .../{ => general}/role_update_types.json | 0 bot/en_pr/{ => general}/tags_responses.json | 0 bot/en_pr/{ => general}/time.json | 0 bot/en_us/{ => general}/access_token.json | 0 bot/en_us/{ => general}/buttons.json | 0 bot/en_us/{ => general}/channel_types.json | 0 .../{ => general}/channel_update_types.json | 0 .../{ => general}/command_responses.json | 0 .../{ => general}/emoji_update_types.json | 0 bot/en_us/{ => general}/gui_constants.json | 0 .../{ => general}/guild_update_types.json | 0 bot/en_us/{ => general}/ignore_options.json | 0 bot/en_us/{ => general}/log_categories.json | 0 bot/en_us/{ => general}/log_formats.json | 0 bot/en_us/{ => general}/permissions.json | 0 .../{ => general}/role_update_types.json | 0 bot/en_us/{ => general}/tags_responses.json | 0 bot/en_us/{ => general}/time.json | 0 bot/nl/{ => general}/buttons.json | 0 bot/nl/{ => general}/channel_types.json | 0 bot/nl/general/command_responses.json | 217 +++++++++++++++++ bot/nl/{ => general}/gui_constants.json | 0 bot/nl/{ => general}/guild_update_types.json | 0 bot/nl/{ => general}/permissions.json | 0 bot/nl/{ => general}/role_update_types.json | 0 bot/nl/{ => general}/tags_responses.json | 0 bot/pl/{ => general}/access_token.json | 0 bot/pl/{ => general}/buttons.json | 0 bot/pl/{ => general}/channel_types.json | 0 .../{ => general}/channel_update_types.json | 0 bot/pl/general/command_responses.json | 219 ++++++++++++++++++ bot/pl/{ => general}/emoji_update_types.json | 0 bot/pl/{ => general}/gui_constants.json | 0 bot/pl/{ => general}/guild_update_types.json | 0 bot/pl/{ => general}/ignore_options.json | 0 bot/pl/{ => general}/log_categories.json | 0 bot/pl/{ => general}/log_formats.json | 0 bot/pl/{ => general}/permissions.json | 0 bot/pl/{ => general}/role_update_types.json | 0 bot/pl/{ => general}/tags_responses.json | 0 bot/pl/{ => general}/time.json | 0 bot/tr/{ => general}/buttons.json | 0 bot/tr/general/command_responses.json | 213 +++++++++++++++++ bot/tr/{ => general}/guild_update_types.json | 0 bot/tr/{ => general}/permissions.json | 0 bot/tr/{ => general}/role_update_types.json | 0 bot/tr/{ => general}/tags_responses.json | 0 bot/vi/{ => general}/buttons.json | 0 bot/vi/general/command_responses.json | 213 +++++++++++++++++ bot/vi/{ => general}/guild_update_types.json | 0 bot/vi/{ => general}/permissions.json | 0 bot/vi/{ => general}/role_update_types.json | 0 bot/vi/{ => general}/tags_responses.json | 0 get.js | 53 +++++ index.js | 2 +- 83 files changed, 916 insertions(+), 124 deletions(-) delete mode 100644 activate.js delete mode 100644 active/bot/placeholder.txt delete mode 100644 active/langs/placeholder.txt rename bot/en_gb/{ => general}/access_token.json (100%) rename bot/en_gb/{ => general}/buttons.json (100%) rename bot/en_gb/{ => general}/channel_types.json (100%) rename bot/en_gb/{ => general}/channel_update_types.json (100%) rename bot/en_gb/{ => general}/command_responses.json (100%) rename bot/en_gb/{ => general}/emoji_update_types.json (100%) rename bot/en_gb/{ => general}/gui_constants.json (100%) rename bot/en_gb/{ => general}/guild_update_types.json (100%) rename bot/en_gb/{ => general}/ignore_options.json (100%) rename bot/en_gb/{ => general}/log_categories.json (100%) rename bot/en_gb/{ => general}/log_formats.json (100%) rename bot/en_gb/{ => general}/permissions.json (100%) rename bot/en_gb/{ => general}/role_update_types.json (100%) rename bot/en_gb/{ => general}/tags_responses.json (100%) rename bot/en_gb/{ => general}/time.json (100%) rename bot/en_pr/{ => general}/access_token.json (100%) rename bot/en_pr/{ => general}/buttons.json (100%) rename bot/en_pr/{ => general}/channel_update_types.json (100%) rename bot/en_pr/{ => general}/command_responses.json (100%) rename bot/en_pr/{ => general}/emoji_update_types.json (100%) rename bot/en_pr/{ => general}/guild_update_types.json (100%) rename bot/en_pr/{ => general}/ignore_options.json (100%) rename bot/en_pr/{ => general}/log_categories.json (100%) rename bot/en_pr/{ => general}/log_formats.json (100%) rename bot/en_pr/{ => general}/permissions.json (100%) rename bot/en_pr/{ => general}/role_update_types.json (100%) rename bot/en_pr/{ => general}/tags_responses.json (100%) rename bot/en_pr/{ => general}/time.json (100%) rename bot/en_us/{ => general}/access_token.json (100%) rename bot/en_us/{ => general}/buttons.json (100%) rename bot/en_us/{ => general}/channel_types.json (100%) rename bot/en_us/{ => general}/channel_update_types.json (100%) rename bot/en_us/{ => general}/command_responses.json (100%) rename bot/en_us/{ => general}/emoji_update_types.json (100%) rename bot/en_us/{ => general}/gui_constants.json (100%) rename bot/en_us/{ => general}/guild_update_types.json (100%) rename bot/en_us/{ => general}/ignore_options.json (100%) rename bot/en_us/{ => general}/log_categories.json (100%) rename bot/en_us/{ => general}/log_formats.json (100%) rename bot/en_us/{ => general}/permissions.json (100%) rename bot/en_us/{ => general}/role_update_types.json (100%) rename bot/en_us/{ => general}/tags_responses.json (100%) rename bot/en_us/{ => general}/time.json (100%) rename bot/nl/{ => general}/buttons.json (100%) rename bot/nl/{ => general}/channel_types.json (100%) create mode 100644 bot/nl/general/command_responses.json rename bot/nl/{ => general}/gui_constants.json (100%) rename bot/nl/{ => general}/guild_update_types.json (100%) rename bot/nl/{ => general}/permissions.json (100%) rename bot/nl/{ => general}/role_update_types.json (100%) rename bot/nl/{ => general}/tags_responses.json (100%) rename bot/pl/{ => general}/access_token.json (100%) rename bot/pl/{ => general}/buttons.json (100%) rename bot/pl/{ => general}/channel_types.json (100%) rename bot/pl/{ => general}/channel_update_types.json (100%) create mode 100644 bot/pl/general/command_responses.json rename bot/pl/{ => general}/emoji_update_types.json (100%) rename bot/pl/{ => general}/gui_constants.json (100%) rename bot/pl/{ => general}/guild_update_types.json (100%) rename bot/pl/{ => general}/ignore_options.json (100%) rename bot/pl/{ => general}/log_categories.json (100%) rename bot/pl/{ => general}/log_formats.json (100%) rename bot/pl/{ => general}/permissions.json (100%) rename bot/pl/{ => general}/role_update_types.json (100%) rename bot/pl/{ => general}/tags_responses.json (100%) rename bot/pl/{ => general}/time.json (100%) rename bot/tr/{ => general}/buttons.json (100%) create mode 100644 bot/tr/general/command_responses.json rename bot/tr/{ => general}/guild_update_types.json (100%) rename bot/tr/{ => general}/permissions.json (100%) rename bot/tr/{ => general}/role_update_types.json (100%) rename bot/tr/{ => general}/tags_responses.json (100%) rename bot/vi/{ => general}/buttons.json (100%) create mode 100644 bot/vi/general/command_responses.json rename bot/vi/{ => general}/guild_update_types.json (100%) rename bot/vi/{ => general}/permissions.json (100%) rename bot/vi/{ => general}/role_update_types.json (100%) rename bot/vi/{ => general}/tags_responses.json (100%) create mode 100644 get.js diff --git a/activate.js b/activate.js deleted file mode 100644 index f799472..0000000 --- a/activate.js +++ /dev/null @@ -1,121 +0,0 @@ -import fs from "fs"; -import path from "path"; -const fallbackLanguage = "en_us"; - -const baseDirectory = "bot"; -import languages from "./bot/languages.json" with { type: "json" }; - -const languagesLocation = path.join(process.cwd(), "languages", baseDirectory); -const activeLanguagesLocation = path.join( - process.cwd(), - "languages", - "active", - baseDirectory -); - -// relative file path is the path after the locale directory -function loadFile(locale, relativeFilePath) { - const filePath = path.join(languagesLocation, locale, relativeFilePath); - - try { - let data; - if (!fs.existsSync(filePath)) data = "{}"; - else data = fs.readFileSync(filePath, "utf8"); - const jsonData = JSON.parse(data); - const fallbackLanguageData = JSON.parse( - fs.readFileSync( - path.join(languagesLocation, fallbackLanguage, relativeFilePath), - "utf8" - ) - ); - function checkFields(obj, path = "") { - Object.keys(obj).forEach((key) => { - const value = obj[key]; - const currentPath = path ? `${path}.${key}` : key; - - if (typeof value === "string") { - let pointer = fallbackLanguageData; - const structPath = currentPath.split("."); - for (let i = 0; i < structPath.length - 1; i++) { - pointer = pointer[structPath[i]]; - } - pointer[structPath[structPath.length - 1]] = value; - } else if (typeof value === "object" && value !== null) { - checkFields(value, currentPath); - } - }); - } - - checkFields(jsonData); - - const absolutePathToActiveSubdirectory = path.join( - activeLanguagesLocation, - locale, - relativeFilePath - ); - - if (!fs.existsSync(path.dirname(absolutePathToActiveSubdirectory))) - fs.mkdirSync(path.dirname(absolutePathToActiveSubdirectory), { - recursive: true, - }); - - fs.writeFileSync( - absolutePathToActiveSubdirectory, - JSON.stringify(fallbackLanguageData), - { recursive: true } - ); - } catch (err) { - console.error(`Error processing ${filePath}:`, err); - foundErrors = true; - } -} - -function loadSubdirectory(locale, relativePath) { - const absolutePath = path.join( - languagesLocation, - fallbackLanguage, - relativePath - ); - const subdirectories = fs - .readdirSync(absolutePath, { withFileTypes: true }) - .filter((dirent) => dirent.isDirectory()) - .map((dirent) => dirent.name); - const subfiles = fs - .readdirSync(absolutePath, { withFileTypes: true }) - .filter((dirent) => !dirent.isDirectory()) - .map((dirent) => dirent.name); - for (let i = 0; i < subdirectories.length; i++) { - const subdirectoryPath = path.join(relativePath, subdirectories[i]); - loadSubdirectory(locale, subdirectoryPath); - } - for (let i = 0; i < subfiles.length; i++) { - const filePath = path.join(relativePath, subfiles[i]); - loadFile(locale, filePath); - } -} - -function activate() { - Object.entries(languages).forEach(([key, value]) => { - const directory = path.join( - process.cwd(), - "languages", - baseDirectory, - value - ); - console.log(`Processing language code ${key}...`); - if (!fs.existsSync(directory)) { - console.log( - `Skipping non-existent directory: ${directory} for language code ${key}` - ); - return; - } - - if (!fs.existsSync(activeLanguagesLocation)) - fs.mkdirSync(activeLanguagesLocation, { recursive: true }); - - console.log(`Copying ${directory}...`); - loadSubdirectory(value, "/"); - }); -} - -export default activate; diff --git a/active/bot/placeholder.txt b/active/bot/placeholder.txt deleted file mode 100644 index 67f8d07..0000000 --- a/active/bot/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -Autogenerated files \ No newline at end of file diff --git a/active/langs/placeholder.txt b/active/langs/placeholder.txt deleted file mode 100644 index 67f8d07..0000000 --- a/active/langs/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -Autogenerated files \ No newline at end of file diff --git a/bot/en_gb/access_token.json b/bot/en_gb/general/access_token.json similarity index 100% rename from bot/en_gb/access_token.json rename to bot/en_gb/general/access_token.json diff --git a/bot/en_gb/buttons.json b/bot/en_gb/general/buttons.json similarity index 100% rename from bot/en_gb/buttons.json rename to bot/en_gb/general/buttons.json diff --git a/bot/en_gb/channel_types.json b/bot/en_gb/general/channel_types.json similarity index 100% rename from bot/en_gb/channel_types.json rename to bot/en_gb/general/channel_types.json diff --git a/bot/en_gb/channel_update_types.json b/bot/en_gb/general/channel_update_types.json similarity index 100% rename from bot/en_gb/channel_update_types.json rename to bot/en_gb/general/channel_update_types.json diff --git a/bot/en_gb/command_responses.json b/bot/en_gb/general/command_responses.json similarity index 100% rename from bot/en_gb/command_responses.json rename to bot/en_gb/general/command_responses.json diff --git a/bot/en_gb/emoji_update_types.json b/bot/en_gb/general/emoji_update_types.json similarity index 100% rename from bot/en_gb/emoji_update_types.json rename to bot/en_gb/general/emoji_update_types.json diff --git a/bot/en_gb/gui_constants.json b/bot/en_gb/general/gui_constants.json similarity index 100% rename from bot/en_gb/gui_constants.json rename to bot/en_gb/general/gui_constants.json diff --git a/bot/en_gb/guild_update_types.json b/bot/en_gb/general/guild_update_types.json similarity index 100% rename from bot/en_gb/guild_update_types.json rename to bot/en_gb/general/guild_update_types.json diff --git a/bot/en_gb/ignore_options.json b/bot/en_gb/general/ignore_options.json similarity index 100% rename from bot/en_gb/ignore_options.json rename to bot/en_gb/general/ignore_options.json diff --git a/bot/en_gb/log_categories.json b/bot/en_gb/general/log_categories.json similarity index 100% rename from bot/en_gb/log_categories.json rename to bot/en_gb/general/log_categories.json diff --git a/bot/en_gb/log_formats.json b/bot/en_gb/general/log_formats.json similarity index 100% rename from bot/en_gb/log_formats.json rename to bot/en_gb/general/log_formats.json diff --git a/bot/en_gb/permissions.json b/bot/en_gb/general/permissions.json similarity index 100% rename from bot/en_gb/permissions.json rename to bot/en_gb/general/permissions.json diff --git a/bot/en_gb/role_update_types.json b/bot/en_gb/general/role_update_types.json similarity index 100% rename from bot/en_gb/role_update_types.json rename to bot/en_gb/general/role_update_types.json diff --git a/bot/en_gb/tags_responses.json b/bot/en_gb/general/tags_responses.json similarity index 100% rename from bot/en_gb/tags_responses.json rename to bot/en_gb/general/tags_responses.json diff --git a/bot/en_gb/time.json b/bot/en_gb/general/time.json similarity index 100% rename from bot/en_gb/time.json rename to bot/en_gb/general/time.json diff --git a/bot/en_pr/access_token.json b/bot/en_pr/general/access_token.json similarity index 100% rename from bot/en_pr/access_token.json rename to bot/en_pr/general/access_token.json diff --git a/bot/en_pr/buttons.json b/bot/en_pr/general/buttons.json similarity index 100% rename from bot/en_pr/buttons.json rename to bot/en_pr/general/buttons.json diff --git a/bot/en_pr/channel_update_types.json b/bot/en_pr/general/channel_update_types.json similarity index 100% rename from bot/en_pr/channel_update_types.json rename to bot/en_pr/general/channel_update_types.json diff --git a/bot/en_pr/command_responses.json b/bot/en_pr/general/command_responses.json similarity index 100% rename from bot/en_pr/command_responses.json rename to bot/en_pr/general/command_responses.json diff --git a/bot/en_pr/emoji_update_types.json b/bot/en_pr/general/emoji_update_types.json similarity index 100% rename from bot/en_pr/emoji_update_types.json rename to bot/en_pr/general/emoji_update_types.json diff --git a/bot/en_pr/guild_update_types.json b/bot/en_pr/general/guild_update_types.json similarity index 100% rename from bot/en_pr/guild_update_types.json rename to bot/en_pr/general/guild_update_types.json diff --git a/bot/en_pr/ignore_options.json b/bot/en_pr/general/ignore_options.json similarity index 100% rename from bot/en_pr/ignore_options.json rename to bot/en_pr/general/ignore_options.json diff --git a/bot/en_pr/log_categories.json b/bot/en_pr/general/log_categories.json similarity index 100% rename from bot/en_pr/log_categories.json rename to bot/en_pr/general/log_categories.json diff --git a/bot/en_pr/log_formats.json b/bot/en_pr/general/log_formats.json similarity index 100% rename from bot/en_pr/log_formats.json rename to bot/en_pr/general/log_formats.json diff --git a/bot/en_pr/permissions.json b/bot/en_pr/general/permissions.json similarity index 100% rename from bot/en_pr/permissions.json rename to bot/en_pr/general/permissions.json diff --git a/bot/en_pr/role_update_types.json b/bot/en_pr/general/role_update_types.json similarity index 100% rename from bot/en_pr/role_update_types.json rename to bot/en_pr/general/role_update_types.json diff --git a/bot/en_pr/tags_responses.json b/bot/en_pr/general/tags_responses.json similarity index 100% rename from bot/en_pr/tags_responses.json rename to bot/en_pr/general/tags_responses.json diff --git a/bot/en_pr/time.json b/bot/en_pr/general/time.json similarity index 100% rename from bot/en_pr/time.json rename to bot/en_pr/general/time.json diff --git a/bot/en_us/access_token.json b/bot/en_us/general/access_token.json similarity index 100% rename from bot/en_us/access_token.json rename to bot/en_us/general/access_token.json diff --git a/bot/en_us/buttons.json b/bot/en_us/general/buttons.json similarity index 100% rename from bot/en_us/buttons.json rename to bot/en_us/general/buttons.json diff --git a/bot/en_us/channel_types.json b/bot/en_us/general/channel_types.json similarity index 100% rename from bot/en_us/channel_types.json rename to bot/en_us/general/channel_types.json diff --git a/bot/en_us/channel_update_types.json b/bot/en_us/general/channel_update_types.json similarity index 100% rename from bot/en_us/channel_update_types.json rename to bot/en_us/general/channel_update_types.json diff --git a/bot/en_us/command_responses.json b/bot/en_us/general/command_responses.json similarity index 100% rename from bot/en_us/command_responses.json rename to bot/en_us/general/command_responses.json diff --git a/bot/en_us/emoji_update_types.json b/bot/en_us/general/emoji_update_types.json similarity index 100% rename from bot/en_us/emoji_update_types.json rename to bot/en_us/general/emoji_update_types.json diff --git a/bot/en_us/gui_constants.json b/bot/en_us/general/gui_constants.json similarity index 100% rename from bot/en_us/gui_constants.json rename to bot/en_us/general/gui_constants.json diff --git a/bot/en_us/guild_update_types.json b/bot/en_us/general/guild_update_types.json similarity index 100% rename from bot/en_us/guild_update_types.json rename to bot/en_us/general/guild_update_types.json diff --git a/bot/en_us/ignore_options.json b/bot/en_us/general/ignore_options.json similarity index 100% rename from bot/en_us/ignore_options.json rename to bot/en_us/general/ignore_options.json diff --git a/bot/en_us/log_categories.json b/bot/en_us/general/log_categories.json similarity index 100% rename from bot/en_us/log_categories.json rename to bot/en_us/general/log_categories.json diff --git a/bot/en_us/log_formats.json b/bot/en_us/general/log_formats.json similarity index 100% rename from bot/en_us/log_formats.json rename to bot/en_us/general/log_formats.json diff --git a/bot/en_us/permissions.json b/bot/en_us/general/permissions.json similarity index 100% rename from bot/en_us/permissions.json rename to bot/en_us/general/permissions.json diff --git a/bot/en_us/role_update_types.json b/bot/en_us/general/role_update_types.json similarity index 100% rename from bot/en_us/role_update_types.json rename to bot/en_us/general/role_update_types.json diff --git a/bot/en_us/tags_responses.json b/bot/en_us/general/tags_responses.json similarity index 100% rename from bot/en_us/tags_responses.json rename to bot/en_us/general/tags_responses.json diff --git a/bot/en_us/time.json b/bot/en_us/general/time.json similarity index 100% rename from bot/en_us/time.json rename to bot/en_us/general/time.json diff --git a/bot/nl/buttons.json b/bot/nl/general/buttons.json similarity index 100% rename from bot/nl/buttons.json rename to bot/nl/general/buttons.json diff --git a/bot/nl/channel_types.json b/bot/nl/general/channel_types.json similarity index 100% rename from bot/nl/channel_types.json rename to bot/nl/general/channel_types.json diff --git a/bot/nl/general/command_responses.json b/bot/nl/general/command_responses.json new file mode 100644 index 0000000..a85532f --- /dev/null +++ b/bot/nl/general/command_responses.json @@ -0,0 +1,217 @@ +{ + "disable": "Uitschakelen", + "enable": "Inschakelen", + "error-401-0": "Opdracht mislukt", + "error-401-1-type-0": "Ik kan deze gebruiker niet verbannen", + "error-401-1-type-1": "Ik kan deze gebruiker niet kicken", + "error-401-1-type-2": "Ik kan deze gebruiker niet dempen", + "error-401-1-type-3": "Ik kan deze gebruiker niet ontdempen", + "error-403-0": "Onvoldoende rechten", + "error-403-1-type-0": "Zorg ervoor dat ik de 'BAN_MEMBERS' machtiging heb", + "error-403-1-type-1": "Zorg ervoor dat ik de 'KICK_MEMBERS' machtiging heb", + "error-403-1-type-2": "Zorg ervoor dat ik de 'MANAGE_ROLES' machtiging heb en dat de 'Muted' (gedempt) rol onder mijn hoogste rol staat", + "error-403-1-type-3": "Zorg ervoor dat ik de 'MANAGE_MESSAGES' machtiging heb", + "error-404-0": "Gebruiker niet gevonden", + "error-404-1": "Noem een gebruiker, plak hun ID of typ hun gebruikersnaam", + "error-405-0": "Pardon?", + "error-405-1": "Dat ga ik niet doen lol", + "error-406-0": "Je hebt geen toestemming", + "error-407-0": "Je hebt de macht niet om dit te doen", + "error-409-0-type-0": "Deze gebruiker is al verbannen", + "error-409-0-type-1": "Deze gebruiker is al gedempt", + "error-409-0-type-2": "Deze gebruiker is al ontbannen", + "error-409-0-type-3": "Deze gebruiker is al ontdempt", + "error-429-0": "Ongeldig nummer", + "error-429-1": "Voer een geldig geheel getal in dat binnen het bereik (1-100) ligt", + "error-430-0": "Geen berichten", + "error-430-1": "Er zijn geen berichten gevonden om te zuiveren", + "error-431-0": "Ongeldige berichtlink", + "error-431-1": "Voer een geldig berichtlink in", + "error-432-0": "Geen Quark log", + "error-432-1": "Dit bericht is geen geldige Quark log", + "error-433-0": "Ongeldige begin- en eindberichten", + "error-433-1": "Het beginbericht moet ouder zijn dan het eindbericht", + "error-434-0": "Verschillende kanalen", + "error-434-1": "Het beginbericht en eindbericht moeten tot hetzelfde kanaal behoren", + "error-435-0": "Cooldown actief", + "error-435-1": "Dit commando kan slechts om de 15 minuten worden gebruikt", + "error-try-help-again": "Probeer opnieuw het help-commando uit te voeren...", + "error-no-modlog": "Geen modlog kanaal", + "error-invalid-log": "Modlog incident niet gevonden", + + "error-timeout-period-too-long-0": "Time-out periode te lang", + "error-timeout-period-too-long-1": "Time-out periode moet minder dan 28 dagen zijn", + + "response-ban": "Verbannen", + "response-kick": "Gekicked", + "response-mute": "Gedempt", + "response-unmute": "Ontdempt", + "response-unban": "Ontbannen", + "response-purge": "{count} berichten gezuiverd", + "response-customise-dash": "Aanpassingsinstellingen zijn verplaatst naar ons [web dashboard]!", + "response-customise-1": "Log berichten tot 2 weken oud, pas logs aan en nog veel meer met Quark Pro...", + "response-customise-2": "[UK, US, EU] Klik op mijn profiel om te upgraden!", + "response-customise-3": "Of... {proLink}", + "response-customise-4": "Probeer kleur aanpassing gratis uit op {inventoryLink}", + + "response-case-updated": "Incident bijgewerkt!", + "response-debug": "Debug log verzonden!", + "response-status-enabled": "Status kanaal updates ingeschakeld!", + "response-status-disabled": "Status kanaal updates uitgeschakeld!", + + "target0-command": "doel", + "target1-command": "doelen", + "message0-command": "bericht", + "executor0-command": "uitvoerder", + "executor1-command": "uitvoerders", + "channel0-command": "kanaal", + "channel1-command": "kanalen", + + "serverlog-web-promote": "...of bekijk ons web dashboard!", + "serverlog-select": "Selecteer serverlog kanaal", + "serverlog-unset": "Kanaal niet ingesteld", + "serverlog-set": "Kanaal ingesteld", + "serverlog-setchannel": "Kanaal ingesteld op {channel}", + "setserverlog-confirm0-set": "Server-Log Kanaal Ingesteld", + "setserverlog-confirm0-unset": "Server-Log Kanaal Niet Ingesteld", + "setserverlog-confirm1-set": "Alle server-log gebeurtenissen worden nu in dit kanaal vastgelegd.\n\n[**Bezoek Quark's web dashboard voor meer configuratieopties!**]({quark_website_url}/dashboard/{guild_id})", + "setserverlog-confirm1-unset": "Je ontvangt geen berichten meer over gebeurtenissen in deze server tenzij je andere kanalen hebt ingesteld om de gebeurtenissen naar te sturen.", + "setserverlog-confirm0-options-set": "Server-Log {type} Kanaal Ingesteld", + "setserverlog-confirm0-options-unset": "Server-Log {type} Kanaal Niet Ingesteld", + "setserverlog-confirm0-options-stoplog": "Server-Log {type} Loggen Gestopt", + "setserverlog-confirm1-options-set": "Server {type} wordt nu in dit kanaal vastgelegd.\n\nOm dit kanaal in te stellen, voer het commando opnieuw uit in dit kanaal.", + "setserverlog-confirm1-options-unset": "Server {type} wordt niet langer in dit kanaal vastgelegd.\n\nOm dit kanaal in te stellen, voer het commando opnieuw uit in dit kanaal.", + "setserverlog-confirm1-options-stoplog": "Server {type} blijft nu in het hoofd serverlog kanaal gelogd (als er een is ingesteld).\n\nOm dit ongedaan te maken, voer het commando hier opnieuw uit.", + "setserverlog-type-members-0": "Leden", + "setserverlog-type-members-1": "leden", + "setserverlog-type-actions-0": "Acties", + "setserverlog-type-actions-1": "acties", + "setserverlog-type-text-0": "Tekst Kanaal Gebeurtenissen", + "setserverlog-type-text-1": "tekst kanaal gebeurtenissen", + "setserverlog-type-voice-0": "Voice Kanaal Gebeurtenissen", + "setserverlog-type-voice-1": "voice kanaal gebeurtenissen", + "setserverlog-type-files-0": "Bestanden", + "setserverlog-type-files-1": "bestanden", + "setserverlog-type-server-0": "Server", + "setserverlog-type-server-1": "server", + "setserverlog-type-roles-0": "Rol Gebeurtenissen", + "setserverlog-type-roles-1": "rol gebeurtenissen", + "setserverlog-type-channels-0": "Kanaal Gebeurtenissen", + "setserverlog-type-channels-1": "kanaal gebeurtenissen", + "setserverlog-type-modlogs-0": "Modlogs", + "setserverlog-type-modlogs-1": "modlogs", + "setserverlog-spoilers": "Spoilers", + "setserverlog-spoilers-0": "Serverlog spoilers ingesteld op {result}", + "setserverlog-enable-status-updates": "Statusupdates inschakelen!", + "setserverlog-enable-status-updates-desc": "Ontvang meldingen van alle laatste updates, uitvaltijd en andere belangrijke communicatie van de ontwikkelaars!", + "setserverlog-enable-status-updates-desc-1": "We raden sterk aan dit in een van je kanalen in te schakelen!", + "setserverlog-check-permissions": "Zorg ervoor dat Quark toestemming heeft om berichten te verzenden in dit kanaal, anders wordt het kanaal niet ingesteld.", + + "festive-title": "Gratis Feestelijke Gift!", + "festive-claim": "Claim je gratis gift!", + + "help-overview-website-description": "Stel Quark eenvoudig in en beheer het via het [web dashboard]!", + "help-overview-inventory-description": "Beheer je abonnementen of krijg enkele [Quark Pro] functies gratis!", + "help-overview-view-inv": "Bekijk Inventaris", + "help-overview-help": "Help", + "help-overview-website": "Website", + "help-overview-serverlog": "Serverlog", + "help-overview-modlog": "Modlog", + "help-overview-commands": "Commando's", + "help-overview-language": "Taal", + "help-overview-premium": "Premium", + "help-overview-inventory": "Inventaris", + "help-overview-channel-isset": "Kanaal ingesteld op {channel}", + "help-overview-channel-isnotset": "Voer {command} uit in het gewenste kanaal", + "help-overview-view-options": "Voer {command} uit om opties te zien", + "help-overview-view-options-and-statuses": "Voer {command} uit om statussen en opties te zien", + "help-overview-view-all-commands": "Voer {command} uit om alle commando's te zien", + "help-overview-change-channel": "Verander dit door {command} uit te voeren in het gewenste kanaal.", + "help-overview-manage-premium": "Voer {command} uit om premium te beheren", + "language-set": "Taal ingesteld op {language}", + + "help-serverlog-help": "Serverlog Hulp", + "help-serverlog-0": "Kanaalbeperkingen", + "help-serverlog-1": "Negeeropties", + "help-serverlog-2": "Spoilers", + "help-serverlog-0-desc": "Voor meer controle over logs, zoals het selecteren van verschillende kanalen voor verschillende logtypes, bezoek [Quark's web dashboard]", + "help-serverlog-1-desc": "Om te voorkomen dat bepaalde kanalen, gebruikers of berichten worden gelogd, voer uit:\n{ignorecommand}", + "help-serverlog-2-desc": "Om te wisselen of spoilers worden toegepast op alle media die in de serverlog worden verzonden, voer uit: {command}", + "help-serverlog-2-on": "Spoilers zijn ingeschakeld.", + "help-serverlog-2-off": "Spoilers zijn uitgeschakeld.", + + "help-commands-help": "Commando's Hulp", + "help-commands-moderation": "Moderatie", + "help-commands-tags": "Tags", + "help-commands-notes": "Notities", + "help-commands-other": "Overig", + "help-notes-help": "Notities Hulp", + "help-tags-help": "Tags Hulp", + "help-commands-desc": "Sleutel:\n`` `[optioneel]`\nDit is niet een lijst van elk commando", + "help-info": "Nog steeds hulp nodig? **Join Quark's support server!**", + + "need-to-vote-title": "Je moet stemmen om dit commando te gebruiken!", + "need-to-vote": "Klik hier om te stemmen", + "need-to-vote-footer": "Stemmen duren tot een minuut om geregistreerd te worden", + + "initialreactors-expired": "verlopen", + "initialreactors-notfound": "Geen reacties gevonden", + + "configCommand": { + "title": "Serverlog Configuratie", + "selection": "Selecteer een categorie in het menu om configuratie te bekijken.", + "serverLogDesc": "Hoofd Serverlog Kanaal", + "notSet": "Niet ingesteld", + "selectACategory": "Selecteer een categorie", + "overview": "Overzicht", + "formats": { + "log_channels": "Log Kanalen", + "configurable_events": "Configureerbare Gebeurtenissen" + }, + "categories": { + "serverEvents": { + "title": "Leden", + "description": "Ledenacties (join/leave, rollen, bijnamen)" + }, + "textEvents": { + "title": "Berichten", + "description": "Berichtacties (verwijderingen, bewerkingen, pins, reacties)" + }, + "voiceEvents": { + "title": "Stem", + "description": "Stem kanaal acties (join/leave, streams, mute/dempen)" + }, + "serverActions": { + "title": "Server Acties", + "description": "Serveracties (uitnodiging creatie/verwijdering, emoji's)" + }, + "channelEvents": { + "title": "Kanalen", + "description": "Kanaalacties (creaties/verwijderingen, rechten)" + }, + "generalEvents": { + "title": "Server Gebeurtenissen", + "description": "Algemene acties (server modificaties)" + }, + "roleEvents": { + "title": "Rollen", + "description": "Rollenacties (creaties/verwijderingen, rechten)" + }, + "modLog": { + "title": "Mod Logs", + "description": "Moderatieacties (verbanningen, kicks, dempen)" + }, + "overview": { + "title": "Overzicht", + "description": "Overzicht van de hoofd categorie opties" + }, + "quarkEvents": { + "title": "Quark Config", + "description": "Wijzigingen in de configuratie van Quark voor deze server" + }, + "fileEvents": { + "title": "Bestanden" + } + } + } +} \ No newline at end of file diff --git a/bot/nl/gui_constants.json b/bot/nl/general/gui_constants.json similarity index 100% rename from bot/nl/gui_constants.json rename to bot/nl/general/gui_constants.json diff --git a/bot/nl/guild_update_types.json b/bot/nl/general/guild_update_types.json similarity index 100% rename from bot/nl/guild_update_types.json rename to bot/nl/general/guild_update_types.json diff --git a/bot/nl/permissions.json b/bot/nl/general/permissions.json similarity index 100% rename from bot/nl/permissions.json rename to bot/nl/general/permissions.json diff --git a/bot/nl/role_update_types.json b/bot/nl/general/role_update_types.json similarity index 100% rename from bot/nl/role_update_types.json rename to bot/nl/general/role_update_types.json diff --git a/bot/nl/tags_responses.json b/bot/nl/general/tags_responses.json similarity index 100% rename from bot/nl/tags_responses.json rename to bot/nl/general/tags_responses.json diff --git a/bot/pl/access_token.json b/bot/pl/general/access_token.json similarity index 100% rename from bot/pl/access_token.json rename to bot/pl/general/access_token.json diff --git a/bot/pl/buttons.json b/bot/pl/general/buttons.json similarity index 100% rename from bot/pl/buttons.json rename to bot/pl/general/buttons.json diff --git a/bot/pl/channel_types.json b/bot/pl/general/channel_types.json similarity index 100% rename from bot/pl/channel_types.json rename to bot/pl/general/channel_types.json diff --git a/bot/pl/channel_update_types.json b/bot/pl/general/channel_update_types.json similarity index 100% rename from bot/pl/channel_update_types.json rename to bot/pl/general/channel_update_types.json diff --git a/bot/pl/general/command_responses.json b/bot/pl/general/command_responses.json new file mode 100644 index 0000000..83155a7 --- /dev/null +++ b/bot/pl/general/command_responses.json @@ -0,0 +1,219 @@ +{ + "disable": "Wyłącz", + "enable": "Włącz", + + "error-401-0": "Niepowodzenie polecenia", + "error-401-1-type-0": "Nie mogę zbanować tego użytkownika", + "error-401-1-type-1": "Nie mogę wyrzucić tego użytkownika", + "error-401-1-type-2": "Nie mogę wyciszyć tego użytkownika", + "error-401-1-type-3": "Nie mogę odciszyć tego użytkownika", + "error-403-0": "Brak wystarczających uprawnień", + "error-403-1-type-0": "Upewnij się, że mam uprawnienia `BAN_MEMBERS`", + "error-403-1-type-1": "Upewnij się, że mam uprawnienia `KICK_MEMBERS`", + "error-403-1-type-2": "Upewnij się, że mam uprawnienia `MANAGE_ROLES` i że rola `Muted` jest niżej niż moja najwyższa rola", + "error-403-1-type-3": "Upewnij się, że mam uprawnienia `MANAGE_MESSAGES`", + "error-404-0": "Nie znaleziono użytkownika", + "error-404-1": "Proszę oznaczyć użytkownika, wkleić jego ID lub wpisać jego nazwę użytkownika", + "error-405-0": "Słucham?", + "error-405-1": "Nie zrobię tego lol", + "error-406-0": "Nie masz uprawnień", + "error-407-0": "Nie masz władzy, aby to zrobić", + "error-409-0-type-0": "Ten użytkownik jest już zbanowany", + "error-409-0-type-1": "Ten użytkownik jest już wyciszony", + "error-409-0-type-2": "Ten użytkownik jest już odbanowany", + "error-409-0-type-3": "Ten użytkownik jest już odciszony", + "error-429-0": "Nieprawidłowy numer", + "error-429-1": "Wprowadź prawidłową liczbę całkowitą w zakresie (1-100)", + "error-430-0": "Brak wiadomości", + "error-430-1": "Nie znaleziono wiadomości do usunięcia", + "error-431-0": "Nieprawidłowy link do wiadomości", + "error-431-1": "Wprowadź prawidłowy link do wiadomości", + "error-432-0": "Nieprawidłowy log Quark", + "error-432-1": "Ta wiadomość nie jest prawidłowym logiem Quark", + "error-433-0": "Nieprawidłowe wiadomości początkowe i końcowe", + "error-433-1": "Wiadomość początkowa musi być starsza niż wiadomość końcowa", + "error-434-0": "Różne kanały", + "error-434-1": "Wiadomość początkowa i końcowa muszą należeć do tego samego kanału", + "error-435-0": "Aktywny czas oczekiwania", + "error-435-1": "To polecenie można używać tylko co 15 minut", + "error-try-help-again": "Spróbuj ponownie uruchomić polecenie pomocy...", + "error-no-modlog": "Brak kanału modlog", + "error-invalid-log": "Nie znaleziono sprawy modlog", + + "error-timeout-period-too-long-0": "Okres czasu oczekiwania jest zbyt długi", + "error-timeout-period-too-long-1": "Okres czasu oczekiwania musi być krótszy niż 28 dni", + + "response-ban": "Zbanowany", + "response-kick": "Wyrzucony", + "response-mute": "Wyciszony", + "response-unmute": "Odciszony", + "response-unban": "Odbanowany", + "response-purge": "Usunięto {count} wiadomości", + + "response-customise-dash": "Ustawienia personalizacji zostały przeniesione na nasz [web dashboard]!", + "response-customise-1": "Loguj wiadomości do 2 tygodni wstecz, personalizuj logi i wiele więcej z Quark Pro...", + "response-customise-2": "[UK, US, EU] Kliknij na mój profil, aby przejść na wyższy poziom!", + "response-customise-3": "Lub... {proLink}", + "response-customise-4": "Wypróbuj personalizację kolorów za darmo na {inventoryLink}", + + "response-case-updated": "Przypadek zaktualizowany!", + + "response-debug": "Wysłano log debugowania!", + + "response-status-enabled": "Aktualizacje kanału statusu włączone!", + "response-status-disabled": "Aktualizacje kanału statusu wyłączone!", + + "target0-command": "cel", + "target1-command": "cele", + "message0-command": "wiadomość", + "executor0-command": "wykonawca", + "executor1-command": "wykonawcy", + "channel0-command": "kanał", + "channel1-command": "kanały", + + "serverlog-web-promote": "...lub sprawdź nasz web dashboard!", + "serverlog-select": "Wybierz kanał serverlog", + "serverlog-unset": "Kanał niezdefiniowany", + "serverlog-set": "Kanał ustawiony", + "serverlog-setchannel": "Kanał ustawiony na {channel}", + "setserverlog-confirm0-set": "Kanał Server-Log ustawiony", + "setserverlog-confirm0-unset": "Kanał Server-Log niezdefiniowany", + "setserverlog-confirm1-set": "Wszystkie wydarzenia server-log będą teraz rejestrowane w tym kanale.\n\n[**Odwiedź web dashboard Quark, aby uzyskać więcej opcji konfiguracji!**]({quark_website_url}/dashboard/{guild_id})", + "setserverlog-confirm1-unset": "Nie będziesz już otrzymywać wiadomości o wydarzeniach, które występują na tym serwerze, chyba że masz ustawione inne kanały do wyjścia tych wydarzeń.", + "setserverlog-confirm0-options-set": "Kanał Server-Log {type} ustawiony", + "setserverlog-confirm0-options-unset": "Kanał Server-Log {type} niezdefiniowany", + "setserverlog-confirm0-options-stoplog": "Logowanie Server-Log {type} zatrzymane", + "setserverlog-confirm1-options-set": "Server {type} będzie teraz rejestrowany w tym kanale.\n\nAby usunąć ten kanał, uruchom ponownie polecenie w tym kanale.", + "setserverlog-confirm1-options-unset": "Server {type} nie będzie już rejestrowany w tym kanale.\n\nAby ustawić ten kanał, uruchom ponownie polecenie w tym kanale.", + "setserverlog-confirm1-options-stoplog": "Server {type} będzie teraz nadal rejestrowany w głównym kanale serverlog (jeśli jest ustawiony).\n\nAby to cofnąć, uruchom ponownie polecenie tutaj.", + "setserverlog-type-members-0": "Członkowie", + "setserverlog-type-members-1": "członkowie", + "setserverlog-type-actions-0": "Akcje", + "setserverlog-type-actions-1": "akcje", + "setserverlog-type-text-0": "Wydarzenia kanału tekstowego", + "setserverlog-type-text-1": "wydarzenia kanału tekstowego", + "setserverlog-type-voice-0": "Wydarzenia kanału głosowego", + "setserverlog-type-voice-1": "wydarzenia kanału głosowego", + "setserverlog-type-files-0": "Pliki", + "setserverlog-type-files-1": "pliki", + "setserverlog-type-server-0": "Serwer", + "setserverlog-type-server-1": "serwer", + "setserverlog-type-roles-0": "Wydarzenia roli", + "setserverlog-type-roles-1": "wydarzenia roli", + "setserverlog-type-channels-0": "Wydarzenia kanału", + "setserverlog-type-channels-1": "wydarzenia kanału", + "setserverlog-type-modlogs-0": "Modlogi", + "setserverlog-type-modlogs-1": "modlogi", + "setserverlog-type-modlogs-0": "Modlogi", + "setserverlog-type-modlogs-1": "modlogi", + "setserverlog-spoilers": "Spojlery", + "setserverlog-spoilers-0": "Spojlery serverlog ustawione na {result}", + "setserverlog-enable-status-updates": "Włącz aktualizacje statusu!", + "setserverlog-enable-status-updates-desc": "Otrzymuj powiadomienia o wszystkich najnowszych aktualizacjach, przestojach i innych ważnych komunikatach od deweloperów!", + "setserverlog-enable-status-updates-desc-1": "Zalecamy włączenie tego w jednym z twoich kanałów!", + "setserverlog-check-permissions": "Proszę, upewnij się że Quark ma uprawnienia do wysyłania wiadomości na tym kanale, albo kanał nie będzie ustawiony.", + + "festive-title": "Free Festive Gift!", + "festive-claim": "Claim your free gift!", + + "help-overview-website-description": "Łatwo skonfiguruj i zarządzaj Quark z [web dashboard]!", + "help-overview-inventory-description": "Zarządzaj swoimi subskrypcjami lub uzyskaj niektóre funkcje [Quark Pro] za darmo!", + "help-overview-view-inv": "Wyświetl inwentarz", + "help-overview-help": "Pomoc", + "help-overview-website": "Strona internetowa", + "help-overview-serverlog": "Serverlog", + "help-overview-modlog": "Modlog", + "help-overview-commands": "Polecenia", + "help-overview-language": "Język", + "help-overview-premium": "Premium", + "help-overview-inventory": "Inwentarz", + "help-overview-channel-isset": "Kanał ustawiony na {channel}", + "help-overview-channel-isnotset": "Uruchom {command} na żądanym kanale", + "help-overview-view-options": "Uruchom {command}, aby zobaczyć opcje", + "help-overview-view-options-and-statuses": "Uruchom {command}, aby zobaczyć statusy i opcje", + "help-overview-view-all-commands": "Uruchom {command}, aby zobaczyć polecenia", + "help-overview-change-channel": "Zmień to, uruchamiając {command} na żądanym kanale.", + "help-overview-manage-premium": "Uruchom {command}, aby zarządzać premium", + "language-set": "Ustaw język na {language}", + + "help-serverlog-help": "Pomoc Serverlog", + "help-serverlog-0": "Ograniczenia kanału", + "help-serverlog-1": "Opcje ignorowania", + "help-serverlog-2": "Spojlery", + "help-serverlog-0-desc": "Aby uzyskać większą kontrolę nad logami, np. wybór różnych kanałów dla różnych typów logów, odwiedź [web dashboard Quark]", + "help-serverlog-1-desc": "Aby zapobiec rejestrowaniu niektórych kanałów, użytkowników lub wiadomości, uruchom:\n{ignorecommand}", + "help-serverlog-2-desc": "Aby przełączać, czy spoilery są stosowane do wszystkich mediów wysyłanych w serverlog, uruchom: {command}", + "help-serverlog-2-on": "Spojlery są włączone.", + "help-serverlog-2-off": "Spojlery są wyłączone.", + + "help-commands-help": "Pomoc poleceń", + "help-commands-moderation": "Moderacja", + "help-commands-tags": "Tagi", + "help-commands-notes": "Notatki", + "help-commands-other": "Inne", + "help-notes-help": "Pomoc notatek", + "help-tags-help": "Pomoc tagów", + "help-commands-desc": "Klucz:\n`` `[opcjonalne]`\nTo nie jest lista wszystkich poleceń", + "help-info": "Nadal potrzebujesz pomocy? **Dołącz do serwera wsparcia Quark!**", + + "need-to-vote-title": "Musisz zagłosować, aby użyć tego polecenia!", + "need-to-vote": "Kliknij tutaj, aby zagłosować", + "need-to-vote-footer": "Głosy są rejestrowane do minuty", + + "initialreactors-expired": "wykasły", + "initialreactors-notfound": "Nie znaleziono żadnych reakcji", + + "configCommand": { + "title": "Konfiguracja Serverlog", + "selection": "Wybierz kategorię w menu, aby wyświetlić konfigurację.", + "serverLogDesc": "Główny kanał Serverlog", + "notSet": "Niezdefiniowany", + "selectACategory": "Wybierz kategorię", + "overview": "Przegląd", + "formats": { + "log_channels": "Kanały logów", + "configurable_events": "Konfigurowalne wydarzenia" + }, + "categories": { + "serverEvents": { + "title": "Członkowie", + "description": "Akcje członków (dołączenie/wyjście, role, pseudonimy)" + }, + "textEvents": { + "title": "Wiadomości", + "description": "Akcje wiadomości (usunięcia, edycje, przypięcia, reakcje)" + }, + "voiceEvents": { + "title": "Głos", + "description": "Akcje kanału głosowego (dołączenie/wyjście, transmisje, wyciszenie/ogłuszenie)" + }, + "serverActions": { + "title": "Akcje serwera", + "description": "Akcje serwera (tworzenie/usuwanie zaproszeń, emotikony)" + }, + "channelEvents": { + "title": "Kanały", + "description": "Akcje kanału (tworzenie/usuwanie, uprawnienia)" + }, + "generalEvents": { + "title": "Wydarzenia serwera", + "description": "Ogólne akcje (modyfikacje serwera)" + }, + "roleEvents": { + "title": "Role", + "description": "Akcje ról (tworzenie/usuwanie, uprawnienia)" + }, + "modLog": { + "title": "Logi moderatorów", + "description": "Akcje moderacji (bany, wyrzucenia, wyciszenia)" + }, + "overview": { + "title": "Przegląd", + "description": "Przegląd głównych opcji kategorii" + }, + "fileEvents": { + "title": "Pliki" + } + } + } +} diff --git a/bot/pl/emoji_update_types.json b/bot/pl/general/emoji_update_types.json similarity index 100% rename from bot/pl/emoji_update_types.json rename to bot/pl/general/emoji_update_types.json diff --git a/bot/pl/gui_constants.json b/bot/pl/general/gui_constants.json similarity index 100% rename from bot/pl/gui_constants.json rename to bot/pl/general/gui_constants.json diff --git a/bot/pl/guild_update_types.json b/bot/pl/general/guild_update_types.json similarity index 100% rename from bot/pl/guild_update_types.json rename to bot/pl/general/guild_update_types.json diff --git a/bot/pl/ignore_options.json b/bot/pl/general/ignore_options.json similarity index 100% rename from bot/pl/ignore_options.json rename to bot/pl/general/ignore_options.json diff --git a/bot/pl/log_categories.json b/bot/pl/general/log_categories.json similarity index 100% rename from bot/pl/log_categories.json rename to bot/pl/general/log_categories.json diff --git a/bot/pl/log_formats.json b/bot/pl/general/log_formats.json similarity index 100% rename from bot/pl/log_formats.json rename to bot/pl/general/log_formats.json diff --git a/bot/pl/permissions.json b/bot/pl/general/permissions.json similarity index 100% rename from bot/pl/permissions.json rename to bot/pl/general/permissions.json diff --git a/bot/pl/role_update_types.json b/bot/pl/general/role_update_types.json similarity index 100% rename from bot/pl/role_update_types.json rename to bot/pl/general/role_update_types.json diff --git a/bot/pl/tags_responses.json b/bot/pl/general/tags_responses.json similarity index 100% rename from bot/pl/tags_responses.json rename to bot/pl/general/tags_responses.json diff --git a/bot/pl/time.json b/bot/pl/general/time.json similarity index 100% rename from bot/pl/time.json rename to bot/pl/general/time.json diff --git a/bot/tr/buttons.json b/bot/tr/general/buttons.json similarity index 100% rename from bot/tr/buttons.json rename to bot/tr/general/buttons.json diff --git a/bot/tr/general/command_responses.json b/bot/tr/general/command_responses.json new file mode 100644 index 0000000..c23608a --- /dev/null +++ b/bot/tr/general/command_responses.json @@ -0,0 +1,213 @@ +{ + "disable": "Disable", + "enable": "Enable", + + "error-401-0": "Command failed", + "error-401-1-type-0": "I am unable to ban that user", + "error-401-1-type-1": "I am unable to kick that user", + "error-401-1-type-2": "I am unable to mute that user", + "error-401-1-type-3": "I am unable to unmute that user", + "error-403-0": "Insufficient permissions", + "error-403-1-type-0": "Please ensure I have the `BAN_MEMBERS` permission", + "error-403-1-type-1": "Please ensure I have the `KICK_MEMBERS` permission", + "error-403-1-type-2": "Please ensure I have the `MANAGE_ROLES` permission and that the `Muted` role is below my highest role", + "error-403-1-type-3": "Please ensure I have the `MANAGE_MESSAGES` permission", + "error-404-0": "User not found", + "error-404-1": "Please @mention a user, paste their ID or type their username", + "error-405-0": "Excuse me?", + "error-405-1": "I'm not gonna do that lol", + "error-406-0": "You do not permission", + "error-407-0": "You do not have the power to do this", + "error-409-0-type-0": "That user is already banned", + "error-409-0-type-1": "That user is already muted", + "error-409-0-type-2": "That user is already unbanned", + "error-409-0-type-3": "That user is already unmuted", + "error-429-0": "Invalid number", + "error-429-1": "Enter a valid whole number which is within the range (1-100)", + "error-430-0": "No messages", + "error-430-1": "No messages were found to purge", + "error-431-0": "Invalid message link", + "error-431-1": "Please enter a valid message link", + "error-432-0": "Not a Quark log", + "error-432-1": "This message is not a valid Quark log", + "error-433-0": "Invalid start and end messages", + "error-433-1": "The start message must be older than the end message", + "error-434-0": "Different channels", + "error-434-1": "The start message and end message must belong to the same channel", + "error-435-0": "Cooldown active", + "error-435-1": "This command can only be used every 15 minutes", + "error-try-help-again": "Try running the help command again...", + "error-no-modlog": "No modlog channel", + "error-invalid-log": "Modlog case not found", + + "error-timeout-period-too-long-0": "Timeout period too long", + "error-timeout-period-too-long-1": "Timeout period must be less than 28 days", + + "response-ban": "Banned", + "response-kick": "Kicked", + "response-mute": "Muted", + "response-unmute": "Unmuted", + "response-unban": "Unbanned", + "response-purge": "Purged {count} messages", + + "response-customise-dash": "Customisation settings have moved to our [web dashboard]!", + "response-customise-1": "Log messages up to 2 weeks old, customise logs, and so much more with Quark Pro...", + "response-customise-2": "[UK, US, EU] Click onto my profile to upgrade!", + "response-customise-3": "Or... {proLink}", + "response-customise-4": "Try out colour customisation for free at {inventoryLink}", + + "response-case-updated": "Case updated!", + + "response-debug": "Debug log sent!", + + "response-status-enabled": "Status channel updates enabled!", + "response-status-disabled": "Status channel updates disabled!", + + "target0-command": "target", + "target1-command": "targets", + "message0-command": "message", + "executor0-command": "executor", + "executor1-command": "executors", + "channel0-command": "channel", + "channel1-command": "channels", + + "serverlog-web-promote": "...or check out our web dashboard!", + "serverlog-select": "Select serverlog channel", + "serverlog-unset": "Channel unset", + "serverlog-set": "Channel set", + "serverlog-setchannel": "Channel set to {channel}", + "setserverlog-confirm0-set": "Server-Log Channel Set", + "setserverlog-confirm0-unset": "Server-Log Channel Unset", + "setserverlog-confirm1-set": "All server-log events will now be recorded in this channel.\n\n[**Visit Quark's web dashboard for more configuration options!**]({quark_website_url}/dashboard/{guild_id})", + "setserverlog-confirm1-unset": "You will no longer receive messages about events that occur in this server unless you have other channels set to output the events to.", + "setserverlog-confirm0-options-set": "Server-Log {type} Channel Set", + "setserverlog-confirm0-options-unset": "Server-Log {type} Channel Unset", + "setserverlog-confirm0-options-stoplog": "Server-Log {type} Logging Stopped", + "setserverlog-confirm1-options-set": "Server {type} will now be recorded to this channel.\n\nTo unset this channel, re-run the command in this channel.", + "setserverlog-confirm1-options-unset": "Server {type} will no longer be recorded to this channel.\n\nTo set this channel, re-run the command in this channel.", + "setserverlog-confirm1-options-stoplog": "Server {type} will now continue to be logged to the main serverlog channel (if there is one setup).\n\nTo undo this, re-run the command here.", + "setserverlog-type-members-0": "Members", + "setserverlog-type-members-1": "members", + "setserverlog-type-actions-0": "Actions", + "setserverlog-type-actions-1": "actions", + "setserverlog-type-text-0": "Text Channel Events", + "setserverlog-type-text-1": "text channel events", + "setserverlog-type-voice-0": "Voice Channel Events", + "setserverlog-type-voice-1": "voice channel events", + "setserverlog-type-files-0": "Files", + "setserverlog-type-files-1": "files", + "setserverlog-type-server-0": "Server", + "setserverlog-type-server-1": "server", + "setserverlog-type-roles-0": "Role Events", + "setserverlog-type-roles-1": "role events", + "setserverlog-type-channels-0": "Channel Events", + "setserverlog-type-channels-1": "channel events", + "setserverlog-type-modlogs-0": "Modlogs", + "setserverlog-type-modlogs-1": "modlogs", + "setserverlog-spoilers": "Spoilers", + "setserverlog-spoilers-0": "Serverlog spoilers set to {result}", + "setserverlog-enable-status-updates": "Enable Status Updates!", + "setserverlog-enable-status-updates-desc": "Get notified of all the latest updates, downtime, and other important communications from the developers!", + "setserverlog-enable-status-updates-desc-1": "We highly recommend you enable this in one of your channels!", + "setserverlog-check-permissions": "Please ensure Quark has permission to send messages in this channel, or the channel will be unset.", + + "festive-title": "Free Festive Gift!", + "festive-claim": "Claim your free gift!", + + "help-overview-website-description": "Easily set up and manage Quark from the [web dashboard]!", + "help-overview-inventory-description": "Manage your subscriptions or get some [Quark Pro] features for free!", + "help-overview-view-inv": "View Inventory", + "help-overview-help": "Help", + "help-overview-website": "Website", + "help-overview-serverlog": "Serverlog", + "help-overview-modlog": "Modlog", + "help-overview-commands": "Commands", + "help-overview-language": "Language", + "help-overview-premium": "Premium", + "help-overview-inventory": "Inventory", + "help-overview-channel-isset": "Channel set to {channel}", + "help-overview-channel-isnotset": "Run {command} in the desired channel", + "help-overview-view-options": "Run {command} to see options", + "help-overview-view-options-and-statuses": "Run {command} to see statuses and options", + "help-overview-view-all-commands": "Run {command} to see commands", + "help-overview-change-channel": "Change this by running {command} in the desired channel.", + "help-overview-manage-premium": "Run {command} to manage premium", + "language-set": "Set language to {language}", + + "help-serverlog-help": "Serverlog Help", + "help-serverlog-0": "Channel Restrictions", + "help-serverlog-1": "Ignore Options", + "help-serverlog-2": "Spoilers", + "help-serverlog-0-desc": "For more control over logs, such as selecting different channels for different log types, please visit [Quark's web dashboard]", + "help-serverlog-1-desc": "To prevent certain channels, users or messages from being logged, run:\n{ignorecommand}", + "help-serverlog-2-desc": "To toggle whether spoilers are applied to all media sent in the serverlog, run: {command}", + "help-serverlog-2-on": "Spoilers are enabled.", + "help-serverlog-2-off": "Spoilers are disabled.", + + "help-commands-help": "Commands Help", + "help-commands-moderation": "Moderation", + "help-commands-tags": "Tags", + "help-commands-notes": "Notes", + "help-commands-other": "Other", + "help-notes-help": "Notes Help", + "help-tags-help": "Tags Help", + "help-commands-desc": "Key:\n`` `[optional]`\nThis is not a list of every command", + "help-info": "Still need a hand? **Join Quark's support server!**", + + "need-to-vote-title": "You must vote to use this command!", + "need-to-vote": "Click here to vote", + "need-to-vote-footer": "Votes take up to a minute to be registered", + + "configCommand": { + "title": "Serverlog Configuration", + "selection": "Select a category in the menu to view configuration.", + "serverLogDesc": "Serverlog Channel", + "notSet": "Not set", + "selectACategory": "Select a category", + "formats": { + "log_channels": "Log Channels", + "configurable_events": "Configurable Events" + }, + "categories": { + "serverEvents": { + "title": "Members", + "description": "Member actions (join/leave, roles, nicknames)" + }, + "textEvents": { + "title": "Messages", + "description": "Message actions (deletions, edits, pins, reactions)" + }, + "voiceEvents": { + "title": "Voice", + "description": "Voice channel actions (join/leave, streams, mute/deafens)" + }, + "serverActions": { + "title": "Server Actions", + "description": "Server actions (invite creation/deletion, emojis)" + }, + "channelEvents": { + "title": "Channels", + "description": "Channel actions (creations/deletions, permissions)" + }, + "generalEvents": { + "title": "Server Events", + "description": "General actions (server modifications)" + }, + "roleEvents": { + "title": "Roles", + "description": "Role actions (creations/deletions, permissions)" + }, + "modLog": { + "title": "Mod Logs", + "description": "Moderation actions (bans, kicks, mutes)" + }, + "overview": { + "title": "Overview", + "description": "Overview of main category options" + }, + "fileEvents": { + "title": "Files" + } + } + } +} \ No newline at end of file diff --git a/bot/tr/guild_update_types.json b/bot/tr/general/guild_update_types.json similarity index 100% rename from bot/tr/guild_update_types.json rename to bot/tr/general/guild_update_types.json diff --git a/bot/tr/permissions.json b/bot/tr/general/permissions.json similarity index 100% rename from bot/tr/permissions.json rename to bot/tr/general/permissions.json diff --git a/bot/tr/role_update_types.json b/bot/tr/general/role_update_types.json similarity index 100% rename from bot/tr/role_update_types.json rename to bot/tr/general/role_update_types.json diff --git a/bot/tr/tags_responses.json b/bot/tr/general/tags_responses.json similarity index 100% rename from bot/tr/tags_responses.json rename to bot/tr/general/tags_responses.json diff --git a/bot/vi/buttons.json b/bot/vi/general/buttons.json similarity index 100% rename from bot/vi/buttons.json rename to bot/vi/general/buttons.json diff --git a/bot/vi/general/command_responses.json b/bot/vi/general/command_responses.json new file mode 100644 index 0000000..9140ace --- /dev/null +++ b/bot/vi/general/command_responses.json @@ -0,0 +1,213 @@ +{ + "disable": "Tắt", + "enable": "Bật", + + "error-401-0": "Lệnh thất bại", + "error-401-1-type-0": "Tôi không thể cấm người dùng đó", + "error-401-1-type-1": "Tôi không thể đá người dùng đó", + "error-401-1-type-2": "Tôi không thể tắt tiếng người dùng đó", + "error-401-1-type-3": "Tôi không thể bỏ tắt tiếng người dùng đó", + "error-403-0": "Không đủ quyền", + "error-403-1-type-0": "Vui lòng đảm bảo tôi có quyền `BAN_MEMBERS`", + "error-403-1-type-1": "Vui lòng đảm bảo tôi có quyền `KICK_MEMBERS`", + "error-403-1-type-2": "Vui lòng đảm bảo tôi có quyền `MANAGE_ROLES` và vai trò `Muted` nằm dưới vai trò cao nhất của tôi", + "error-403-1-type-3": "Vui lòng đảm bảo tôi có quyền `MANAGE_MESSAGES`", + "error-404-0": "Không tìm thấy người dùng", + "error-404-1": "Vui lòng @mention một người dùng, dán ID của họ hoặc gõ tên người dùng của họ", + "error-405-0": "Xin lỗi?", + "error-405-1": "Tôi không làm điều đó lol", + "error-406-0": "Bạn không có quyền", + "error-407-0": "Bạn không có quyền làm điều này", + "error-409-0-type-0": "Người dùng đó đã bị cấm", + "error-409-0-type-1": "Người dùng đó đã bị tắt tiếng", + "error-409-0-type-2": "Người dùng đó đã được bỏ cấm", + "error-409-0-type-3": "Người dùng đó đã được bỏ tắt tiếng", + "error-429-0": "Số không hợp lệ", + "error-429-1": "Nhập một số nguyên hợp lệ trong khoảng từ 1-100", + "error-430-0": "Không có tin nhắn", + "error-430-1": "Không tìm thấy tin nhắn để xóa", + "error-431-0": "Liên kết tin nhắn không hợp lệ", + "error-431-1": "Vui lòng nhập một liên kết tin nhắn hợp lệ", + "error-432-0": "Không phải là một bản ghi Quark", + "error-432-1": "Tin nhắn này không phải là một bản ghi Quark hợp lệ", + "error-433-0": "Không hợp lệ về tin nhắn bắt đầu và kết thúc", + "error-433-1": "Tin nhắn bắt đầu phải cũ hơn tin nhắn kết thúc", + "error-434-0": "Các kênh khác nhau", + "error-434-1": "Tin nhắn bắt đầu và tin nhắn kết thúc phải thuộc cùng một kênh", + "error-435-0": "Thời gian chờ đang hoạt động", + "error-435-1": "Lệnh này chỉ có thể được sử dụng mỗi 15 phút", + "error-try-help-again": "Try running the help command again...", + "error-no-modlog": "No modlog channel", + "error-invalid-log": "Modlog case not found", + + "error-timeout-period-too-long-0": "Thời gian chờ quá lâu", + "error-timeout-period-too-long-1": "Thời gian chờ phải nhỏ hơn 28 ngày", + + "response-ban": "Đã cấm", + "response-kick": "Đã đuổi", + "response-mute": "Đã tắt tiếng", + "response-unmute": "Đã bỏ tắt tiếng", + "response-unban": "Đã bỏ cấm", + "response-purge": "Đã xóa {count} tin nhắn", + + "response-customise-dash": "Cài đặt tùy chỉnh đã được chuyển đến [bảng điều khiển web]!", + "response-customise-1": "Ghi lại tin nhắn lên đến 2 tuần trước, tùy chỉnh ghi nhật ký và nhiều hơn nữa với Quark Pro...", + "response-customise-2": "[UK, US, EU] Nhấp vào hồ sơ của tôi để nâng cấp!", + "response-customise-3": "Hoặc... {proLink}", + "response-customise-4": "Thử tùy chỉnh màu sắc miễn phí tại {inventoryLink}", + + "response-case-updated": "Cập nhật trạng thái thành công!", + + "response-debug": "Gửi log gỡ lỗi thành công!", + + "response-status-enabled": "Bật cập nhật kênh trạng thái thành công!", + "response-status-disabled": "Tắt cập nhật kênh trạng thái thành công!", + + "target0-command": "mục tiêu", + "target1-command": "mục tiêu", + "message0-command": "tin nhắn", + "executor0-command": "thực thi", + "executor1-command": "thực thi", + "channel0-command": "kênh", + "channel1-command": "kênh", + + "serverlog-web-promote": "...hoặc truy cập bảng điều khiển web của chúng tôi!", + "serverlog-select": "Chọn kênh serverlog", + "serverlog-unset": "Kênh không được đặt", + "serverlog-set": "Kênh đã được đặt", + "serverlog-setchannel": "Kênh đã được đặt thành {channel}", + "setserverlog-confirm0-set": "Đã đặt Kênh Ghi Nhật Ký Máy Chủ", + "setserverlog-confirm0-unset": "Đã hủy đặt Kênh Ghi Nhật Ký Máy Chủ", + "setserverlog-confirm1-set": "All server-log events will now be recorded in this channel.\n\n[**Visit Quark's web dashboard for more configuration options!**]({quark_website_url}/dashboard/{guild_id})", + "setserverlog-confirm1-unset": "Bạn sẽ không nhận được tin nhắn về các sự kiện xảy ra trong máy chủ này trừ khi bạn có các kênh khác được đặt để xuất các sự kiện đó.", + "setserverlog-confirm0-options-set": "Đã đặt Kênh Ghi Nhật Ký {type}", + "setserverlog-confirm0-options-unset": "Đã hủy đặt Kênh Ghi Nhật Ký {type}", + "setserverlog-confirm0-options-stoplog": "Đã dừng ghi nhật ký {type}", + "setserverlog-confirm1-options-set": "Máy chủ {type} sẽ được ghi lại trong kênh này.\n\nĐể hủy đặt kênh này, chạy lại lệnh trong kênh này.", + "setserverlog-confirm1-options-unset": "Máy chủ {type} sẽ không được ghi lại trong kênh này nữa.\n\nĐể đặt kênh này, chạy lại lệnh trong kênh này.", + "setserverlog-confirm1-options-stoplog": "Máy chủ {type} sẽ tiếp tục được ghi nhật ký trong kênh ghi nhật ký chính (nếu có).\n\nĐể hoàn tác điều này, chạy lại lệnh ở đây.", + "setserverlog-type-members-0": "Thành viên", + "setserverlog-type-members-1": "thành viên", + "setserverlog-type-actions-0": "Hành động", + "setserverlog-type-actions-1": "hành động", + "setserverlog-type-text-0": "Sự kiện Kênh Văn bản", + "setserverlog-type-text-1": "sự kiện kênh văn bản", + "setserverlog-type-voice-0": "Sự kiện Kênh Giọng nói", + "setserverlog-type-voice-1": "sự kiện kênh giọng nói", + "setserverlog-type-files-0": "Tệp", + "setserverlog-type-files-1": "tệp", + "setserverlog-type-server-0": "Máy chủ", + "setserverlog-type-server-1": "máy chủ", + "setserverlog-type-roles-0": "Sự kiện Vai trò", + "setserverlog-type-roles-1": "sự kiện vai trò", + "setserverlog-type-channels-0": "Sự kiện Kênh", + "setserverlog-type-channels-1": "sự kiện kênh", + "setserverlog-type-modlogs-0": "Modlogs", + "setserverlog-type-modlogs-1": "modlogs", + "setserverlog-spoilers": "Spoilers", + "setserverlog-spoilers-0": "Đã đặt spoilers ghi nhật ký máy chủ thành {result}", + "setserverlog-enable-status-updates": "Bật Cập nhật Trạng thái!", + "setserverlog-enable-status-updates-desc": "Nhận thông báo về tất cả các cập nhật mới nhất, thời gian chạy và các thông tin quan trọng khác từ các nhà phát triển!", + "setserverlog-enable-status-updates-desc-1": "Chúng tôi rất khuyến nghị bạn bật tính năng này trong một trong các kênh của bạn!", + "setserverlog-check-permissions": "Vui lòng đảm bảo Quark có quyền gửi tin nhắn trong kênh này, hoặc kênh sẽ bị hủy đặt.", + + "festive-title": "Quà miễn phí trong mùa lễ!", + "festive-claim": "Nhận quà miễn phí của bạn!", + + "help-overview-website-description": "Dễ dàng thiết lập và quản lý Quark từ [bảng điều khiển web]!", + "help-overview-inventory-description": "Quản lý các đăng ký của bạn hoặc nhận một số tính năng [Quark Pro] miễn phí!", + "help-overview-view-inv": "Xem Kho hàng", + "help-overview-help": "Trợ giúp", + "help-overview-website": "Trang web", + "help-overview-serverlog": "Ghi nhật ký máy chủ", + "help-overview-modlog": "Ghi nhật ký Mod", + "help-overview-commands": "Lệnh", + "help-overview-language": "Ngôn ngữ", + "help-overview-premium": "Premium", + "help-overview-inventory": "Kho hàng", + "help-overview-channel-isset": "Kênh đã được đặt thành {channel}", + "help-overview-channel-isnotset": "Chạy {command} trong kênh mong muốn", + "help-overview-view-options": "Chạy {command} để xem các tùy chọn", + "help-overview-view-options-and-statuses": "Chạy {command} để xem trạng thái và tùy chọn", + "help-overview-view-all-commands": "Chạy {command} để xem các lệnh", + "help-overview-change-channel": "Thay đổi bằng cách chạy {command} trong kênh mong muốn.", + "help-overview-manage-premium": "Chạy {command} để quản lý premium", + "language-set": "Ngôn ngữ đã được đặt thành {language}", + + "help-serverlog-help": "Trợ giúp Ghi nhật ký máy chủ", + "help-serverlog-0": "Hạn chế Kênh", + "help-serverlog-1": "Tùy chọn Bỏ qua", + "help-serverlog-2": "Spoilers", + "help-serverlog-0-desc": "Để có sự kiểm soát chi tiết hơn về ghi nhật ký, chẳng hạn như chọn các kênh khác nhau cho các loại ghi nhật ký khác nhau, vui lòng truy cập [bảng điều khiển web của Quark]", + "help-serverlog-1-desc": "Để ngăn một số kênh, người dùng hoặc tin nhắn khỏi việc ghi nhật ký, chạy:\n{ignorecommand}", + "help-serverlog-2-desc": "Để bật/tắt việc ẩn thông tin về các phương tiện được gửi trong ghi nhật ký máy chủ, chạy: {command}", + "help-serverlog-2-on": "Đã bật ẩn thông tin.", + "help-serverlog-2-off": "Đã tắt ẩn thông tin.", + + "help-commands-help": "Trợ giúp Lệnh", + "help-commands-moderation": "Quản lý", + "help-commands-tags": "Thẻ", + "help-commands-notes": "Ghi chú", + "help-commands-other": "Khác", + "help-notes-help": "Trợ giúp Ghi chú", + "help-tags-help": "Trợ giúp Thẻ", + "help-commands-desc": "Chú thích:\n`` `[tùy chọn]`\nĐây không phải là danh sách của tất cả các lệnh", + "help-info": "Cần thêm sự trợ giúp? **Tham gia máy chủ hỗ trợ của chúng tôi!**", + + "need-to-vote-title": "Bạn phải bỏ phiếu để sử dụng lệnh này!", + "need-to-vote": "Nhấp vào đây để bỏ phiếu", + "need-to-vote-footer": "Việc bỏ phiếu mất tối đa một phút để được đăng ký", + + "configCommand": { + "title": "Serverlog Configuration", + "selection": "Select a category in the menu to view configuration.", + "serverLogDesc": "Serverlog Channel", + "notSet": "Not set", + "selectACategory": "Select a category", + "formats": { + "log_channels": "Log Channels", + "configurable_events": "Configurable Events" + }, + "categories": { + "serverEvents": { + "title": "Members", + "description": "Member actions (join/leave, roles, nicknames)" + }, + "textEvents": { + "title": "Messages", + "description": "Message actions (deletions, edits, pins, reactions)" + }, + "voiceEvents": { + "title": "Voice", + "description": "Voice channel actions (join/leave, streams, mute/deafens)" + }, + "serverActions": { + "title": "Server Actions", + "description": "Server actions (invite creation/deletion, emojis)" + }, + "channelEvents": { + "title": "Channels", + "description": "Channel actions (creations/deletions, permissions)" + }, + "generalEvents": { + "title": "Server Events", + "description": "General actions (server modifications)" + }, + "roleEvents": { + "title": "Roles", + "description": "Role actions (creations/deletions, permissions)" + }, + "modLog": { + "title": "Mod Logs", + "description": "Moderation actions (bans, kicks, mutes)" + }, + "overview": { + "title": "Overview", + "description": "Overview of main category options" + }, + "fileEvents": { + "title": "Files" + } + } + } +} \ No newline at end of file diff --git a/bot/vi/guild_update_types.json b/bot/vi/general/guild_update_types.json similarity index 100% rename from bot/vi/guild_update_types.json rename to bot/vi/general/guild_update_types.json diff --git a/bot/vi/permissions.json b/bot/vi/general/permissions.json similarity index 100% rename from bot/vi/permissions.json rename to bot/vi/general/permissions.json diff --git a/bot/vi/role_update_types.json b/bot/vi/general/role_update_types.json similarity index 100% rename from bot/vi/role_update_types.json rename to bot/vi/general/role_update_types.json diff --git a/bot/vi/tags_responses.json b/bot/vi/general/tags_responses.json similarity index 100% rename from bot/vi/tags_responses.json rename to bot/vi/general/tags_responses.json diff --git a/get.js b/get.js new file mode 100644 index 0000000..33f0e2b --- /dev/null +++ b/get.js @@ -0,0 +1,53 @@ +const validLanguages = ["en_gb", "en_pr", "en_us", "nl", "pl", "tr", "vi"]; +const languages = {}; + +const languageTypeProxy = (language, type) => { + const correctLanguageTypeObject = {}; + new Proxy(correctLanguageTypeObject, { + async get(target, prop) { + const selectedLanguagesStrings = await import( + `./bot/${language}/${type}/${prop}.json`, + { with: { type: "json" } } + ); + const fallbackLanguagesStrings = await import( + `./bot/en_us/${type}/${prop}.json`, + { with: { type: "json" } } + ); + const languagesStringsToUse = selectedLanguagesStrings.default + ? selectedLanguagesStrings.default + : fallbackLanguagesStrings.default; + new Proxy(languagesStringsToUse, { + get(target, prop) { + return target[prop] + ? target[prop] + : fallbackLanguagesStrings.default[prop]; + }, + }); + return languagesStringsToUse.default; + }, + }); + return correctLanguageTypeObject; +}; + +const languageProxy = (language) => { + const correctLanguageObject = {}; + new Proxy(correctLanguageObject, { + get(target, prop) { + if (validLanguages.includes(language)) { + return languageTypeProxy(language, prop); + } else { + // default to en_us + return languageTypeProxy("en_us", prop); + } + }, + }); + return correctLanguageObject; +}; + +new Proxy(languages, { + get(target, prop) { + return languageProxy(prop); + }, +}); + +export default languages; diff --git a/index.js b/index.js index 8c40dd9..0126505 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -export { default as activate } from "./activate.js"; \ No newline at end of file +export { default as get } from "./get.js"; \ No newline at end of file From 8e719b62a34a8d4fd2422cd903a095fa35d7ce05 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:46:30 +0100 Subject: [PATCH 02/14] Update get.js --- get.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/get.js b/get.js index 33f0e2b..34066dc 100644 --- a/get.js +++ b/get.js @@ -3,7 +3,7 @@ const languages = {}; const languageTypeProxy = (language, type) => { const correctLanguageTypeObject = {}; - new Proxy(correctLanguageTypeObject, { + return new Proxy(correctLanguageTypeObject, { async get(target, prop) { const selectedLanguagesStrings = await import( `./bot/${language}/${type}/${prop}.json`, @@ -16,22 +16,20 @@ const languageTypeProxy = (language, type) => { const languagesStringsToUse = selectedLanguagesStrings.default ? selectedLanguagesStrings.default : fallbackLanguagesStrings.default; - new Proxy(languagesStringsToUse, { + return new Proxy(languagesStringsToUse, { get(target, prop) { return target[prop] ? target[prop] : fallbackLanguagesStrings.default[prop]; }, }); - return languagesStringsToUse.default; }, }); - return correctLanguageTypeObject; }; const languageProxy = (language) => { const correctLanguageObject = {}; - new Proxy(correctLanguageObject, { + return new Proxy(correctLanguageObject, { get(target, prop) { if (validLanguages.includes(language)) { return languageTypeProxy(language, prop); @@ -41,13 +39,11 @@ const languageProxy = (language) => { } }, }); - return correctLanguageObject; }; -new Proxy(languages, { +export default new Proxy(languages, { get(target, prop) { + console.log(target, prop); return languageProxy(prop); }, }); - -export default languages; From 183f54e55d8aaa4372cf2b4aeb0018b7bc39f391 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:46:50 +0100 Subject: [PATCH 03/14] show --- example.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 example.js diff --git a/example.js b/example.js new file mode 100644 index 0000000..3423ad3 --- /dev/null +++ b/example.js @@ -0,0 +1,3 @@ +import get from "./get.js"; + +console.log((await get.en_us.slash_commands.ping).name); \ No newline at end of file From 81c58854e6b4f25dc0864d44c4d0963d0bec0ac0 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:49:04 +0100 Subject: [PATCH 04/14] remove logging --- get.js | 1 - 1 file changed, 1 deletion(-) diff --git a/get.js b/get.js index 34066dc..b64d60d 100644 --- a/get.js +++ b/get.js @@ -43,7 +43,6 @@ const languageProxy = (language) => { export default new Proxy(languages, { get(target, prop) { - console.log(target, prop); return languageProxy(prop); }, }); From b64c467a1c2df4aeb283f120e08bf86a72a339fe Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:53:01 +0100 Subject: [PATCH 05/14] improve format --- example.js | 2 +- get.js | 39 +++++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/example.js b/example.js index 3423ad3..0355d9f 100644 --- a/example.js +++ b/example.js @@ -1,3 +1,3 @@ import get from "./get.js"; -console.log((await get.en_us.slash_commands.ping).name); \ No newline at end of file +console.log(await get.en_us.slash_commands.ping.name); \ No newline at end of file diff --git a/get.js b/get.js index b64d60d..cda15ae 100644 --- a/get.js +++ b/get.js @@ -4,25 +4,28 @@ const languages = {}; const languageTypeProxy = (language, type) => { const correctLanguageTypeObject = {}; return new Proxy(correctLanguageTypeObject, { - async get(target, prop) { - const selectedLanguagesStrings = await import( - `./bot/${language}/${type}/${prop}.json`, - { with: { type: "json" } } - ); - const fallbackLanguagesStrings = await import( - `./bot/en_us/${type}/${prop}.json`, - { with: { type: "json" } } + get(target, prop) { + return new Proxy( + {}, + { + async get(target, prop1) { + const selectedLanguagesStrings = await import( + `./bot/${language}/${type}/${prop}.json`, + { with: { type: "json" } } + ); + const fallbackLanguagesStrings = await import( + `./bot/en_us/${type}/${prop}.json`, + { with: { type: "json" } } + ); + const languagesStringsToUse = selectedLanguagesStrings.default + ? selectedLanguagesStrings.default + : fallbackLanguagesStrings.default; + return languagesStringsToUse[prop1] + ? languagesStringsToUse[prop1] + : fallbackLanguagesStrings.default[prop1]; + }, + } ); - const languagesStringsToUse = selectedLanguagesStrings.default - ? selectedLanguagesStrings.default - : fallbackLanguagesStrings.default; - return new Proxy(languagesStringsToUse, { - get(target, prop) { - return target[prop] - ? target[prop] - : fallbackLanguagesStrings.default[prop]; - }, - }); }, }); }; From a38b4a58818a3034bf124744894d03c9d491a749 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:55:15 +0100 Subject: [PATCH 06/14] Update get.js --- get.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get.js b/get.js index cda15ae..1467980 100644 --- a/get.js +++ b/get.js @@ -12,12 +12,12 @@ const languageTypeProxy = (language, type) => { const selectedLanguagesStrings = await import( `./bot/${language}/${type}/${prop}.json`, { with: { type: "json" } } - ); + ).catch(() => null); const fallbackLanguagesStrings = await import( `./bot/en_us/${type}/${prop}.json`, { with: { type: "json" } } ); - const languagesStringsToUse = selectedLanguagesStrings.default + const languagesStringsToUse = selectedLanguagesStrings?.default ? selectedLanguagesStrings.default : fallbackLanguagesStrings.default; return languagesStringsToUse[prop1] From 7a5a43f52a9a401065d1039d42c2008c8680b338 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:55:24 +0100 Subject: [PATCH 07/14] Update example.js --- example.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example.js b/example.js index 0355d9f..2b2f60e 100644 --- a/example.js +++ b/example.js @@ -1,3 +1,5 @@ -import get from "./get.js"; +import languages from "./get.js"; -console.log(await get.en_us.slash_commands.ping.name); \ No newline at end of file +const language = "en_pr"; + +console.log(await languages[language].slash_commands.ping.name); \ No newline at end of file From 2045354f2be9e8683a37d06884f4779700cffa1a Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:57:06 +0100 Subject: [PATCH 08/14] Update get.js --- get.js | 92 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/get.js b/get.js index 1467980..e2ff62b 100644 --- a/get.js +++ b/get.js @@ -1,51 +1,57 @@ const validLanguages = ["en_gb", "en_pr", "en_us", "nl", "pl", "tr", "vi"]; -const languages = {}; const languageTypeProxy = (language, type) => { - const correctLanguageTypeObject = {}; - return new Proxy(correctLanguageTypeObject, { - get(target, prop) { - return new Proxy( - {}, - { - async get(target, prop1) { - const selectedLanguagesStrings = await import( - `./bot/${language}/${type}/${prop}.json`, - { with: { type: "json" } } - ).catch(() => null); - const fallbackLanguagesStrings = await import( - `./bot/en_us/${type}/${prop}.json`, - { with: { type: "json" } } - ); - const languagesStringsToUse = selectedLanguagesStrings?.default - ? selectedLanguagesStrings.default - : fallbackLanguagesStrings.default; - return languagesStringsToUse[prop1] - ? languagesStringsToUse[prop1] - : fallbackLanguagesStrings.default[prop1]; - }, - } - ); - }, - }); + return new Proxy( + {}, + { + get(target, prop) { + return new Proxy( + {}, + { + async get(target, prop1) { + const selectedLanguagesStrings = await import( + `./bot/${language}/${type}/${prop}.json`, + { with: { type: "json" } } + ).catch(() => null); + const fallbackLanguagesStrings = await import( + `./bot/en_us/${type}/${prop}.json`, + { with: { type: "json" } } + ); + const languagesStringsToUse = selectedLanguagesStrings?.default + ? selectedLanguagesStrings.default + : fallbackLanguagesStrings.default; + return languagesStringsToUse[prop1] + ? languagesStringsToUse[prop1] + : fallbackLanguagesStrings.default[prop1]; + }, + } + ); + }, + } + ); }; const languageProxy = (language) => { - const correctLanguageObject = {}; - return new Proxy(correctLanguageObject, { - get(target, prop) { - if (validLanguages.includes(language)) { - return languageTypeProxy(language, prop); - } else { - // default to en_us - return languageTypeProxy("en_us", prop); - } - }, - }); + return new Proxy( + {}, + { + get(target, prop) { + if (validLanguages.includes(language)) { + return languageTypeProxy(language, prop); + } else { + // default to en_us + return languageTypeProxy("en_us", prop); + } + }, + } + ); }; -export default new Proxy(languages, { - get(target, prop) { - return languageProxy(prop); - }, -}); +export default new Proxy( + {}, + { + get(target, prop) { + return languageProxy(prop); + }, + } +); From ea100593c56d4302cb1320c2bfaf0389f2c9a648 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:14:05 +0100 Subject: [PATCH 09/14] add spanish --- get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get.js b/get.js index e2ff62b..a7a1d7b 100644 --- a/get.js +++ b/get.js @@ -1,4 +1,4 @@ -const validLanguages = ["en_gb", "en_pr", "en_us", "nl", "pl", "tr", "vi"]; +const validLanguages = ["en_gb", "en_pr", "en_us", "nl", "pl", "tr", "vi", "es_es"]; const languageTypeProxy = (language, type) => { return new Proxy( From fffb85fa0d50d6d58c8f8a5a36eb79e36ceab9bf Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:14:18 +0100 Subject: [PATCH 10/14] change format and add additional examples --- example.js | 13 ++++++++++++- get.js | 11 +++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/example.js b/example.js index 2b2f60e..b82880d 100644 --- a/example.js +++ b/example.js @@ -2,4 +2,15 @@ import languages from "./get.js"; const language = "en_pr"; -console.log(await languages[language].slash_commands.ping.name); \ No newline at end of file +// non existent, should fallback to en_us +console.log(await languages(language).slash_commands.ping.name); + +// existent, should use en_pr +console.log(await languages(language).standard.textEvents.messageDeleted); + +// non existent in either selected language or fallback language +try { + await languages(language).doesNotExist.abc; +} catch (error) { + console.error(error); +} \ No newline at end of file diff --git a/get.js b/get.js index a7a1d7b..a1538ea 100644 --- a/get.js +++ b/get.js @@ -47,11 +47,6 @@ const languageProxy = (language) => { ); }; -export default new Proxy( - {}, - { - get(target, prop) { - return languageProxy(prop); - }, - } -); +export default function (lang) { + return languageProxy(lang); +} From 657b25988bc7213ad4ab207e59961bf600fa0659 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:07:30 +0100 Subject: [PATCH 11/14] support child properties --- get.js | 85 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/get.js b/get.js index a1538ea..d0dc5c0 100644 --- a/get.js +++ b/get.js @@ -1,31 +1,72 @@ -const validLanguages = ["en_gb", "en_pr", "en_us", "nl", "pl", "tr", "vi", "es_es"]; +const validLanguages = [ + "en_gb", + "en_pr", + "en_us", + "nl", + "pl", + "tr", + "vi", + "es_es", +]; + +const readObject = (obj, cursor = "") => { + const cursorPath = cursor.split("."); + for (let i = 0; i < cursorPath.length; i++) obj = obj[cursorPath[i]]; + return obj; +}; + +const returnNextProperty = ( + languagesStringsToUse, + fallbackLanguagesStrings, + cursor = "" +) => { + return new Proxy( + {}, + { + get(target, prop1) { + if (prop1 === "then") + return returnNextProperty(languagesStringsToUse, fallbackLanguagesStrings); + const currentCursor = cursor ? `${cursor}.${prop1}` : prop1; + const toReturn = readObject(languagesStringsToUse, currentCursor) + ? readObject(languagesStringsToUse, currentCursor) + : readObject(fallbackLanguagesStrings.default, currentCursor); + switch (typeof toReturn) { + case "string": + return toReturn; + case "object": + return returnNextProperty( + languagesStringsToUse, + fallbackLanguagesStrings, + currentCursor + ); + default: + return toReturn; + } + }, + } + ); +}; const languageTypeProxy = (language, type) => { return new Proxy( {}, { - get(target, prop) { - return new Proxy( - {}, - { - async get(target, prop1) { - const selectedLanguagesStrings = await import( - `./bot/${language}/${type}/${prop}.json`, - { with: { type: "json" } } - ).catch(() => null); - const fallbackLanguagesStrings = await import( - `./bot/en_us/${type}/${prop}.json`, - { with: { type: "json" } } - ); - const languagesStringsToUse = selectedLanguagesStrings?.default - ? selectedLanguagesStrings.default - : fallbackLanguagesStrings.default; - return languagesStringsToUse[prop1] - ? languagesStringsToUse[prop1] - : fallbackLanguagesStrings.default[prop1]; - }, - } + async get(target, prop) { + const selectedLanguagesStrings = await import( + `./bot/${language}/${type}/${prop}.json`, + { with: { type: "json" } } + ).catch(() => null); + const fallbackLanguagesStrings = await import( + `./bot/en_us/${type}/${prop}.json`, + { with: { type: "json" } } ); + const languagesStringsToUse = selectedLanguagesStrings?.default + ? selectedLanguagesStrings.default + : fallbackLanguagesStrings.default; + return returnNextProperty( + languagesStringsToUse, + fallbackLanguagesStrings + ); }, } ); From d113c815ad4d5c89526c52c01815fd59ad2759a6 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:07:35 +0100 Subject: [PATCH 12/14] Update example.js --- example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.js b/example.js index b82880d..6721418 100644 --- a/example.js +++ b/example.js @@ -3,10 +3,10 @@ import languages from "./get.js"; const language = "en_pr"; // non existent, should fallback to en_us -console.log(await languages(language).slash_commands.ping.name); +console.log((await languages(language).slash_commands.ping).name); // existent, should use en_pr -console.log(await languages(language).standard.textEvents.messageDeleted); +console.log((await languages(language).standard.textEvents).messageDeleted.title); // non existent in either selected language or fallback language try { From 361f390f35cb36ec6a86eed29474e89a7e16d449 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:08:07 +0100 Subject: [PATCH 13/14] formatting --- get.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/get.js b/get.js index d0dc5c0..12cca85 100644 --- a/get.js +++ b/get.js @@ -25,7 +25,10 @@ const returnNextProperty = ( { get(target, prop1) { if (prop1 === "then") - return returnNextProperty(languagesStringsToUse, fallbackLanguagesStrings); + return returnNextProperty( + languagesStringsToUse, + fallbackLanguagesStrings + ); const currentCursor = cursor ? `${cursor}.${prop1}` : prop1; const toReturn = readObject(languagesStringsToUse, currentCursor) ? readObject(languagesStringsToUse, currentCursor) @@ -63,10 +66,10 @@ const languageTypeProxy = (language, type) => { const languagesStringsToUse = selectedLanguagesStrings?.default ? selectedLanguagesStrings.default : fallbackLanguagesStrings.default; - return returnNextProperty( - languagesStringsToUse, - fallbackLanguagesStrings - ); + return returnNextProperty( + languagesStringsToUse, + fallbackLanguagesStrings + ); }, } ); From 98ccd55e130ac0265e4cc70822fa76a1d4aa4a2c Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:58:28 +0100 Subject: [PATCH 14/14] Update example.js --- example.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/example.js b/example.js index 6721418..1739e17 100644 --- a/example.js +++ b/example.js @@ -6,11 +6,13 @@ const language = "en_pr"; console.log((await languages(language).slash_commands.ping).name); // existent, should use en_pr -console.log((await languages(language).standard.textEvents).messageDeleted.title); +console.log( + (await languages(language).standard.textEvents).messageDeleted.title +); // non existent in either selected language or fallback language try { - await languages(language).doesNotExist.abc; + await languages(language).doesNotExist.abc; } catch (error) { - console.error(error); -} \ No newline at end of file + console.error(error); +}