(v4.2.0) Added new translation sentences

This commit is contained in:
DJj123dj
2026-05-25 11:16:33 +02:00
parent e7475af694
commit fd1e0d6bdb
15 changed files with 142 additions and 78 deletions
+26 -5
View File
@@ -1,4 +1,4 @@
/// <reference types="node"/>
import fjs from "formatted-json-stringify" import fjs from "formatted-json-stringify"
import fs from "fs" import fs from "fs"
@@ -124,6 +124,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("helpPage"), new fjs.PropertyFormatter("helpPage"),
new fjs.PropertyFormatter("withReason"), new fjs.PropertyFormatter("withReason"),
new fjs.PropertyFormatter("withoutTranscript"), new fjs.PropertyFormatter("withoutTranscript"),
new fjs.PropertyFormatter("blacklistAdd"),
new fjs.PropertyFormatter("blacklistRemove"),
]), ]),
new fjs.ObjectFormatter("titles",true,[ new fjs.ObjectFormatter("titles",true,[
new fjs.PropertyFormatter("created"), new fjs.PropertyFormatter("created"),
@@ -162,6 +164,7 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("prioritySet"), new fjs.PropertyFormatter("prioritySet"),
new fjs.PropertyFormatter("priorityGet"), new fjs.PropertyFormatter("priorityGet"),
new fjs.PropertyFormatter("transfer"), new fjs.PropertyFormatter("transfer"),
new fjs.PropertyFormatter("transcripts"),
]), ]),
new fjs.ObjectFormatter("descriptions",true,[ new fjs.ObjectFormatter("descriptions",true,[
new fjs.PropertyFormatter("create"), new fjs.PropertyFormatter("create"),
@@ -255,6 +258,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("prioritySetDm"), new fjs.PropertyFormatter("prioritySetDm"),
new fjs.PropertyFormatter("roleUpdateLog"), new fjs.PropertyFormatter("roleUpdateLog"),
new fjs.PropertyFormatter("roleUpdateDm"), new fjs.PropertyFormatter("roleUpdateDm"),
new fjs.PropertyFormatter("topicSetLog"),
new fjs.PropertyFormatter("topicSetDm"),
]), ]),
]), ]),
new fjs.ObjectFormatter("transcripts",true,[ new fjs.ObjectFormatter("transcripts",true,[
@@ -277,6 +282,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("backup"), new fjs.PropertyFormatter("backup"),
new fjs.PropertyFormatter("error"), new fjs.PropertyFormatter("error"),
new fjs.PropertyFormatter("title"), new fjs.PropertyFormatter("title"),
new fjs.PropertyFormatter("noHistory"),
new fjs.PropertyFormatter("historyNotSupported"),
]), ]),
new fjs.ObjectFormatter("text",true,[ new fjs.ObjectFormatter("text",true,[
new fjs.PropertyFormatter("messagesTitle"), new fjs.PropertyFormatter("messagesTitle"),
@@ -303,8 +310,9 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("unknownPanel"), new fjs.PropertyFormatter("unknownPanel"),
new fjs.PropertyFormatter("notInGuild"), new fjs.PropertyFormatter("notInGuild"),
new fjs.PropertyFormatter("channelRename"), new fjs.PropertyFormatter("channelRename"),
new fjs.PropertyFormatter("channelCategory"),
new fjs.PropertyFormatter("busy"), new fjs.PropertyFormatter("busy"),
new fjs.PropertyFormatter("permissionError"), new fjs.PropertyFormatter("permissionError"),
]), ]),
new fjs.ObjectFormatter("descriptions",true,[ new fjs.ObjectFormatter("descriptions",true,[
new fjs.PropertyFormatter("askForInfo"), new fjs.PropertyFormatter("askForInfo"),
@@ -326,11 +334,15 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("deprecatedTicket"), new fjs.PropertyFormatter("deprecatedTicket"),
new fjs.PropertyFormatter("notInGuild"), new fjs.PropertyFormatter("notInGuild"),
new fjs.PropertyFormatter("channelRename"), new fjs.PropertyFormatter("channelRename"),
new fjs.PropertyFormatter("channelCategory"),
new fjs.PropertyFormatter("channelRenameSource"), new fjs.PropertyFormatter("channelRenameSource"),
new fjs.PropertyFormatter("busy"), new fjs.PropertyFormatter("busy"),
new fjs.PropertyFormatter("closeBeforeMessage"), new fjs.PropertyFormatter("closeBeforeMessage"),
new fjs.PropertyFormatter("closeBeforeAdminMessage"), new fjs.PropertyFormatter("closeBeforeAdminMessage"),
new fjs.PropertyFormatter("unableToCreateTicket"), new fjs.PropertyFormatter("unableToCreateTicket"),
new fjs.PropertyFormatter("messageMissing"),
new fjs.PropertyFormatter("stateExpired"),
new fjs.PropertyFormatter("panelStateExpired"),
]), ]),
new fjs.ObjectFormatter("optionInvalidReasons",true,[ new fjs.ObjectFormatter("optionInvalidReasons",true,[
new fjs.PropertyFormatter("stringRegex"), new fjs.PropertyFormatter("stringRegex"),
@@ -392,6 +404,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("syntax"), new fjs.PropertyFormatter("syntax"),
new fjs.PropertyFormatter("originalName"), new fjs.PropertyFormatter("originalName"),
new fjs.PropertyFormatter("newName"), new fjs.PropertyFormatter("newName"),
new fjs.PropertyFormatter("originalCategory"),
new fjs.PropertyFormatter("newCategory"),
new fjs.PropertyFormatter("until"), new fjs.PropertyFormatter("until"),
new fjs.PropertyFormatter("validOptions"), new fjs.PropertyFormatter("validOptions"),
new fjs.PropertyFormatter("validPanels"), new fjs.PropertyFormatter("validPanels"),
@@ -413,6 +427,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("participants"), new fjs.PropertyFormatter("participants"),
new fjs.PropertyFormatter("yes"), new fjs.PropertyFormatter("yes"),
new fjs.PropertyFormatter("no"), new fjs.PropertyFormatter("no"),
new fjs.PropertyFormatter("accept"),
new fjs.PropertyFormatter("cancel"),
new fjs.PropertyFormatter("option"), new fjs.PropertyFormatter("option"),
new fjs.PropertyFormatter("topic"), new fjs.PropertyFormatter("topic"),
new fjs.PropertyFormatter("uptime"), new fjs.PropertyFormatter("uptime"),
@@ -425,6 +441,7 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("admins"), new fjs.PropertyFormatter("admins"),
new fjs.PropertyFormatter("roles"), new fjs.PropertyFormatter("roles"),
new fjs.PropertyFormatter("size"), new fjs.PropertyFormatter("size"),
]), ]),
new fjs.ObjectFormatter("lowercase",true,[ new fjs.ObjectFormatter("lowercase",true,[
new fjs.PropertyFormatter("text"), new fjs.PropertyFormatter("text"),
@@ -444,6 +461,7 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("panelAutoUpdate"), new fjs.PropertyFormatter("panelAutoUpdate"),
new fjs.PropertyFormatter("ticket"), new fjs.PropertyFormatter("ticket"),
new fjs.PropertyFormatter("ticketId"), new fjs.PropertyFormatter("ticketId"),
new fjs.PropertyFormatter("ticketOtherUser"),
new fjs.PropertyFormatter("close"), new fjs.PropertyFormatter("close"),
new fjs.PropertyFormatter("delete"), new fjs.PropertyFormatter("delete"),
new fjs.PropertyFormatter("deleteNoTranscript"), new fjs.PropertyFormatter("deleteNoTranscript"),
@@ -510,6 +528,8 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("priorityList"), new fjs.PropertyFormatter("priorityList"),
new fjs.PropertyFormatter("transfer"), new fjs.PropertyFormatter("transfer"),
new fjs.PropertyFormatter("transferUser"), new fjs.PropertyFormatter("transferUser"),
new fjs.PropertyFormatter("transcripts"),
new fjs.PropertyFormatter("transcriptsUser"),
]), ]),
new fjs.ObjectFormatter("helpMenu",true,[ new fjs.ObjectFormatter("helpMenu",true,[
new fjs.PropertyFormatter("help"), new fjs.PropertyFormatter("help"),
@@ -600,6 +620,7 @@ const formatter = new fjs.ObjectFormatter(null,true,[
new fjs.PropertyFormatter("selectTicket"), new fjs.PropertyFormatter("selectTicket"),
new fjs.PropertyFormatter("selectRole"), new fjs.PropertyFormatter("selectRole"),
new fjs.PropertyFormatter("selectOption"), new fjs.PropertyFormatter("selectOption"),
new fjs.PropertyFormatter("selectPriorityLevel"),
]), ]),
new fjs.ObjectFormatter("priorities",true,[ new fjs.ObjectFormatter("priorities",true,[
new fjs.PropertyFormatter("urgent"), new fjs.PropertyFormatter("urgent"),
@@ -612,14 +633,14 @@ const formatter = new fjs.ObjectFormatter(null,true,[
]), ]),
]) ])
for (const language of fs.readdirSync(".docs/languages/")){ for (const language of fs.readdirSync(".tools/languages/")){
if (!fs.existsSync("./languages/"+language)){ if (!fs.existsSync("./languages/"+language)){
console.log("language:",language,"does not exist yet in the primary ./languages/ folder. Unable to merge!") console.log("language:",language,"does not exist yet in the primary ./languages/ folder. Unable to merge!")
continue continue
} }
console.log("merging "+language+"...") console.log("merging "+language+"...")
const original = JSON.parse(fs.readFileSync("./languages/"+language).toString()) const original = JSON.parse(fs.readFileSync("./languages/"+language).toString())
const newSentences = JSON.parse(fs.readFileSync(".docs/languages/"+language).toString()) const newSentences = JSON.parse(fs.readFileSync(".tools/languages/"+language).toString())
for (const key of Object.keys(newSentences)){ for (const key of Object.keys(newSentences)){
if (key.startsWith("_")) continue if (key.startsWith("_")) continue
@@ -644,7 +665,7 @@ for (const language of fs.readdirSync(".docs/languages/")){
} }
} }
original["_TRANSLATION"]["lastedited"] = new Date().toLocaleDateString("nl-BE",{day:"2-digit",month:"2-digit",year:"numeric"}) original["_TRANSLATION"]["lastedited"] = new Date().toLocaleDateString("nl-BE",{day:"2-digit",month:"2-digit",year:"numeric"})
original["_TRANSLATION"]["otversion"] = "v4.1.3" original["_TRANSLATION"]["otversion"] = "v"+JSON.parse(fs.readFileSync("./package.json").toString()).version
const finalText = formatter.stringify(original) const finalText = formatter.stringify(original)
fs.writeFileSync("./languages/"+language,finalText) fs.writeFileSync("./languages/"+language,finalText)
} }
+33 -13
View File
@@ -2,7 +2,7 @@
"_TRANSLATION":{ "_TRANSLATION":{
"otversion":"v4.2.0", "otversion":"v4.2.0",
"translators":["DJj123dj"], "translators":["DJj123dj"],
"lastedited":"16/02/2026", "lastedited":"25/05/2026",
"language":"Custom", "language":"Custom",
"automated":false "automated":false
}, },
@@ -61,7 +61,7 @@
"booleanTrue":"Boolean must be false", "booleanTrue":"Boolean must be false",
"booleanFalse":"Boolean must be true", "booleanFalse":"Boolean must be true",
"arrayEmptyDisabled":"List must not be empty", "arrayEmptyDisabled":"List must not be empty",
"arrayEmptyRequired":"List must be empty", "arrayEmptyRequired":"List must be empty",
"arrayTooShort":"List must have at least {0} items", "arrayTooShort":"List must have at least {0} items",
@@ -69,7 +69,7 @@
"arrayLengthInvalid":"List must have exactly {0} items", "arrayLengthInvalid":"List must have exactly {0} items",
"arrayInvalidTypes":"List may only contain the following types: {0}", "arrayInvalidTypes":"List may only contain the following types: {0}",
"arrayDouble":"List must not contain duplicate values", "arrayDouble":"List must not contain duplicate values",
"discordInvalidId":"Invalid Discord {0} ID", "discordInvalidId":"Invalid Discord {0} ID",
"discordInvalidIdOptions":"Invalid Discord {0} ID. Alternatively, use one of the following: {1}", "discordInvalidIdOptions":"Invalid Discord {0} ID. Alternatively, use one of the following: {1}",
"discordInvalidToken":"Invalid Discord token", "discordInvalidToken":"Invalid Discord token",
@@ -86,7 +86,7 @@
"urlInvalidPath":"Invalid URL path", "urlInvalidPath":"Invalid URL path",
"idNotUnique":"This ID is already in use. Please choose a unique ID", "idNotUnique":"This ID is already in use. Please choose a unique ID",
"idNonExistent":"ID {0} does not exist", "idNonExistent":"ID {0} does not exist",
"invalidType":"Property must be of type: {0}", "invalidType":"Property must be of type: {0}",
"propertyMissing":"Required property {0} is missing from the object", "propertyMissing":"Required property {0} is missing from the object",
"propertyOptional":"Property {0} is optional in the object", "propertyOptional":"Property {0} is optional in the object",
@@ -99,7 +99,7 @@
"invalidButton":"Button must have at least an {0} or {1}", "invalidButton":"Button must have at least an {0} or {1}",
"unusedOption":"Option {0} is not used anywhere", "unusedOption":"Option {0} is not used anywhere",
"unusedQuestion":"Question {0} is not used anywhere", "unusedQuestion":"Question {0} is not used anywhere",
"dropdownOption":"Panels with dropdown enabled may only contain options of the 'ticket' type", "dropdownOption":"A panel with dropdown can only contain options of the types: 'ticket', 'role' or 'sub-panel'.",
"customInvalidVersion":"Config version mismatch. Make sure to update your config to the latest version" "customInvalidVersion":"Config version mismatch. Make sure to update your config to the latest version"
} }
}, },
@@ -118,7 +118,9 @@
"helpSwitchText":"View Text Commands", "helpSwitchText":"View Text Commands",
"helpPage":"Page {0}", "helpPage":"Page {0}",
"withReason":"With Reason", "withReason":"With Reason",
"withoutTranscript":"Without Transcript" "withoutTranscript":"Without Transcript",
"blacklistAdd":"Blacklist User",
"blacklistRemove":"Release User"
}, },
"titles":{ "titles":{
"created":"Ticket Created", "created":"Ticket Created",
@@ -156,7 +158,8 @@
"topicSet":"Topic Changed", "topicSet":"Topic Changed",
"prioritySet":"Priority Changed", "prioritySet":"Priority Changed",
"priorityGet":"Ticket Priority", "priorityGet":"Ticket Priority",
"transfer":"Ticket Transferred" "transfer":"Ticket Transferred",
"transcripts":"Transcript History"
}, },
"descriptions":{ "descriptions":{
"create":"Your ticket is ready. Click the button below to view and continue.", "create":"Your ticket is ready. Click the button below to view and continue.",
@@ -249,7 +252,9 @@
"prioritySetLog":"The priority of this ticket has been set to {0} by {1}.", "prioritySetLog":"The priority of this ticket has been set to {0} by {1}.",
"prioritySetDm":"The priority of your ticket has been set to {0}.", "prioritySetDm":"The priority of your ticket has been set to {0}.",
"roleUpdateLog":"{0} has modified their roles.", "roleUpdateLog":"{0} has modified their roles.",
"roleUpdateDm":"Your roles have been modified." "roleUpdateDm":"Your roles have been modified.",
"topicSetLog":"The priority of this ticket has been set to {0} by {1}.",
"topicSetDm":"The priority of your ticket has been set to {0}."
} }
}, },
"transcripts":{ "transcripts":{
@@ -258,7 +263,7 @@
"ready":"Transcript Created", "ready":"Transcript Created",
"textFileDescription":"This is a text transcript of a deleted ticket.", "textFileDescription":"This is a text transcript of a deleted ticket.",
"htmlProgress":"Please wait while the HTML transcript is being generated...", "htmlProgress":"Please wait while the HTML transcript is being generated...",
"createdChannel":"A new {0} transcript has been created in the server.", "createdChannel":"A new {0} transcript has been created in the server.",
"createdCreator":"A new {0} transcript has been created for one of your tickets.", "createdCreator":"A new {0} transcript has been created for one of your tickets.",
"createdParticipant":"A new {0} transcript has been created for a ticket you participated in.", "createdParticipant":"A new {0} transcript has been created for a ticket you participated in.",
@@ -271,7 +276,9 @@
"continue":"Delete Without Transcript", "continue":"Delete Without Transcript",
"backup":"Create Backup Transcript", "backup":"Create Backup Transcript",
"error":"Something went wrong while creating the transcript.\nWhat would you like to do?\n\nThis ticket will not be deleted until you select one of the options below.", "error":"Something went wrong while creating the transcript.\nWhat would you like to do?\n\nThis ticket will not be deleted until you select one of the options below.",
"title":"Transcript Error" "title":"Transcript Error",
"noHistory":"This user does not yet have any transcripts.",
"historyNotSupported":"Transcript history is currently only supported with HTML Transcripts.\nText transcript history will be available in future versions."
}, },
"text":{ "text":{
"messagesTitle":"MESSAGES", "messagesTitle":"MESSAGES",
@@ -298,6 +305,7 @@
"unknownPanel":"Unknown Panel", "unknownPanel":"Unknown Panel",
"notInGuild":"Not In Server", "notInGuild":"Not In Server",
"channelRename":"Unable To Rename Channel", "channelRename":"Unable To Rename Channel",
"channelCategory":"Unable To Change Category",
"busy":"Ticket Is Busy", "busy":"Ticket Is Busy",
"permissionError":"Permission Error" "permissionError":"Permission Error"
}, },
@@ -321,11 +329,15 @@
"deprecatedTicket":"This channel is not recognized as a valid ticket. It may have been created with an older version of the bot.", "deprecatedTicket":"This channel is not recognized as a valid ticket. It may have been created with an older version of the bot.",
"notInGuild":"This {0} cannot be used in direct messages. Please use it in a server.", "notInGuild":"This {0} cannot be used in direct messages. Please use it in a server.",
"channelRename":"Due to Discord rate limits, the channel could not be renamed immediately. It will be renamed automatically within 10 minutes if the bot remains online.", "channelRename":"Due to Discord rate limits, the channel could not be renamed immediately. It will be renamed automatically within 10 minutes if the bot remains online.",
"channelCategory":"Due to Discord rate limits, the channel category could not be changed immediately. It will be changed automatically within 10 minutes if the bot remains online.",
"channelRenameSource":"Error source: {0}", "channelRenameSource":"Error source: {0}",
"busy":"This {0} is currently unavailable.\nThe ticket is being processed by the bot.\n\nPlease try again in a few seconds.", "busy":"This {0} is currently unavailable.\nThe ticket is being processed by the bot.\n\nPlease try again in a few seconds.",
"closeBeforeMessage":"This ticket cannot be closed or deleted before a user has sent a message.", "closeBeforeMessage":"This ticket cannot be closed or deleted before a user has sent a message.",
"closeBeforeAdminMessage":"This ticket cannot be closed or deleted before a support member or admin has sent a message.", "closeBeforeAdminMessage":"This ticket cannot be closed or deleted before a support member or admin has sent a message.",
"unableToCreateTicket":"You are currently unable to create a ticket." "unableToCreateTicket":"You are currently unable to create a ticket.",
"messageMissing":"Unable to locate message of interaction. Use the command `{0}` instead.",
"stateExpired":"This interaction is no longer valid or has expired. Use the command `{0}` instead. It is normal to receive this error after a major Open Ticket update.",
"panelStateExpired":"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update."
}, },
"optionInvalidReasons":{ "optionInvalidReasons":{
"stringRegex":"The value does not match the required pattern.", "stringRegex":"The value does not match the required pattern.",
@@ -387,6 +399,8 @@
"syntax":"Syntax", "syntax":"Syntax",
"originalName":"Original Name", "originalName":"Original Name",
"newName":"New Name", "newName":"New Name",
"originalCategory":"Original Category",
"newCategory":"New Category",
"until":"Until", "until":"Until",
"validOptions":"Valid Options", "validOptions":"Valid Options",
"validPanels":"Valid Panels", "validPanels":"Valid Panels",
@@ -408,6 +422,8 @@
"participants":"Participants", "participants":"Participants",
"yes":"Yes", "yes":"Yes",
"no":"No", "no":"No",
"accept":"Accept",
"cancel":"Cancel",
"option":"Option", "option":"Option",
"topic":"Topic", "topic":"Topic",
"uptime":"System Uptime", "uptime":"System Uptime",
@@ -439,6 +455,7 @@
"panelAutoUpdate":"Automatically update this panel when edited.", "panelAutoUpdate":"Automatically update this panel when edited.",
"ticket":"Create a ticket instantly.", "ticket":"Create a ticket instantly.",
"ticketId":"ID of the ticket to create.", "ticketId":"ID of the ticket to create.",
"ticketOtherUser":"Create a ticket for another user.",
"close":"Close this ticket.", "close":"Close this ticket.",
"delete":"Delete this ticket.", "delete":"Delete this ticket.",
"deleteNoTranscript":"Delete ticket without saving a transcript.", "deleteNoTranscript":"Delete ticket without saving a transcript.",
@@ -504,7 +521,9 @@
"priorityGet":"View ticket priority.", "priorityGet":"View ticket priority.",
"priorityList":"List all ticket priorities.", "priorityList":"List all ticket priorities.",
"transfer":"Transfer ticket ownership.", "transfer":"Transfer ticket ownership.",
"transferUser":"User to transfer to." "transferUser":"User to transfer to.",
"transcripts":"View ticket transcript history of a user.",
"transcriptsUser":"The user to view."
}, },
"helpMenu":{ "helpMenu":{
"help":"View all available commands.", "help":"View all available commands.",
@@ -594,7 +613,8 @@
"panel":{ "panel":{
"selectTicket":"Select a ticket", "selectTicket":"Select a ticket",
"selectRole":"Select a role", "selectRole":"Select a role",
"selectOption":"Select an option" "selectOption":"Select an option",
"selectPriorityLevel":"Select priority level"
}, },
"priorities":{ "priorities":{
"urgent":"Urgent", "urgent":"Urgent",
+33 -13
View File
@@ -2,7 +2,7 @@
"_TRANSLATION":{ "_TRANSLATION":{
"otversion":"v4.2.0", "otversion":"v4.2.0",
"translators":["DJj123dj"], "translators":["DJj123dj"],
"lastedited":"16/02/2026", "lastedited":"25/05/2026",
"language":"English", "language":"English",
"automated":false "automated":false
}, },
@@ -61,7 +61,7 @@
"booleanTrue":"Boolean must be false", "booleanTrue":"Boolean must be false",
"booleanFalse":"Boolean must be true", "booleanFalse":"Boolean must be true",
"arrayEmptyDisabled":"List must not be empty", "arrayEmptyDisabled":"List must not be empty",
"arrayEmptyRequired":"List must be empty", "arrayEmptyRequired":"List must be empty",
"arrayTooShort":"List must have at least {0} items", "arrayTooShort":"List must have at least {0} items",
@@ -69,7 +69,7 @@
"arrayLengthInvalid":"List must have exactly {0} items", "arrayLengthInvalid":"List must have exactly {0} items",
"arrayInvalidTypes":"List may only contain the following types: {0}", "arrayInvalidTypes":"List may only contain the following types: {0}",
"arrayDouble":"List must not contain duplicate values", "arrayDouble":"List must not contain duplicate values",
"discordInvalidId":"Invalid Discord {0} ID", "discordInvalidId":"Invalid Discord {0} ID",
"discordInvalidIdOptions":"Invalid Discord {0} ID. Alternatively, use one of the following: {1}", "discordInvalidIdOptions":"Invalid Discord {0} ID. Alternatively, use one of the following: {1}",
"discordInvalidToken":"Invalid Discord token", "discordInvalidToken":"Invalid Discord token",
@@ -86,7 +86,7 @@
"urlInvalidPath":"Invalid URL path", "urlInvalidPath":"Invalid URL path",
"idNotUnique":"This ID is already in use. Please choose a unique ID", "idNotUnique":"This ID is already in use. Please choose a unique ID",
"idNonExistent":"ID {0} does not exist", "idNonExistent":"ID {0} does not exist",
"invalidType":"Property must be of type: {0}", "invalidType":"Property must be of type: {0}",
"propertyMissing":"Required property {0} is missing from the object", "propertyMissing":"Required property {0} is missing from the object",
"propertyOptional":"Property {0} is optional in the object", "propertyOptional":"Property {0} is optional in the object",
@@ -99,7 +99,7 @@
"invalidButton":"Button must have at least an {0} or {1}", "invalidButton":"Button must have at least an {0} or {1}",
"unusedOption":"Option {0} is not used anywhere", "unusedOption":"Option {0} is not used anywhere",
"unusedQuestion":"Question {0} is not used anywhere", "unusedQuestion":"Question {0} is not used anywhere",
"dropdownOption":"Panels with dropdown enabled may only contain options of the 'ticket' type", "dropdownOption":"A panel with dropdown can only contain options of the types: 'ticket', 'role' or 'sub-panel'.",
"customInvalidVersion":"Config version mismatch. Make sure to update your config to the latest version" "customInvalidVersion":"Config version mismatch. Make sure to update your config to the latest version"
} }
}, },
@@ -118,7 +118,9 @@
"helpSwitchText":"View Text Commands", "helpSwitchText":"View Text Commands",
"helpPage":"Page {0}", "helpPage":"Page {0}",
"withReason":"With Reason", "withReason":"With Reason",
"withoutTranscript":"Without Transcript" "withoutTranscript":"Without Transcript",
"blacklistAdd":"Blacklist User",
"blacklistRemove":"Release User"
}, },
"titles":{ "titles":{
"created":"Ticket Created", "created":"Ticket Created",
@@ -156,7 +158,8 @@
"topicSet":"Topic Changed", "topicSet":"Topic Changed",
"prioritySet":"Priority Changed", "prioritySet":"Priority Changed",
"priorityGet":"Ticket Priority", "priorityGet":"Ticket Priority",
"transfer":"Ticket Transferred" "transfer":"Ticket Transferred",
"transcripts":"Transcript History"
}, },
"descriptions":{ "descriptions":{
"create":"Your ticket is ready. Click the button below to view and continue.", "create":"Your ticket is ready. Click the button below to view and continue.",
@@ -249,7 +252,9 @@
"prioritySetLog":"The priority of this ticket has been set to {0} by {1}.", "prioritySetLog":"The priority of this ticket has been set to {0} by {1}.",
"prioritySetDm":"The priority of your ticket has been set to {0}.", "prioritySetDm":"The priority of your ticket has been set to {0}.",
"roleUpdateLog":"{0} has modified their roles.", "roleUpdateLog":"{0} has modified their roles.",
"roleUpdateDm":"Your roles have been modified." "roleUpdateDm":"Your roles have been modified.",
"topicSetLog":"The priority of this ticket has been set to {0} by {1}.",
"topicSetDm":"The priority of your ticket has been set to {0}."
} }
}, },
"transcripts":{ "transcripts":{
@@ -258,7 +263,7 @@
"ready":"Transcript Created", "ready":"Transcript Created",
"textFileDescription":"This is a text transcript of a deleted ticket.", "textFileDescription":"This is a text transcript of a deleted ticket.",
"htmlProgress":"Please wait while the HTML transcript is being generated...", "htmlProgress":"Please wait while the HTML transcript is being generated...",
"createdChannel":"A new {0} transcript has been created in the server.", "createdChannel":"A new {0} transcript has been created in the server.",
"createdCreator":"A new {0} transcript has been created for one of your tickets.", "createdCreator":"A new {0} transcript has been created for one of your tickets.",
"createdParticipant":"A new {0} transcript has been created for a ticket you participated in.", "createdParticipant":"A new {0} transcript has been created for a ticket you participated in.",
@@ -271,7 +276,9 @@
"continue":"Delete Without Transcript", "continue":"Delete Without Transcript",
"backup":"Create Backup Transcript", "backup":"Create Backup Transcript",
"error":"Something went wrong while creating the transcript.\nWhat would you like to do?\n\nThis ticket will not be deleted until you select one of the options below.", "error":"Something went wrong while creating the transcript.\nWhat would you like to do?\n\nThis ticket will not be deleted until you select one of the options below.",
"title":"Transcript Error" "title":"Transcript Error",
"noHistory":"This user does not yet have any transcripts.",
"historyNotSupported":"Transcript history is currently only supported with HTML Transcripts.\nText transcript history will be available in future versions."
}, },
"text":{ "text":{
"messagesTitle":"MESSAGES", "messagesTitle":"MESSAGES",
@@ -298,6 +305,7 @@
"unknownPanel":"Unknown Panel", "unknownPanel":"Unknown Panel",
"notInGuild":"Not In Server", "notInGuild":"Not In Server",
"channelRename":"Unable To Rename Channel", "channelRename":"Unable To Rename Channel",
"channelCategory":"Unable To Change Category",
"busy":"Ticket Is Busy", "busy":"Ticket Is Busy",
"permissionError":"Permission Error" "permissionError":"Permission Error"
}, },
@@ -321,11 +329,15 @@
"deprecatedTicket":"This channel is not recognized as a valid ticket. It may have been created with an older version of the bot.", "deprecatedTicket":"This channel is not recognized as a valid ticket. It may have been created with an older version of the bot.",
"notInGuild":"This {0} cannot be used in direct messages. Please use it in a server.", "notInGuild":"This {0} cannot be used in direct messages. Please use it in a server.",
"channelRename":"Due to Discord rate limits, the channel could not be renamed immediately. It will be renamed automatically within 10 minutes if the bot remains online.", "channelRename":"Due to Discord rate limits, the channel could not be renamed immediately. It will be renamed automatically within 10 minutes if the bot remains online.",
"channelCategory":"Due to Discord rate limits, the channel category could not be changed immediately. It will be changed automatically within 10 minutes if the bot remains online.",
"channelRenameSource":"Error source: {0}", "channelRenameSource":"Error source: {0}",
"busy":"This {0} is currently unavailable.\nThe ticket is being processed by the bot.\n\nPlease try again in a few seconds.", "busy":"This {0} is currently unavailable.\nThe ticket is being processed by the bot.\n\nPlease try again in a few seconds.",
"closeBeforeMessage":"This ticket cannot be closed or deleted before a user has sent a message.", "closeBeforeMessage":"This ticket cannot be closed or deleted before a user has sent a message.",
"closeBeforeAdminMessage":"This ticket cannot be closed or deleted before a support member or admin has sent a message.", "closeBeforeAdminMessage":"This ticket cannot be closed or deleted before a support member or admin has sent a message.",
"unableToCreateTicket":"You are currently unable to create a ticket." "unableToCreateTicket":"You are currently unable to create a ticket.",
"messageMissing":"Unable to locate message of interaction. Use the command `{0}` instead.",
"stateExpired":"This interaction is no longer valid or has expired. Use the command `{0}` instead. It is normal to receive this error after a major Open Ticket update.",
"panelStateExpired":"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update."
}, },
"optionInvalidReasons":{ "optionInvalidReasons":{
"stringRegex":"The value does not match the required pattern.", "stringRegex":"The value does not match the required pattern.",
@@ -387,6 +399,8 @@
"syntax":"Syntax", "syntax":"Syntax",
"originalName":"Original Name", "originalName":"Original Name",
"newName":"New Name", "newName":"New Name",
"originalCategory":"Original Category",
"newCategory":"New Category",
"until":"Until", "until":"Until",
"validOptions":"Valid Options", "validOptions":"Valid Options",
"validPanels":"Valid Panels", "validPanels":"Valid Panels",
@@ -408,6 +422,8 @@
"participants":"Participants", "participants":"Participants",
"yes":"Yes", "yes":"Yes",
"no":"No", "no":"No",
"accept":"Accept",
"cancel":"Cancel",
"option":"Option", "option":"Option",
"topic":"Topic", "topic":"Topic",
"uptime":"System Uptime", "uptime":"System Uptime",
@@ -439,6 +455,7 @@
"panelAutoUpdate":"Automatically update this panel when edited.", "panelAutoUpdate":"Automatically update this panel when edited.",
"ticket":"Create a ticket instantly.", "ticket":"Create a ticket instantly.",
"ticketId":"ID of the ticket to create.", "ticketId":"ID of the ticket to create.",
"ticketOtherUser":"Create a ticket for another user.",
"close":"Close this ticket.", "close":"Close this ticket.",
"delete":"Delete this ticket.", "delete":"Delete this ticket.",
"deleteNoTranscript":"Delete ticket without saving a transcript.", "deleteNoTranscript":"Delete ticket without saving a transcript.",
@@ -504,7 +521,9 @@
"priorityGet":"View ticket priority.", "priorityGet":"View ticket priority.",
"priorityList":"List all ticket priorities.", "priorityList":"List all ticket priorities.",
"transfer":"Transfer ticket ownership.", "transfer":"Transfer ticket ownership.",
"transferUser":"User to transfer to." "transferUser":"User to transfer to.",
"transcripts":"View ticket transcript history of a user.",
"transcriptsUser":"The user to view."
}, },
"helpMenu":{ "helpMenu":{
"help":"View all available commands.", "help":"View all available commands.",
@@ -594,7 +613,8 @@
"panel":{ "panel":{
"selectTicket":"Select a ticket", "selectTicket":"Select a ticket",
"selectRole":"Select a role", "selectRole":"Select a role",
"selectOption":"Select an option" "selectOption":"Select an option",
"selectPriorityLevel":"Select priority level"
}, },
"priorities":{ "priorities":{
"urgent":"Urgent", "urgent":"Urgent",
+3 -4
View File
@@ -28,18 +28,17 @@ export async function checkTicketCreationPerms(instance:api.ODButtonResponderIns
export async function replyInteractiveMessageState(instance:api.ODButtonResponderInstance|api.ODDropdownResponderInstance|api.ODModalResponderInstance,origin:"slash"|"text"|"button"|"dropdown"|"modal"|"other",channel:discord.TextBasedChannel,message:discord.Message|null,replacementCommandName:string){ export async function replyInteractiveMessageState(instance:api.ODButtonResponderInstance|api.ODDropdownResponderInstance|api.ODModalResponderInstance,origin:"slash"|"text"|"button"|"dropdown"|"modal"|"other",channel:discord.TextBasedChannel,message:discord.Message|null,replacementCommandName:string){
//check message state //check message state
const {user,member,guild} = instance const {user,member,guild} = instance
const lang = opendiscord.languages
const interactiveMsgState = opendiscord.states.get("opendiscord:interactive-message") const interactiveMsgState = opendiscord.states.get("opendiscord:interactive-message")
if (!message){ if (!message){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.messageMissing",[replacementCommandName]),layout:"simple",customTitle:"Message State Error"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"Unable to locate message of interaction. Use the command `{0}` instead.".replace("{0}",replacementCommandName),layout:"simple",customTitle:"Message State Error"}))
return null return null
} }
const state = await interactiveMsgState.getMsgState({channel,message}) const state = await interactiveMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.stateExpired",[replacementCommandName]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This interaction is no longer valid or has expired. Use the command `{0}` instead. It is normal to receive this error after a major Open Ticket update.".replace("{0}",replacementCommandName),layout:"simple",customTitle:"Message State Expired"}))
return null return null
}else return state }else return state
} }
+1 -2
View File
@@ -17,8 +17,7 @@ export async function registerAllButtons(){
if (params.verifyButtonId.length > 40) throw new api.ODSystemError("ODButton:opendiscord:verifybar-button => verifyButtonId '"+verifyButtonId+"' exceeds 40 characters limit!") if (params.verifyButtonId.length > 40) throw new api.ODSystemError("ODButton:opendiscord:verifybar-button => verifyButtonId '"+verifyButtonId+"' exceeds 40 characters limit!")
const color = ("customColor" in params && params.customColor) ? params.customColor : "gray" const color = ("customColor" in params && params.customColor) ? params.customColor : "gray"
//TODO TRANSLATION!!! const defaultLabel = (params.defaultButtonType == "✅") ? lang.getTranslation("params.uppercase.accept") : lang.getTranslation("params.uppercase.cancel")
const defaultLabel = (params.defaultButtonType == "✅") ? "Accept" : "Cancel"
const defaultEmoji = (params.defaultButtonType == "✅") ? "✅" : "❌" const defaultEmoji = (params.defaultButtonType == "✅") ? "✅" : "❌"
const label = ("customLabel" in params && params.customLabel) ? params.customLabel : (params.useDefaultLabels ? defaultLabel : null) const label = ("customLabel" in params && params.customLabel) ? params.customLabel : (params.useDefaultLabels ? defaultLabel : null)
+1 -2
View File
@@ -80,8 +80,7 @@ const panelDropdowns = () => {
})) }))
const currentPriority = opendiscord.priorities.getFromPriorityLevel(ticket.get("opendiscord:priority").value) const currentPriority = opendiscord.priorities.getFromPriorityLevel(ticket.get("opendiscord:priority").value)
//TODO TRANSLATION!!! const placeholder = (currentPriority.priority < 0) ? lang.getTranslation("panel.selectPriorityLevel") : (lang.getTranslation("params.uppercase.priority")+": "+currentPriority.renderDisplayName())
const placeholder = (currentPriority.priority < 0) ? "Select priority level" : (lang.getTranslation("params.uppercase.priority")+": "+currentPriority.renderDisplayName())
instance.setCustomId("od:priority-dropdown") instance.setCustomId("od:priority-dropdown")
instance.setType("string") instance.setType("string")
+6 -12
View File
@@ -353,17 +353,13 @@ const errorEmbeds = () => {
const method = (origin == "ticket-create" || origin == "ticket-close" || origin == "ticket-reopen" || origin == "ticket-claim" || origin == "ticket-unclaim" || origin == "ticket-move") ? origin : getMethodFromOrigin(origin) const method = (origin == "ticket-create" || origin == "ticket-close" || origin == "ticket-reopen" || origin == "ticket-claim" || origin == "ticket-unclaim" || origin == "ticket-move") ? origin : getMethodFromOrigin(origin)
instance.setColor(generalConfig.data.ticketSystem.useRedErrorEmbeds ? "Red" : generalConfig.data.mainColor) instance.setColor(generalConfig.data.ticketSystem.useRedErrorEmbeds ? "Red" : generalConfig.data.mainColor)
//TODO TRANSLATION!!! instance.setTitle(utilities.emojiTitle("❌",lang.getTranslation("errors.titles.channelCategory")))
instance.setTitle(utilities.emojiTitle("❌","Unable To Change Category"))
instance.setAuthor(user.displayName,user.displayAvatarURL()) instance.setAuthor(user.displayName,user.displayAvatarURL())
//TODO TRANSLATION!!! instance.setDescription(lang.getTranslation("errors.descriptions.channelCategory"))
instance.setDescription("Due to Discord rate limits, the channel category could not be changed immediately. It will be changed automatically within 10 minutes if the bot remains online.")
instance.setFooter(lang.getTranslationWithParams("errors.descriptions.channelRenameSource",[method])) instance.setFooter(lang.getTranslationWithParams("errors.descriptions.channelRenameSource",[method]))
instance.addFields( instance.addFields(
//TODO TRANSLATION!!! {name:lang.getTranslation("params.uppercase.originalCategory")+":",value:"```"+originalCategory+"```",inline:true},
{name:"Original Category"+":",value:"```"+originalCategory+"```",inline:true}, {name:lang.getTranslation("params.uppercase.newCategory")+":",value:"```"+newCategory+"```",inline:true}
//TODO TRANSLATION!!!
{name:"New Category"+":",value:"```"+newCategory+"```",inline:true}
) )
}) })
) )
@@ -1141,14 +1137,12 @@ const transcriptEmbeds = () => {
//transcript history only supports URL (html) transcripts at the moment //transcript history only supports URL (html) transcripts at the moment
const filteredList = transcriptList.filter((t) => t.transcriptType == "remoteUrl") const filteredList = transcriptList.filter((t) => t.transcriptType == "remoteUrl")
const renderedList = filteredList.map((t) => "- ["+t.ticketName+"]("+t.transcriptUrl+") ("+discord.time(new Date(t.ticketDeletedDate ?? 0),"R")+")").join("\n") const renderedList = filteredList.map((t) => "- ["+t.ticketName+"]("+t.transcriptUrl+") ("+discord.time(new Date(t.ticketDeletedDate ?? 0),"R")+")").join("\n")
//TODO TRANSLATION!!! const contents = (transcriptList.length < 1) ? lang.getTranslation("transcripts.errors.noHistory") : ((filteredList.length > 0) ? renderedList : "⚠️ "+lang.getTranslation("transcripts.errors.historyNotSupported"))
const contents = (transcriptList.length < 1) ? "This user does not yet have any transcripts." : ((filteredList.length > 0) ? renderedList : "*⚠️ Transcript history is currently only supported with HTML Transcripts.\nText transcript history will be available soon.*")
instance.setAuthor(transcriptUser.displayName,transcriptUser.displayAvatarURL()) instance.setAuthor(transcriptUser.displayName,transcriptUser.displayAvatarURL())
instance.setThumbnail(transcriptUser.displayAvatarURL()) instance.setThumbnail(transcriptUser.displayAvatarURL())
instance.setColor(generalConfig.data.mainColor) instance.setColor(generalConfig.data.mainColor)
//TODO TRANSLATION!!! instance.setTitle(utilities.emojiTitle("📄",lang.getTranslation("actions.titles.transcripts")))
instance.setTitle(utilities.emojiTitle("📄","Transcript History"))
instance.setDescription(contents) instance.setDescription(contents)
}) })
) )
+2 -2
View File
@@ -6,6 +6,7 @@ import * as discord from "discord.js"
const generalConfig = opendiscord.configs.get("opendiscord:general") const generalConfig = opendiscord.configs.get("opendiscord:general")
const clearMsgState = opendiscord.states.get("opendiscord:clear-message") const clearMsgState = opendiscord.states.get("opendiscord:clear-message")
const lang = opendiscord.languages
export async function registerCommandResponders(){ export async function registerCommandResponders(){
//CLEAR COMMAND RESPONDER //CLEAR COMMAND RESPONDER
@@ -72,8 +73,7 @@ export async function registerButtonResponders(){
//check message state //check message state
const state = await clearMsgState.getMsgState({channel,message,user}) const state = await clearMsgState.getMsgState({channel,message,user})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.stateExpired",["/clear"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This interaction is no longer valid or has expired. Use the command `{0}` instead. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/clear"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
+5 -8
View File
@@ -6,6 +6,7 @@ import * as discord from "discord.js"
const generalConfig = opendiscord.configs.get("opendiscord:general") const generalConfig = opendiscord.configs.get("opendiscord:general")
const panelMsgState = opendiscord.states.get("opendiscord:panel-message") const panelMsgState = opendiscord.states.get("opendiscord:panel-message")
const lang = opendiscord.languages
export async function registerCommandResponders(){ export async function registerCommandResponders(){
//PANEL COMMAND RESPONDER //PANEL COMMAND RESPONDER
@@ -64,8 +65,7 @@ export async function registerButtonResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
@@ -123,8 +123,7 @@ export async function registerDropdownResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
@@ -188,8 +187,7 @@ export async function registerDropdownResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
@@ -243,8 +241,7 @@ export async function registerDropdownResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
+2 -2
View File
@@ -6,6 +6,7 @@ import * as discord from "discord.js"
const generalConfig = opendiscord.configs.get("opendiscord:general") const generalConfig = opendiscord.configs.get("opendiscord:general")
const panelMsgState = opendiscord.states.get("opendiscord:panel-message") const panelMsgState = opendiscord.states.get("opendiscord:panel-message")
const lang = opendiscord.languages
export async function registerButtonResponders(){ export async function registerButtonResponders(){
//ROLE OPTION BUTTON RESPONDER //ROLE OPTION BUTTON RESPONDER
@@ -21,8 +22,7 @@ export async function registerButtonResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
+1 -2
View File
@@ -92,8 +92,7 @@ export async function registerButtonResponders(){
//check message state //check message state
const state = await panelMsgState.getMsgState({channel,message}) const state = await panelMsgState.getMsgState({channel,message})
if (!state){ if (!state){
//TODO TRANSLATION!!! await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:lang.getTranslationWithParams("errors.descriptions.panelStateExpired",["/panel"]),layout:"simple",customTitle:"Message State Expired"}))
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:error").build(origin,{guild,channel,user,error:"This panel is no longer valid or has expired. Create a new panel using `{0}` to solve the issue. It is normal to receive this error after a major Open Ticket update.".replace("{0}","/panel"),layout:"simple",customTitle:"Message State Expired"}))
return cancel() return cancel()
} }
+23 -3
View File
@@ -161,6 +161,8 @@ export type ODLanguageManagerTranslationIdMappings = (
"actions.buttons.helpPage"| "actions.buttons.helpPage"|
"actions.buttons.withReason"| "actions.buttons.withReason"|
"actions.buttons.withoutTranscript"| "actions.buttons.withoutTranscript"|
"actions.buttons.blacklistAdd"|
"actions.buttons.blacklistRemove"|
"actions.titles.created"| "actions.titles.created"|
"actions.titles.close"| "actions.titles.close"|
@@ -198,6 +200,7 @@ export type ODLanguageManagerTranslationIdMappings = (
"actions.titles.prioritySet"| "actions.titles.prioritySet"|
"actions.titles.priorityGet"| "actions.titles.priorityGet"|
"actions.titles.transfer"| "actions.titles.transfer"|
"actions.titles.transcripts"|
"actions.descriptions.create"| "actions.descriptions.create"|
"actions.descriptions.close"| "actions.descriptions.close"|
@@ -288,7 +291,9 @@ export type ODLanguageManagerTranslationIdMappings = (
"actions.logs.prioritySetDm"| "actions.logs.prioritySetDm"|
"actions.logs.roleUpdateLog"| "actions.logs.roleUpdateLog"|
"actions.logs.roleUpdateDm"| "actions.logs.roleUpdateDm"|
"actions.logs.topicSetLog"|
"actions.logs.topicSetDm"|
"transcripts.success.visit"| "transcripts.success.visit"|
"transcripts.success.ready"| "transcripts.success.ready"|
"transcripts.success.textFileDescription"| "transcripts.success.textFileDescription"|
@@ -306,7 +311,9 @@ export type ODLanguageManagerTranslationIdMappings = (
"transcripts.errors.backup"| "transcripts.errors.backup"|
"transcripts.errors.error"| "transcripts.errors.error"|
"transcripts.errors.title"| "transcripts.errors.title"|
"transcripts.errors.noHistory"|
"transcripts.errors.historyNotSupported"|
"transcripts.text.messagesTitle"| "transcripts.text.messagesTitle"|
"transcripts.text.embedTitle"| "transcripts.text.embedTitle"|
"transcripts.text.fileTitle"| "transcripts.text.fileTitle"|
@@ -328,6 +335,7 @@ export type ODLanguageManagerTranslationIdMappings = (
"errors.titles.unknownPanel"| "errors.titles.unknownPanel"|
"errors.titles.notInGuild"| "errors.titles.notInGuild"|
"errors.titles.channelRename"| "errors.titles.channelRename"|
"errors.titles.channelCategory"|
"errors.titles.busy"| "errors.titles.busy"|
"errors.titles.permissionError"| "errors.titles.permissionError"|
@@ -350,12 +358,16 @@ export type ODLanguageManagerTranslationIdMappings = (
"errors.descriptions.deprecatedTicket"| "errors.descriptions.deprecatedTicket"|
"errors.descriptions.notInGuild"| "errors.descriptions.notInGuild"|
"errors.descriptions.channelRename"| "errors.descriptions.channelRename"|
"errors.descriptions.channelCategory"|
"errors.descriptions.channelRenameSource"| "errors.descriptions.channelRenameSource"|
"errors.descriptions.busy"| "errors.descriptions.busy"|
"errors.descriptions.closeBeforeMessage"| "errors.descriptions.closeBeforeMessage"|
"errors.descriptions.closeBeforeAdminMessage"| "errors.descriptions.closeBeforeAdminMessage"|
"errors.descriptions.unableToCreateTicket"| "errors.descriptions.unableToCreateTicket"|
"errors.descriptions.messageMissing"|
"errors.descriptions.stateExpired"|
"errors.descriptions.panelStateExpired"|
"errors.optionInvalidReasons.stringRegex"| "errors.optionInvalidReasons.stringRegex"|
"errors.optionInvalidReasons.stringMinLength"| "errors.optionInvalidReasons.stringMinLength"|
"errors.optionInvalidReasons.stringMaxLength"| "errors.optionInvalidReasons.stringMaxLength"|
@@ -410,6 +422,8 @@ export type ODLanguageManagerTranslationIdMappings = (
"params.uppercase.syntax"| "params.uppercase.syntax"|
"params.uppercase.originalName"| "params.uppercase.originalName"|
"params.uppercase.newName"| "params.uppercase.newName"|
"params.uppercase.originalCategory"|
"params.uppercase.newCategory"|
"params.uppercase.until"| "params.uppercase.until"|
"params.uppercase.validOptions"| "params.uppercase.validOptions"|
"params.uppercase.validPanels"| "params.uppercase.validPanels"|
@@ -432,6 +446,8 @@ export type ODLanguageManagerTranslationIdMappings = (
"params.uppercase.participants"| "params.uppercase.participants"|
"params.uppercase.yes"| "params.uppercase.yes"|
"params.uppercase.no"| "params.uppercase.no"|
"params.uppercase.accept"|
"params.uppercase.cancel"|
"params.uppercase.option"| "params.uppercase.option"|
"params.uppercase.topic"| "params.uppercase.topic"|
"params.uppercase.uptime"| "params.uppercase.uptime"|
@@ -460,6 +476,7 @@ export type ODLanguageManagerTranslationIdMappings = (
"commands.panelAutoUpdate"| "commands.panelAutoUpdate"|
"commands.ticket"| "commands.ticket"|
"commands.ticketId"| "commands.ticketId"|
"commands.ticketOtherUser"|
"commands.close"| "commands.close"|
"commands.delete"| "commands.delete"|
"commands.deleteNoTranscript"| "commands.deleteNoTranscript"|
@@ -522,6 +539,8 @@ export type ODLanguageManagerTranslationIdMappings = (
"commands.priorityList"| "commands.priorityList"|
"commands.transfer"| "commands.transfer"|
"commands.transferUser"| "commands.transferUser"|
"commands.transcripts"|
"commands.transcriptsUser"|
"helpMenu.help"| "helpMenu.help"|
"helpMenu.ticket"| "helpMenu.ticket"|
@@ -604,6 +623,7 @@ export type ODLanguageManagerTranslationIdMappings = (
"panel.selectTicket"| "panel.selectTicket"|
"panel.selectRole"| "panel.selectRole"|
"panel.selectOption"| "panel.selectOption"|
"panel.selectPriorityLevel"|
"priorities.urgent"| "priorities.urgent"|
"priorities.veryHigh"| "priorities.veryHigh"|
+1 -2
View File
@@ -123,8 +123,7 @@ export function registerDefaultCheckerCustomTranslations(tm:api.ODMappedCheckerT
tm.quickTranslate(lm,"checker.messages.invalidButton","message","opendiscord:invalid-button") // This button needs to have at least an {0} or {1}! tm.quickTranslate(lm,"checker.messages.invalidButton","message","opendiscord:invalid-button") // This button needs to have at least an {0} or {1}!
tm.quickTranslate(lm,"checker.messages.unusedOption","message","opendiscord:unused-option") // The option {0} isn't used anywhere! tm.quickTranslate(lm,"checker.messages.unusedOption","message","opendiscord:unused-option") // The option {0} isn't used anywhere!
tm.quickTranslate(lm,"checker.messages.unusedQuestion","message","opendiscord:unused-question") // The question {0} isn't used anywhere! tm.quickTranslate(lm,"checker.messages.unusedQuestion","message","opendiscord:unused-question") // The question {0} isn't used anywhere!
//TODO TRANSLATION!!! (changed) tm.quickTranslate(lm,"checker.messages.dropdownOption","message","opendiscord:dropdown-option") // A panel with dropdown can only contain options of the types: 'ticket', 'role' or 'sub-panel'.
//tm.quickTranslate(lm,"checker.messages.dropdownOption","message","opendiscord:dropdown-option") // A panel with dropdown can only contain options of the types: 'ticket', 'role' or 'sub-panel'.
tm.quickTranslate(lm,"checker.messages.customInvalidVersion","message","opendiscord:invalid-version") // The version specified in your config does not match! Make sure you have updated the config to the latest version! tm.quickTranslate(lm,"checker.messages.customInvalidVersion","message","opendiscord:invalid-version") // The version specified in your config does not match! Make sure you have updated the config to the latest version!
} }
+3 -6
View File
@@ -68,8 +68,7 @@ export async function loadAllSlashCommands(){
}, },
{ {
name:"user", name:"user",
//TODO TRANSLATION!!! description:lang.getTranslation("commands.ticketOtherUser"),
description:"Create a ticket for another user.",
type:acot.User, type:acot.User,
required:false, required:false,
} }
@@ -642,15 +641,13 @@ export async function loadAllSlashCommands(){
if (allowedCommands.includes("transcripts")) commands.add(new api.ODSlashCommand("opendiscord:transcripts",{ if (allowedCommands.includes("transcripts")) commands.add(new api.ODSlashCommand("opendiscord:transcripts",{
type:act.ChatInput, type:act.ChatInput,
name:"transcripts", name:"transcripts",
//TODO TRANSLATION!!! description:lang.getTranslation("commands.transcripts"),
description:"View ticket transcript history of a user.",
contexts:[discord.InteractionContextType.Guild], contexts:[discord.InteractionContextType.Guild],
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall], integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
options:[ options:[
{ {
name:"user", name:"user",
//TODO TRANSLATION!!! description:lang.getTranslation("commands.transcriptsUser"),
description:"The user to view.",
type:acot.User, type:acot.User,
required:true required:true
} }
+2 -2
View File
@@ -285,9 +285,9 @@ export async function loadAllHelpMenuComponents(){
})) }))
if (allowedCommands.includes("transcripts")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:transcripts",0,{ if (allowedCommands.includes("transcripts")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:transcripts",0,{
textName:prefix+"transcripts", textName:prefix+"transcripts",
textDescription:"View ticket transcript history of a user.", //TODO TRANSLATION!!! textDescription:lang.getTranslation("commands.transcripts"),
slashName:"/transcripts", slashName:"/transcripts",
slashDescription:"View ticket transcript history of a user.", //TODO TRANSLATION!!! slashDescription:lang.getTranslation("commands.transcripts"),
textOptions:[{name:"user",optional:false}], textOptions:[{name:"user",optional:false}],
slashOptions:[{name:"user",optional:false}] slashOptions:[{name:"user",optional:false}]
})) }))