Skip to content

Commit 8c2eab4

Browse files
committed
feat(language): add italian translation
1 parent 15f9091 commit 8c2eab4

35 files changed

+3001
-109
lines changed

src/buttons/gamesActivities/neverhaveiever.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const button: Button = {
5151
userID: interaction.user?.id,
5252
})) as IUserModel;
5353

54-
let { Funny, Basic, Young, Food, RuleBreak } = await getNeverHaveIEver(
54+
let { NeverHaveIever } = await getNeverHaveIEver(
5555
guildDb?.language != null
5656
? guildDb.language
5757
: userDb?.language
@@ -73,20 +73,12 @@ const button: Button = {
7373
switch (guildDb.customTypes) {
7474
case "regular":
7575
nererhaveIever = shuffle([
76-
...Funny,
77-
...Basic,
78-
...Young,
79-
...Food,
80-
...RuleBreak,
76+
...NeverHaveIever
8177
]);
8278
break;
8379
case "mixed":
8480
nererhaveIever = shuffle([
85-
...Funny,
86-
...Basic,
87-
...Young,
88-
...Food,
89-
...RuleBreak,
81+
...NeverHaveIever,
9082
...dbquestions.map((c) => c.msg),
9183
]);
9284
break;
@@ -96,11 +88,7 @@ const button: Button = {
9688
}
9789
} else {
9890
nererhaveIever = shuffle([
99-
...Funny,
100-
...Basic,
101-
...Young,
102-
...Food,
103-
...RuleBreak,
91+
...NeverHaveIever
10492
]);
10593
}
10694

src/buttons/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,14 @@ const buttonInteractionEvent: Event = {
103103
"welcomeType",
104104
"welcomeTest",
105105
"selectMenuWelcomeType",
106+
"selectMenuChannel",
106107
"replayType",
107108
"replayBy",
108109
"replayDelete",
109110
"replayDeleteChannels",
110111
"replayChannels",
111112
"selectMenuReplay",
113+
"selectMenuRole",
112114
"welcomeChannel",
113115
"dailyInterval",
114116
"dailyType",
@@ -126,6 +128,8 @@ const buttonInteractionEvent: Event = {
126128
"paginateNext",
127129
"paginatePrev",
128130
"privacy",
131+
"selectMenuWelcome",
132+
"selectMenuType",
129133
];
130134

131135
const isExcludedButton = excludedButtons.includes(interaction.customId);

src/commands/game/dare.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const command: ChatInputCommand = {
2222
de: "Gibt dir eine zufällige pflicht Aufgabe, die du beantworten musst",
2323
"es-ES": "Publica un reto aleatorio que tienes que cumplir",
2424
fr: "Publie un défi aléatoire que tu dois relever",
25+
it: "Pubblica una sfida casuale che devi affrontare",
2526
}),
2627

2728
/**

src/commands/game/higherlower.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const command: ChatInputCommand = {
2525
de: "Starte das Higher or Lower spiel",
2626
"es-ES": "Iniciar el juego Higher or Lower",
2727
fr: "Démarrer le jeu Higher or Lower",
28+
it: "Avvia il gioco Higher or Lower",
2829
}),
2930

3031
/**

src/commands/game/leaderboard.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const command: ChatInputCommand = {
1313
de: "Zeigt die Rangliste für ein Spiel an",
1414
"es-ES": "Muestra la lista de clasificación de un partido",
1515
fr: "Consulter le classement d'un jeu",
16+
it: "Mostra la classifica di un gioco",
1617
})
1718
.addStringOption((option) =>
1819
option

src/commands/game/neverhaveiever.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const command: ChatInputCommand = {
2222
de: "Bekomme eine nie habe ich jemals Nachricht",
2323
"es-ES": "Consigue un mensaje Nunca he tenido",
2424
fr: "Afficher une question que je n'ai jamais posée",
25+
it: "Ottieni un messaggio che non ho mai avuto",
2526
}),
2627

2728
/**
@@ -35,7 +36,7 @@ const command: ChatInputCommand = {
3536
userID: interaction.user?.id,
3637
})) as IUserModel;
3738

38-
let { Funny, Basic, Young, Food, RuleBreak } = await getNeverHaveIEver(
39+
let { NeverHaveIever } = await getNeverHaveIEver(
3940
guildDb?.language != null
4041
? guildDb.language
4142
: userDb?.language
@@ -55,20 +56,12 @@ const command: ChatInputCommand = {
5556
switch (guildDb.customTypes) {
5657
case "regular":
5758
nererhaveIever = shuffle([
58-
...Funny,
59-
...Basic,
60-
...Young,
61-
...Food,
62-
...RuleBreak,
59+
...NeverHaveIever
6360
]);
6461
break;
6562
case "mixed":
6663
nererhaveIever = shuffle([
67-
...Funny,
68-
...Basic,
69-
...Young,
70-
...Food,
71-
...RuleBreak,
64+
...NeverHaveIever,
7265
...dbquestions.map((c) => c.msg),
7366
]);
7467
break;
@@ -78,11 +71,7 @@ const command: ChatInputCommand = {
7871
}
7972
} else {
8073
nererhaveIever = shuffle([
81-
...Funny,
82-
...Basic,
83-
...Young,
84-
...Food,
85-
...RuleBreak,
74+
...NeverHaveIever
8675
]);
8776
}
8877

src/commands/game/random.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const command: ChatInputCommand = {
2323
"es-ES":
2424
"Publica una pregunta de verdad o reto aleatoria que debes responder",
2525
fr: "Publie une question de vérité ou de défi aléatoire que vous devez répondre",
26+
it: "Pubblica una domanda di verità o di sfida casuale che devi rispondere",
2627
}),
2728

2829
/**

src/commands/game/truth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const command: ChatInputCommand = {
2222
de: "Postet eine zufällige Wahrheitsfrage, die du beantworten musst",
2323
"es-ES": "Publica una pregunta de verdad aleatoria que debes responder",
2424
fr: "Publie une question de vérité aléatoire que vous devez répondre",
25+
it: "Pubblica una domanda di verità casuale che devi rispondere",
2526
}),
2627

2728
/**

src/commands/game/whatwouldyoudo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const command: ChatInputCommand = {
2222
de: "Was würdest du in dieser Situation tun",
2323
"es-ES": "¿Qué harías en esta situación?",
2424
fr: "Que feriez-vous dans cette situation",
25+
it: "Cosa faresti in questa situazione",
2526
}),
2627
/**
2728
* @param {CommandInteraction} interaction

src/commands/game/wouldyourather.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const command: ChatInputCommand = {
2121
de: "Erhalte eine Würdest du eher Frage",
2222
"es-ES": "Obtiene une pregunta ¿Qué prefieres?",
2323
fr: "Obtenez une question préférez-vous",
24+
it: "Ottieni una domanda Preferiresti",
2425
}),
2526

2627
/**

src/commands/settings/custom.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const command: ChatInputCommand = {
4040
de: "Fügt eigene WouldYou Fragen hinzu",
4141
"es-ES": "Añade mensajes Would You personalizados",
4242
fr: "Ajoute des messages personnalisés au bot",
43+
it: "Aggiungi messaggi personalizzati a Would You",
4344
})
4445
.addSubcommand((subcommand) =>
4546
subcommand

src/commands/settings/language.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const command: ChatInputCommand = {
1717
de: "Ändere die Sprache für den aktuellen Server",
1818
"es-ES": "Cambiar el idioma del bot en el servidor",
1919
fr: "Changer la langue du serveur actuel",
20+
it: "Cambia la lingua per il server attuale",
2021
})
2122
.addStringOption((option) =>
2223
option
@@ -38,7 +39,7 @@ const command: ChatInputCommand = {
3839
{ name: "🇺🇸 English", value: "en_EN" },
3940
{ name: "🇪🇸 Español", value: "es_ES" },
4041
{ name: "🇫🇷 Français", value: "fr_FR" },
41-
// { name: "🇮🇹 Italiano", value: "fr_FR" },
42+
{ name: "🇮🇹 Italiano", value: "it_IT" },
4243
),
4344
),
4445

@@ -67,6 +68,10 @@ const command: ChatInputCommand = {
6768
title: "Langue changée!",
6869
description: "Français a été sélectionné comme nouvelle langue!",
6970
},
71+
it_IT: {
72+
title: "Lingua cambiata!",
73+
description: "Italiano è stato selezionato come nuova lingua!",
74+
},
7075
} as Record<string, { title: string; description: string }>;
7176

7277
languageembed = new EmbedBuilder()

src/commands/settings/privacy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const command: ChatInputCommand = {
2020
de: "Ändert deine Datenschutzeinstellungen",
2121
"es-ES": "Cambia tu configuración de privacidad",
2222
fr: "Modifie vos paramètres de confidentialité",
23+
it: "Modifica le impostazioni sulla privacy",
2324
}),
2425

2526
/**

src/commands/settings/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const command: ChatInputCommand = {
2222
"es-ES":
2323
"Cambiar la configuración de los mensajes diarios y las bienvenidas",
2424
fr: "Modifier les paramètres des messages quotidiens et des messages de bienvenue",
25+
it: "Cambia le impostazioni dei messaggi giornalieri e di benvenuto",
2526
})
2627
.addStringOption((option) =>
2728
option

src/commands/settings/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const command: ChatInputCommand = {
1717
de: "Ändert den Typ der Nachrichten, die verwendet werden",
1818
"es-ES": "Cambia el tipo de mensajes que se utilizarán",
1919
fr: "Modifie le type de messages qui seront utilisés",
20+
it: "Cambia il tipo di messaggi da utilizzare",
2021
})
2122
.addSubcommand((subcommand) =>
2223
subcommand

src/commands/utility/guide.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const command: ChatInputCommand = {
1212
de: "Anleitung, um den Bot zu verwenden und die Aktivität zu erhöhen",
1313
"es-ES": "Guía para usar el bot y aumentar la actividad",
1414
fr: "Un guide simple sur la façon d'utiliser le bot pour augmenter l'activité",
15+
it: "Guida su come utilizzare il bot e aumentare l'attività",
1516
}),
1617

1718
/**

src/commands/utility/help.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const command: ChatInputCommand = {
1818
de: "Zeigt eine Liste aller Befehle an",
1919
"es-ES": "Muestra una lista de cada comando",
2020
fr: "Affiche une liste de toutes les commandes",
21+
it: "Mostra un elenco di tutti i comandi",
2122
}),
2223
/**
2324
* @param {CommandInteraction} interaction
@@ -30,11 +31,13 @@ const command: ChatInputCommand = {
3031
en_EN: "en",
3132
es_ES: "es",
3233
fr_FR: "fr",
34+
it_IT: "it",
3335
} as any;
3436

3537
const commands = await client.application?.commands.fetch({
3638
withLocalizations: true,
3739
});
40+
console.log(commands)
3841
const type = languageMappings[guildDb?.language] || "en";
3942
const helpembed = new EmbedBuilder()
4043
.setColor("#0598F6")
@@ -60,18 +63,19 @@ const command: ChatInputCommand = {
6063
`\n\n${(commands as any)
6164
.filter((e: any) => e.name !== "reload")
6265
.sort((a: any, b: any) => a.name.localeCompare(b.name))
63-
.map(
64-
(n: any) =>
65-
`</${n.name}:${n.id}> - ${
66-
type === "de"
67-
? n.descriptionLocalizations.de
68-
: type === "es"
69-
? n.descriptionLocalizations["es-ES"]
70-
: type === "fr"
71-
? n.descriptionLocalizations.fr
72-
: n.description
73-
}`,
74-
)
66+
.map((n: any) => {
67+
const descriptionMap: { [key: string]: string | undefined } = {
68+
de: n.descriptionLocalizations.de,
69+
es: n.descriptionLocalizations["es-ES"],
70+
fr: n.descriptionLocalizations.fr,
71+
it: n.descriptionLocalizations.it,
72+
};
73+
74+
const description = descriptionMap[type] || n.description;
75+
76+
return `</${n.name}:${n.id}> - ${description}`;
77+
})
78+
7579
.join("\n")}`,
7680
);
7781

src/commands/utility/info.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const command: ChatInputCommand = {
1313
de: "Zeigt einige Informationen über den Bot",
1414
"es-ES": "Muestra información sobre el bot",
1515
fr: "Affiche des informations sur le bot",
16+
it: "Mostra alcune informazioni sul bot",
1617
}),
1718
/**
1819
* @param {CommandInteraction} interaction

src/commands/utility/ping.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const command: ChatInputCommand = {
1818
de: "Zeigt den Ping des Clients an",
1919
"es-ES": "Muestra el ping del cliente",
2020
fr: "Affiche le ping du client",
21+
it: "Mostra il ping del client",
2122
}),
2223

2324
/**

src/commands/utility/support.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const command: ChatInputCommand = {
1818
de: "Link zu unserem Support Server",
1919
"es-ES": "Link para nuestro servidor de soporte",
2020
fr: "Lien vers notre serveur d'assistance",
21+
it: "Link al nostro server di supporto",
2122
}),
2223

2324
/**

src/commands/utility/vote.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const command: ChatInputCommand = {
1212
de: "Läst dich für den Bot abstimmen",
1313
"es-ES": "¡Vota por mí!",
1414
fr: "Votez pour le bot pour nous soutenir",
15+
it: "Vota per me!",
1516
}),
1617

1718
/**

0 commit comments

Comments
 (0)