Skip to content

Commit

Permalink
chore: Update German translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic-R committed Jul 26, 2024
1 parent fcc7bdf commit a740dce
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 60 deletions.
2 changes: 1 addition & 1 deletion api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
let data = require(`./endpoint/${file}`);
console.log(
new Date().toLocaleString(),
`Registering route: /${data.method} ${data.path}`
`Route registriert: /${data.method} ${data.path}`
);
fastify.route(data);
}
Expand Down
14 changes: 7 additions & 7 deletions commands/clear_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ require("dotenv").config();
module.exports = {
command: {
name: "cleardatabase",
description: "This PERMANENTLY deletes the contents of the BUILD table and RESETS all points (all users are saved)",
description: "Löscht PERMANENT den Inhalt der BUILD-Tabelle und setzt alle Punkte auf 0.",
options: [
{
name: "sure",
description: "Are you SURE you want to clear the database?",
description: "Bist du sicher, dass du die Datenbank löschen willst?",
type: 5,
required: true,
},
{
name: "reason",
description: "The reason for deleting the database.",
description: "Grund für die Löschung der Datenbank.",
type: 3,
required: true,
}
],
},
run: async (client, interaction, prisma) => {
if(interaction.options.getBoolean("sure") === false) {
if (interaction.options.getBoolean("sure") === false) {
return interaction.reply({
content: "You need to be sure to clear the database.",
content: "Du musst sicherstellen, dass du die Datenbank wirklich löschen möchtest.",
ephemeral: true,
});
}

const builds = await prisma.build.findMany();

if (builds.length === 0) {
return interaction.reply({
content: "The database is already empty.",
Expand All @@ -47,7 +47,7 @@ module.exports = {
});

interaction.reply({
content: "Done. Reason: " + reason
content: "BUILD-Tabelle geleert. Alle Punkte auf 0 zurückgesetzt. Reason: " + reason
});
}
};
4 changes: 2 additions & 2 deletions commands/createMessage.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
command: {
name: "createmsg",
description: "Creates a message for the leaderboard channel",
description: "Erzeugt eine Nachricht für den Leaderboard-Kanal",
},
run: async (client, interaction, prisma) => {
interaction.reply({
content: "Done.",
content: "Ok.",
ephemeral: true,
});
interaction.channel.send(
Expand Down
15 changes: 7 additions & 8 deletions commands/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ module.exports = {
options: [
{
name: "id",
description: "The ID of the build you want to delete.",
description: "Die ID des zu löschenden Builds.",
type: 4,
required: true,
},
{
name: "reason",
description: "The reason for deleting the build.",
description: "Der Grund für die Löschung des Builds.",
type: 3,
required: true,
},
Expand All @@ -29,7 +29,7 @@ module.exports = {
.then(async (build) => {
if (!build) {
await interaction.reply({
content: "This build does not exist!",
content: "Dieses Build existiert nicht!",
ephemeral: true,
});
} else {
Expand Down Expand Up @@ -64,14 +64,13 @@ module.exports = {
});
await interaction.reply({
content:
"Build deleted with reason: " +
"Build mit folgendem Grund gelöscht: " +
interaction.options.getString("reason"),
});
console.log(
new Date().toLocaleString(),
`Judge ${interaction.member.user.id} deleted build ${
build.id
} with reason: ${interaction.options.getString("reason")}`
`Judge ${interaction.member.user.id} hat build ${build.id
} mit folgendem Grund gelöscht: ${interaction.options.getString("reason")}`
);
});
} else {
Expand Down Expand Up @@ -110,7 +109,7 @@ module.exports = {
});
await interaction.reply({
content:
"Build deleted with reason: " +
"Build mit folgendem Grund gelöscht: " +
interaction.options.getString("reason"),
});
}
Expand Down
40 changes: 17 additions & 23 deletions commands/judge.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = {
command: {
name: "judge",
description: "Judge a build!",
description: "Bewerte ein Build!",
options: [
{
name: "id",
description: "The ID of the build you want to delete.",
description: "Die ID des zu beurteilenden Builds.",
type: 4,
required: true,
},
{
name: "details",
description: "Points for details",
description: "Punkte für Details",
type: 4,
choices: [
{ name: "1", value: 1 },
Expand Down Expand Up @@ -77,11 +77,10 @@ module.exports = {
},
});
if (!build) {
await interaction.reply("Build not found.");
await interaction.reply("Build nicht gefunden.");
} else {
if (build.judges.includes(interaction.member.user.id.toString())) {
//already judged this build
await interaction.reply("You already judged this build.");
await interaction.reply("Du hast dieses Build bereits bewertet.");
return;
}
const user = await prisma.user.findUnique({
Expand All @@ -106,7 +105,7 @@ module.exports = {
base_points: base_points,
},
});
await interaction.reply("Build judged");
await interaction.reply("Build bewertet. Du warst der 1. Judge. Deine Entscheidung für die Grundpunkte wurde übernommen.");
let embeds = [
{
title: `#${build.id.toString()}`,
Expand Down Expand Up @@ -137,13 +136,12 @@ module.exports = {
});
console.log(
new Date().toLocaleString(),
`Judge ${interaction.member.user.id} judged build ${
build.id
} as ${interaction.options.getInteger(
`Judge ${interaction.member.user.id} hat build ${build.id
} als ${interaction.options.getInteger(
"details"
)}/${interaction.options.getInteger(
"aufwand"
)}. Base_points: ${base_points}. 1/2 judges.`
)} bewertet. Grundpunkte: ${base_points}. 1/2 judges.`
);
return;
}
Expand Down Expand Up @@ -174,7 +172,7 @@ module.exports = {
},
});
interaction.reply(
"Build bewertet. Punkte wurden dem User gutgeschrieben. Du warst der 2. Judge. Somit wurde deine Entscheidung für base_points ignoriert."
"Build bewertet. Punkte wurden dem User gutgeschrieben. Du warst der 2. Judge. Somit wurde deine Entscheidung für die Grundpunkte ignoriert."
);
let embeds = [
{
Expand All @@ -188,13 +186,10 @@ module.exports = {
fields: [
{
name: "Bewertung",
value: `Details: ${
(build.A + interaction.options.getInteger("details")) / 2
}\nAufwand / Größe: ${
(build.B + interaction.options.getInteger("aufwand")) / 2
}\n Grundpunkte: ${
(build.base_points) ? "Ja" : "Nein"
}`,
value: `Details: ${(build.A + interaction.options.getInteger("details")) / 2
}\nAufwand / Größe: ${(build.B + interaction.options.getInteger("aufwand")) / 2
}\n Grundpunkte: ${(build.base_points) ? "Ja" : "Nein"
}`,
},
],
},
Expand Down Expand Up @@ -227,11 +222,10 @@ module.exports = {
});
console.log(
new Date().toLocaleString(),
`Judge ${interaction.member.user.id} judged build ${
build.id
} as ${interaction.options.getInteger(
`Judge ${interaction.member.user.id} hat build ${build.id
} alss ${interaction.options.getInteger(
"details"
)}/${interaction.options.getInteger("aufwand")}. 2/2 judges.`
)}/${interaction.options.getInteger("aufwand")} bewertet. 2/2 judges.`
);
return;
}
Expand Down
11 changes: 5 additions & 6 deletions commands/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
})
.then(async (user) => {
if (user) {
await interaction.reply({content: "Du bist bereits registriert.", ephemeral: true});
await interaction.reply({ content: "Du bist bereits registriert.", ephemeral: true });
} else {
prisma.user
.create({
Expand All @@ -31,18 +31,17 @@ module.exports = {
},
})
.then(async () => {
await interaction.reply({content: "Du wurdest erfolgreich registriert.", ephemeral: true});
await interaction.reply({ content: "Du wurdest erfolgreich registriert.", ephemeral: true });
console.log(
new Date().toLocaleString(),
`Registered ${interaction.member.user.tag} (${
interaction.member.user.id
`${interaction.member.user.tag} registriert (${interaction.member.user.id
}) as ${interaction.options.getString("minecraft")}`
);
})
.catch(async (e) => {
console.log(e);
console.log("Error while creating user.");
interaction.reply({content: "Du bist bereits registriert.", ephemeral: true});
console.log("Fehler beim Anlegen eines Benutzers.");
interaction.reply({ content: "Du bist bereits registriert.", ephemeral: true });
});
}
});
Expand Down
10 changes: 4 additions & 6 deletions event/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ module.exports = {
embeds.push({
url: "https://bte-germany.de",
image: {
url: `${process.env.CDN_URL}/${
process.env.CONTAINER_NAME
}/${user.id}/${uuid}.${filetype}`,
url: `${process.env.CDN_URL}/${process.env.CONTAINER_NAME
}/${user.id}/${uuid}.${filetype}`,
},
});
images.push(
`${process.env.CDN_URL}/${process.env.CONTAINER_NAME}/${
user.id
`${process.env.CDN_URL}/${process.env.CONTAINER_NAME}/${user.id
}/${uuid}.${filetype}`
);
}
Expand Down Expand Up @@ -124,7 +122,7 @@ module.exports = {
await args.delete();
console.log(
new Date().toLocaleString(),
`Created new build by ${dbUser.minecraft_id} with id ${obj.id}`
`Neuer Build erstellt von ${dbUser.minecraft_id} mit der ID ${obj.id}`
);
});
await prisma.user.update({
Expand Down
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ for (const file of eventFiles) {
if (event.once) {
console.log(
new Date().toLocaleString(),
`Registering event: ${event.name}`
`Event registriert: ${event.name}`
);
client.once(event.name, (...args) => event.execute(...args));
} else {
console.log(
new Date().toLocaleString(),
`Registering event: ${event.name}`
`Event registriert: ${event.name}`
);
client.on(event.name, (...args) => event.execute(...args));
}
Expand All @@ -52,7 +52,7 @@ client.once("ready", async () => {
.then(() =>
console.log(
new Date().toLocaleString(),
`Created command /${data.command.name}`
`Command registriert: /${data.command.name}`
)
)
.catch(console.error);
Expand All @@ -65,7 +65,7 @@ client.once("ready", async () => {
let data = require(`./schedule/${file}`);
console.log(
new Date().toLocaleString(),
`registering schedule: ${file} (${data.time}ms)`
`Schedule registriert: ${file} (${data.time}ms)`
);
setInterval(() => {
data.run(client, prisma);
Expand Down Expand Up @@ -94,7 +94,7 @@ client.on("interactionCreate", async (interaction) => {
} catch (error) {
console.error(error);
await interaction.reply({
content: "There was an error while executing this command!",
content: "Beim Registrieren dieses Befehls ist ein Fehler aufgetreten!",
ephemeral: true,
});
}
Expand All @@ -109,7 +109,7 @@ client.on("interactionCreate", async (interaction) => {
} catch (error) {
console.error(error);
await interaction.reply({
content: "There was an error while executing this button!",
content: "Beim Ausführen dieser Schaltfläche ist ein Fehler aufgetreten! ",
ephemeral: true,
});
}
Expand Down
2 changes: 1 addition & 1 deletion schedule/updateLeaderboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
time: 300000,
run: async (client, prisma) => {
console.log(new Date().toLocaleString(), "Updating leaderboard...");
console.log(new Date().toLocaleString(), "Leaderboard wird geupdated...");
let users = await prisma.user.findMany();
users = users.map((user) => {
return {
Expand Down

0 comments on commit a740dce

Please sign in to comment.