Skip to content

Commit

Permalink
chore: Simplify /howto response strings
Browse files Browse the repository at this point in the history
  • Loading branch information
AverageHelper committed Feb 15, 2024
1 parent 3a6a003 commit 6a1fe2a
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 13 deletions.
14 changes: 8 additions & 6 deletions src/commands/howto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GuildedCommand } from "./Command.js";
import { composed, createPartialString, push, pushNewLine } from "../helpers/composeStrings.js";
import { getCommandPrefix } from "../useGuildStorage.js";
import { localizations, ti } from "../i18n.js";
import { localizations, t, ti } from "../i18n.js";
import { mentionCommand } from "../helpers/mentionCommands.js";
import { supportedPlatformsList } from "../constants/repository.js";

Expand All @@ -26,18 +26,20 @@ export const howto: GuildedCommand = {
const exampleQuery = "https://youtu.be/dQw4w9WgXcQ"; // :P

const srMention = mentionCommand(sr, guild, COMMAND_PREFIX);
push(ti("commands.howto.responses.to-submit", { command: srMention }, guildLocale), msg);
pushNewLine(msg);
pushNewLine(msg);
push(
ti(
"commands.howto.responses.to-submit",
{
command: srMention,
example: `\`/${srCommandName} ${exampleQuery}\``
},
"commands.howto.responses.example",
{ example: `\`/${srCommandName} ${exampleQuery}\`` },
guildLocale
),
msg
);
pushNewLine(msg);
push(t("commands.howto.responses.will-confirm", guildLocale), msg);
pushNewLine(msg);

const supportedPlatforms =
type === "interaction"
Expand Down
4 changes: 3 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Drucken Sie Anweisungen zur Verwendung der allgemeinen Warteschlangenbefehle.",
"name": "wieman",
"responses": {
"to-submit": "Um einen Song einzureichen, verwenden Sie {command}\n\nZum Beispiel: {example}\nIch werde mit einer Bestätigung antworten, dass Ihr Song zur Warteschlange hinzugefügt wurde!",
"to-submit": "Um einen Song einzureichen, verwenden Sie {command}",
"example": "Zum Beispiel: {example}",
"will-confirm": "Ich werde mit einer Bestätigung antworten, dass Ihr Song zur Warteschlange hinzugefügt wurde!",
"see-supported-platforms": "Sehen [Sie sich unsere Liste der unterstützten Plattformen an]({url}).",
"see-supported-platforms-at-url": "Sehen Sie sich unsere Liste der unterstützten Plattformen unter {url} an.",
"to-get-current-song": "Um einen Link zum aktuellen Song zu erhalten, verwenden Sie {command}."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Print instructions for using the common queue commands.",
"name": "howto",
"responses": {
"to-submit": "To submit a song, use {command}\n\nFor example: {example}\nI will respond with confirmation that your song has joined the queue!",
"to-submit": "To submit a song, use {command}",
"example": "For example: {example}",
"will-confirm": "I will respond with confirmation that your song has joined the queue!",
"see-supported-platforms": "See [our list of supported platforms]({url}).",
"see-supported-platforms-at-url": "See our list of supported platforms at {url}.",
"to-get-current-song": "To get a link to the current song, use {command}."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Print instructions for using the common queue commands.",
"name": "howto",
"responses": {
"to-submit": "To submit a song, use {command}\n\nFor example: {example}\nI will respond with confirmation that your song has joined the queue!",
"to-submit": "To submit a song, use {command}",
"example": "For example: {example}",
"will-confirm": "I will respond with confirmation that your song has joined the queue!",
"see-supported-platforms": "See [our list of supported platforms]({url}).",
"see-supported-platforms-at-url": "See our list of supported platforms at {url}.",
"to-get-current-song": "To get a link to the current song, use {command}."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Imprima instrucciones para usar los comandos de cola comunes.",
"name": "cómo",
"responses": {
"to-submit": "Para enviar una canción, use {command}\n\nPor ejemplo: {example}\n¡Responderé con una confirmación indicando que tu canción se ha unido a la cola!",
"to-submit": "Para enviar una canción, use {command}",
"example": "Por ejemplo: {example}",
"will-confirm": "¡Responderé con una confirmación indicando que tu canción se ha unido a la cola!",
"see-supported-platforms": "Vea [nuestra lista de plataformas compatibles]({url}).",
"see-supported-platforms-at-url": "Consulte nuestra lista de plataformas compatibles en {url}.",
"to-get-current-song": "Para obtener un enlace a la canción actual, use {command}."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Imprime les instructions d'utilisation des commandes de la file d'attente courante.",
"name": "comment",
"responses": {
"to-submit": "Pour soumettre une chanson, utilisez {command}\n\nPar exemple: {example}\nJe vous répondrai avec une confirmation indiquant que votre chanson a rejoint la file d'attente!",
"to-submit": "Pour soumettre une chanson, utilisez {command}",
"example": "Par exemple: {example}",
"will-confirm": "Je vous répondrai avec une confirmation indiquant que votre chanson a rejoint la file d'attente!",
"see-supported-platforms": "Consultez [notre liste de plateformes prises en charge]({url}).",
"see-supported-platforms-at-url": "Consultez notre liste des plates-formes prises en charge sur {url}.",
"to-get-current-song": "Pour obtenir un lien vers la chanson actuelle, utilisez {command}."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Kiír utasításokat a gyakori parancsok használatához.",
"name": "hogyankell",
"responses": {
"to-submit": "Dal beküldéséhez használja a {command} parancsot\n\nPéldául: {example}\nJelezni fogom, amint sikeresen hozzáadtam a dalt a sorhoz!",
"to-submit": "Dal beküldéséhez használja a {command} parancsot",
"example": "Például: {example}",
"will-confirm": "Jelezni fogom, amint sikeresen hozzáadtam a dalt a sorhoz!",
"see-supported-platforms": "Tekintse meg [a támogatott platformok listáját]({url}).",
"see-supported-platforms-at-url": "Tekintse meg a támogatott platformok listáját a {url} címen.",
"to-get-current-song": "Az aktuális dal hivatkozásának lekéréséhez használja a {command} parancsot."
Expand Down
4 changes: 3 additions & 1 deletion src/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"description": "Imprima instruções para usar os comandos de fila comum.",
"name": "como",
"responses": {
"to-submit": "Para enviar uma música, use {command}\n\nPor exemplo: {example}\nResponderei com uma confirmação indicando que sua música entrou na fila!",
"to-submit": "Para enviar uma música, use {command}",
"example": "Por exemplo: {example}",
"will-confirm": "Responderei com uma confirmação indicando que sua música entrou na fila!",
"see-supported-platforms": "Veja [nossa lista de plataformas suportadas]({url}).",
"see-supported-platforms-at-url": "Veja nossa lista de plataformas suportadas em {url}.",
"to-get-current-song": "Para obter um link para a música atual, use {command}."
Expand Down

0 comments on commit 6a1fe2a

Please sign in to comment.