Fixed some translation errors & added Catalan!

This commit is contained in:
DJj123dj
2024-08-21 22:46:54 +02:00
parent 0a69efdfe5
commit 1dd8c0246a
19 changed files with 507 additions and 18 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ export const defaultTranscriptsStructure = new api.ODCheckerObjectStructure("ope
{key:"includeFiles",optional:false,priority:0,checker:new api.ODCheckerBooleanStructure("openticket:transcripts-text-include-files",{})},
{key:"includeBotMessages",optional:false,priority:0,checker:new api.ODCheckerBooleanStructure("openticket:transcripts-text-include-bots",{})},
{key:"fileMode",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:transcripts-text-file-mode",{choices:["custom","name","id"]})},
{key:"fileMode",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:transcripts-text-file-mode",{choices:["custom","channel-name","channel-id","user-name","user-id"]})},
{key:"customFileName",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:transcripts-file-name",{maxLength:512,regex:/^[^\.#%&{}\\<>*?/!'":@`|=]*$/})},
]})},
+1
View File
@@ -7,6 +7,7 @@ export const loadAllLanguages = async () => {
openticket.languages.add(new api.ODLanguage("openticket:portuguese","portuguese.json"))
openticket.languages.add(new api.ODLanguage("openticket:czech","czech.json"))
openticket.languages.add(new api.ODLanguage("openticket:german","german.json"))
openticket.languages.add(new api.ODLanguage("openticket:catalan","catalan.json"))
/** How to add more languages?
* - Add the language to the list above
+9
View File
@@ -63,6 +63,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
}
})
//TODO TRANSLATION!!!
const autotitle = (hasTicket && ticketOnly) ? "Select your ticket:" : ((hasRole && roleOnly) ? "Select your role:" : "Select your option:")
const title = (panel.get("openticket:describe-options-custom-title").value.length < 1) ? "__"+autotitle+"__\n" : "__"+panel.get("openticket:describe-options-custom-title").value+"__\n"
@@ -74,10 +75,13 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
let description = opt.exists("openticket:description") ? opt.get("openticket:description").value : "`<no-description>`"
if (layout == "normal" || layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:cooldown-enabled") && opt.get("openticket:cooldown-enabled").value) description = description + "\nCooldown: `"+opt.get("openticket:cooldown-minutes").value+" min`"
//TODO TRANSLATION!!!
if (opt.exists("openticket:limits-enabled") && opt.get("openticket:limits-enabled").value) description = description + "\nMax Tickets: `"+opt.get("openticket:limits-maximum-user").value+"`"
}
if (layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:admins")) description = description + "\nAdmins: "+opt.get("openticket:admins").value.map((admin) => discord.roleMention(admin)).join(", ")
}
@@ -98,6 +102,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
let description = opt.exists("openticket:description") ? opt.get("openticket:description").value : "`<no-description>`"
if (layout == "normal" || layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:roles")) description = description + "\nRoles: "+opt.get("openticket:roles").value.map((admin) => discord.roleMention(admin)).join(", ")
}
@@ -119,10 +124,13 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
let description = opt.exists("openticket:description") ? opt.get("openticket:description").value : "`<no-description>`"
if (layout == "normal" || layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:cooldown-enabled") && opt.get("openticket:cooldown-enabled").value) description = description + "\nCooldown: `"+opt.get("openticket:cooldown-minutes").value+" min`"
//TODO TRANSLATION!!!
if (opt.exists("openticket:limits-enabled") && opt.get("openticket:limits-enabled").value) description = description + "\nMax Tickets: `"+opt.get("openticket:limits-maximum-user").value+"`"
}
if (layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:admins")) description = description + "\nAdmins: "+opt.get("openticket:admins").value.map((admin) => discord.roleMention(admin)).join(", ")
}
@@ -145,6 +153,7 @@ export function describePanelOptions(mode:"fields"|"text", panel:api.ODPanel): {
let description = opt.exists("openticket:description") ? opt.get("openticket:description").value : "`<no-description>`"
if (layout == "normal" || layout == "detailed"){
//TODO TRANSLATION!!!
if (opt.exists("openticket:roles")) description = description + "\nRoles: "+opt.get("openticket:roles").value.map((admin) => discord.roleMention(admin)).join(", ")
}