Skip to content

Commit

Permalink
feat: indonesia locale (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi authored Aug 7, 2023
1 parent f369521 commit 037cb3d
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Languages/en-id/Commands/Configuration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { inlineCode } from "@discordjs/builders";
import { Emoji } from "@nezuchan/constants";
import { stripIndents } from "common-tags";
import { EnUsCommandsConfiguration } from "../../en-us/Commands/Configuration.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/commands/configuration"
})

export class EnIDCommandsConfiguration extends EnUsCommandsConfiguration {
public DJ_ALREADY_ADDED = (): string => "User atau role ini sudah di tambahkan.";
public DJ_NOT_USER = (): string => "Kamu harus memberi user yang valid.";
public LOCALES_CURRENT = (locale: string): string => `Lokal saat ini disetel ke ${inlineCode(locale)}.`;
public LOCALES_INVALID = (): string => "Anda harus memberikan lokal yang valid.";
public LOCALES_UPDATED = (locale: string): string => `Lokal telah diperbarui ke ${inlineCode(locale)}.`;
public VOLUME = (volume: number | string): string => `Konfigurasi volume default telah diatur ke ${inlineCode(String(volume))}.`;
public VOLUME_VIEW = (volume: number | string): string => `Konfigurasi volume default diatur ke ${inlineCode(String(volume))}.`;
public LIMIT_REACHED = (limit: number | string): string => `Anda telah mencapai batas ${inlineCode(String(limit))} konfigurasi.`;
public ENABLED = (config: string): string => `Konfigurasi ${inlineCode(config)} telah di aktifkan.`;
public DISABLED = (config: string): string => `Konfigurasi ${inlineCode(config)} telah di matikan.`;
public VIEW = (config: string, state: boolean): string => `Konfigurasi ${inlineCode(config)} di ${state ? "aktifkan" : "matikan"}.`;

public DJ = (users: string[], roles: string []): string => stripIndents`
${Emoji.Ok} | Memperbarui konfigurasi DJ.
DJ Users: ${users.length ? users.join(", ") : "none"}
DJ Roles: ${roles.length ? roles.join(", ") : "none"}
`;

public DJ_VIEW = (users: string[], roles: string [], state: boolean): string => stripIndents`
${state ? Emoji.Ok : Emoji.No} | Konfigurasi DJ di ${state ? "aktifkan" : "matikan"}.
DJ Users: ${users.length ? users.join(", ") : "none"}
DJ Roles: ${roles.length ? roles.join(", ") : "none"}
`;

public LIMIT = (limit: number | string): string => `Anda hanya diizinkan untuk menambahkan ${inlineCode(String(limit))} konfigurasi.`;
public INVALID = (): string => "Anda harus memberikan konfigurasi yang valid.";
}
43 changes: 43 additions & 0 deletions src/Languages/en-id/Commands/Music.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { bold, inlineCode } from "@discordjs/builders";
import { User } from "@nezuchan/core";
import { EnUsCommandsMusic } from "../../en-us/Commands/Music.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/commands/music"
})

export class EnIDCommandsMusic extends EnUsCommandsMusic {
public CURRENT_TRACK = (): string => "Trek saat ini";
public CLEAR = (): string => "Menghapus antrian.";
public DISCONNECT = (): string => "Terputus dari saluran suara, terima kasih telah mendengarkan!";
public JOIN_CHANNEL = (channel: string): string => `Bergabung dengan saluran suara ${channel}`;
public LOOP = (type: string): string => `Sekarang berputar secara \`${type}\``;
public NOW_PLAYING_EMPTY = (): string => "Tidak ada yang diputar saat ini.";
public NOW_PLAYING = (title: string, author: User | string, duration?: number | string): string => `Sekarang Memutar: [${inlineCode(title)}] (${author instanceof User ? `<@${author.id}>` : `<@${author}>`}) ${duration ? `[${duration}]` : ""}`;
public PAUSE = (): string => "Trek di jeda.";
public RESUME = (): string => "Trek di lanjutkan.";
public PLAY_NO_QUERY = (): string => "Anda harus memberikan kueri untuk dicari.";
public PLAY_NO_RESULTS = (): string => "Tidak ada hasil yang ditemukan.";
public NON_SUPPORTED_PLATFORMS = (): string => "Ini bukan platform yang didukung, silakan coba yang lain.";
public QUEUE_TRACK_LIMIT_REACHED = (max: number | string): string => `Anda telah mencapai jumlah trek maksimum dalam antrean. (${bold(String(max))})`;
public PLAYLIST_LOADED = (title: string, tracks: number | string): string => `Daftar putar dimuat [${inlineCode(title)}] dengan ${tracks} trek.`;
public TRACK_SKIPPED = (tracks: number | string, max: number | string): string => `Melewati ${bold(String(tracks))} trek. karena terlalu banyak. ${bold(String(max))}`;
public TRACK_LOADED = (title: string, author: User | string, duration?: number | string): string => `Memuat lagu [${inlineCode(title)}] (${author instanceof User ? `<@${author.id}>` : `<@${author}>`}) ${duration ? `[${duration}]` : ""}`;
public PREVIOUS_TRACK_NOT_FOUND = (): string => "There is no previous track.";
public PREVIOUS_TRACK = (title: string, author: User | string, duration?: number | string): string => `Sekarang memutar lagu sebelumnya: [${inlineCode(title)}] (${author instanceof User ? `<@${author.id}>` : `<@${author}>`}) ${duration ? `[${duration}]` : ""}`;
public REMOVED_TRACK = (title: string, author: User | string, duration?: number | string): string => `Trek dihapus: [${inlineCode(title)}] (${author instanceof User ? `<@${author.id}>` : `<@${author}>`}) ${duration ? `${duration ? `[${duration}]` : ""}` : ""}`;
public REPLAY = (): string => "Memutar ulang trek.";
public SHUFFLE = (): string => "Antrian telah di acak.";
public SKIP = (): string => "Melewati trek.";
public STOP = (): string => "Menghentikan trek saat ini dan menghapus antrean.";
public CHANGE_VOLUME = (volume: number | string): string => `Volume diubah menjadi ${volume}%`;
public VOLUME = (volume: number | string): string => `Volume saat ini adalah ${volume}%`;
public CHOOSE_TRACK = (): string => "Pilih trek antara 1 dan 25, Anda memiliki 20 detik untuk memilih trek";
public NO_CHOOSE_INPUT = (): string => "Tidak ada trek yang dipilih, pilihan dibatalkan.";
public LOADED_TRACKS = (tracks: number | string): string => `Memuat ${tracks} trek.`;
public CHANGED_FILTERS = (filter: string): string => `Filter diubah menjadi ${inlineCode(filter)}`;
public DISABLED_FILTERS = (): string => "Filter dinonaktifkan.";
public MOVE_TRACK = (title: string, from: number | string, to: number | string): string => `Memindahkan ${inlineCode(title)} dari posisi ${inlineCode(String(from))} ke posisi ${inlineCode(String(to))}`;
}
29 changes: 29 additions & 0 deletions src/Languages/en-id/Commands/Playlist.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { inlineCode } from "@discordjs/builders";
import { EnUsCommandsPlaylist } from "../../en-us/Commands/Playlist.js";

@ApplyOptions<LanguageOptions>({
name: "en-*ID/commands/playlist"
})

export class EnIDCommandsPlaylist extends EnUsCommandsPlaylist {
public INVALID_IDENTIFIER = (): string => "Anda harus memberikan daftar putar yang valid.";
public INVALID_TRACK_IDENTIFIER = (): string => "Anda harus memberikan trek yang valid.";
public INVALID_NAME = (): string => "Nama daftar putar hanya di izinkan huruf, angka, garis bawah, string. dan tidak boleh lebih dari 15 karakter";
public NOT_FOUND = (identifier: string): string => `Daftar putar ${inlineCode(identifier)} tidak di temukan.`;
public TRACK_NOT_FOUND = (identifier: string): string => `Trek ${inlineCode(identifier)} tidak di temukan.`;
public LIMIT_REACHED = (limit: number | string): string => `Anda telah mencapai batas ${inlineCode(String(limit))} daftar putar.`;
public TRACKS_LIMIT_REACHED = (limit: number | string): string => `Anda telah mencapai batas ${inlineCode(String(limit))} trek.`;
public ADDED_TRACKS = (tracks: number | string): string => `Menambahkan ${tracks} trek ke dalam daftar putar.`;
public TRACKS_SKIPPED = (amount: number | string, limit: number | string): string => `Melewati ${inlineCode(String(amount))} trek karena Anda telah mencapai batas ${inlineCode(String(limit))} trek, pertimbangkan untuk menghapus beberapa trek atau membeli premium untuk meningkatkan batas`;
public CREATED = (name: string): string => `Daftar putar ${inlineCode(name)} telah di buat.`;
public DELETED = (name: string): string => `Daftar putar ${inlineCode(name)} telah di hapus.`;
public DELETED_TRACK = (identifier: string): string => `Trek ${inlineCode(identifier)} telah di hapus.`;
public EXISTS = (name: string): string => `Daftar putar ${inlineCode(name)} sudah pernah dibuat.`;
public EXTEND_TRACK_LIMIT = (playlist: string, limit: number | string): string => `Anda telah memperluas daftar putar Anda ${inlineCode(playlist)} batas trek ke ${inlineCode(String(limit))}.`;
public SUBTRACT_TRACK_LIMIT = (playlist: string, amount: number | string): string => `Anda telah mengurangi ${inlineCode(String(amount))} trek dari batas trek ${inlineCode(playlist)} playlist Anda.`;
public LOADED_PLAYLIST = (name: string, tracks: number | string): string => `Daftar putar ${inlineCode(name)} dimuat dengan ${inlineCode(String(tracks))} trek.`;
public EMPTY = (): string => "Daftar putar ini kosong.";
public HAS_NO_PLAYLIST = (): string => "Anda tidak memiliki daftar putar apa pun.";
}
16 changes: 16 additions & 0 deletions src/Languages/en-id/Commands/Premium.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { EnUsCommandsPremium } from "../../en-us/Commands/Premium.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/commands/premium"
})

export class EnIDCommandsPremium extends EnUsCommandsPremium {
public HAS_NO_ACTIVATED_SERVER = (): string => "Anda tidak memiliki server yang diaktifkan.";
public DEACTIVATED = (guild: string): string => `Premium dinonaktifkan di ${guild}.`;
public ACTIVATED = (guild: string, tier: string): string => `Premium diaktifkan di ${guild}. Tingkat: ${tier}`;
public ALREADY_ACTIVATED = (guild: string): string => `Premium sudah diaktifkan di ${guild}.`;
public ALREADY_DEACTIVATED = (guild: string): string => `Premium sudah dinonaktifkan di ${guild}.`;
public DOESNT_MEET_REQUIREMENT = (): string => "Anda tidak memiliki persyaratan yang dipenuhi untuk mengaktifkan guild ini.";
}
13 changes: 13 additions & 0 deletions src/Languages/en-id/Commands/Utility.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { inlineCode } from "@discordjs/builders";
import { EnUsCommandsUtility } from "../../en-us/Commands/Utility.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/commands/utility"
})

export class EnIDCommandsUtility extends EnUsCommandsUtility {
public PING_SUCCESS = (): string => "Pong!";
public PING_SUCCRSS_LATENCY = (latency: number): string => `Pong! Butuh waktu ${inlineCode(String(latency))}ms untuk merespons.`;
}
33 changes: 33 additions & 0 deletions src/Languages/en-id/Commands/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { LanguageOptions, LanguagePiece } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { EnIDCommandsConfiguration } from "./Configuration.js";
import { EnIDCommandsPlaylist } from "./Playlist.js";
import { EnIDCommandsPremium } from "./Premium.js";
import { EnIDCommandsUtility } from "./Utility.js";
import { EnIDCommandsMusic } from "./Music.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/commands"
})

export class EnIDCommands extends LanguagePiece {
public get utility(): EnIDCommandsUtility {
return this.container.stores.get("languages").get("en-ID/commands/utility") as EnIDCommandsUtility;
}

public get mIDic(): EnIDCommandsMusic {
return this.container.stores.get("languages").get("en-ID/commands/music") as EnIDCommandsMusic;
}

public get configuration(): EnIDCommandsConfiguration {
return this.container.stores.get("languages").get("en-ID/commands/configuration") as EnIDCommandsConfiguration;
}

public get playlist(): EnIDCommandsPlaylist {
return this.container.stores.get("languages").get("en-ID/commands/playlist") as EnIDCommandsPlaylist;
}

public get premium(): EnIDCommandsPremium {
return this.container.stores.get("languages").get("en-ID/commands/premium") as EnIDCommandsPremium;
}
}
17 changes: 17 additions & 0 deletions src/Languages/en-id/InteractionHandlers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { User } from "@nezuchan/core";
import { EnUsInteractionHandlers } from "../../en-us/InteractionHandlers/index.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/interaction-handlers"
})

export class EnIDInteractionHandlers extends EnUsInteractionHandlers {
public AUDIO_BACK_BUTTON = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Kamu menekan tombol kembali. trek sebelumnya dalam urutan antrean akan diputar`;
public NO_BACK_TRACK = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Tidak ada trek sebelumnya dalam urutan antrian`;
public AUDIO_PAUSE_BUTTON = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Kamu menekan tombol jeda. trek akan dijeda`;
public AUDIO_RESUME_BUTTON = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Kamu menekan tombol lanjut. trek akan dilanjutkan`;
public AUDIO_NEXT_BUTTON = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Kamu menekan tombol berikutnya. trek akan dilewati`;
public AUDIO_STOP_BUTTON = (author: User | string): string => `${author instanceof User ? `<@${author.id}>` : `<@${author}>`}, Kamu menekan tombol berhenti. trek akan dihentikan dan antrian akan dibersihkan`;
}
16 changes: 16 additions & 0 deletions src/Languages/en-id/Player/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { User } from "@nezuchan/core";
import { inlineCode } from "@discordjs/builders";
import { EnUsPlayer } from "../../en-us/Player/index.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/player"
})

export class EnIDPlayer extends EnUsPlayer {
public TRACK_START = (title: string, author: User | string): string => `Sekarang Memutar: ${inlineCode(title)} [${author instanceof User ? `<@${author.id}>` : `<@${author}>`}]`;
public QUEUE_END = (): string => "Antrian telah selesai, Tolong mengajukan lagu untuk diputar";
public TRACK_EXCEPTION = (): string => "Terjadi kesalahan saat memutar trek, menghentikan antrean. terlalu banyak kesalahan yang terjadi berturut-turut";
public PLAYER_TIMEOUT = (): string => "Aky sudah tidak aktif selama 3 menit, pemutar musik akan dimatikan.";
}
14 changes: 14 additions & 0 deletions src/Languages/en-id/Preconditions/Music.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { LanguageOptions, LanguagePiece } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";

@ApplyOptions<LanguageOptions>({
name: "en-ID/preconditions/music"
})

export class EnIDPreconditionsMusic extends LanguagePiece {
public NOT_ON_SAME_VOICE = (): string => "Kamu harus berada di kanal yang sama dengan ku, untuk melanjutkan aksi ini.";
public NOT_ON_VOICE = (): string => "Kamu harus berada di kanal, untuk melanjutkan aksi ini.";
public QUEUE_NOT_AVAILABLE = (): string => "Kamu belum memasukan antrian.";
public NOT_DJ = (): string => "Kamu harus seorang DJ, untuk melanjutkan aksi ini.";
public CANT_CONNECT_VOICE = (permissions: string[]): string => `Aku tidak bisa terhubung dengan kanal audio mu karena tidak mempunyain ijin ${permissions.join(", ")}`;
}
19 changes: 19 additions & 0 deletions src/Languages/en-id/Preconditions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { EnIDPreconditionsMusic } from "./Music.js";
import { inlineCode } from "@discordjs/builders";
import { EnUsPreconditions } from "../../en-us/Preconditions/index.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/preconditions"
})

export class EnIDPreconditions extends EnUsPreconditions {
public get music(): EnIDPreconditionsMusic {
return this.container.stores.get("languages").get("en-ID/preconditions/music") as EnIDPreconditionsMusic;
}

public WAIT_FOR_VOTE = (time: number | string): string => `Kamu mempunyai waktu ${inlineCode(String(time))} detik untuk vote bot https://top.gg/bot/616169470293049344/vote atau membeli premium untuk melewati ini`;
public NOT_VOTED = (): string => "Untuk menggunakan perintah ini kamu harus vote untuk bot https://top.gg/bot/616169470293049344/vote atau membeli premium untuk melewati ini";
public NOT_PREMIUM = (): string => "Untuk menggunakan perintah ini kamu harus premium";
}
21 changes: 21 additions & 0 deletions src/Languages/en-id/Utility/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { inlineCode } from "@discordjs/builders";
import { EnUsUtility } from "../../en-us/Utility/index.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID/utility"
})

export class EnIDUtility extends EnUsUtility {
public ENABLED = (): string => "diaktifkan";
public DISABLED = (): string => "tidak aktif";
public INVALID_INDEX = (): string => "Kamu harus memberikan urutan yang benar.";
public INVALID_RANGE = (min: number | string, max: number | string): string => `Kamu harus memberikan urutan yang benar. antara ${inlineCode(String(min))} sampai ${inlineCode(String(max))}.`;
public MESSAGE_COMMANDS_NOT_SUPPORTED = (): string => "Perintah message belum support saat ini !";
public SUB_COMMAND_NOT_FOUND = (subCommand: string): string => `Sub perintah \`${subCommand}\` tidak di temukan.`;
public PREFIX_FOR_THIS_GUILD = (prefix: string): string => `Awalan untuk guild ini adalah \`${prefix}\``;
public PREFIX_TOO_LONG = (): string => "Awalan tidak bisa lebih dari 10 kata.";
public PREFIX_TOO_SHORT = (): string => "Awalan tidak bisa kurang dari 1 kata.";
public PREFIX_CHANGED = (prefix: string): string => `Awalan di ganti ke \`${prefix}\``;
}
34 changes: 34 additions & 0 deletions src/Languages/en-id/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { LanguageOptions } from "@nezuchan/i18n";
import { ApplyOptions } from "@nezuchan/decorators";
import { EnUsCommands } from "../en-us/Commands";
import { EnUsInteractionHandlers } from "../en-us/InteractionHandlers";
import { EnUsPlayer } from "../en-us/Player";
import { EnUsPreconditions } from "../en-us/Preconditions";
import { EnUsUtility } from "../en-us/Utility";
import { EnUs } from "../en-us/index.js";

@ApplyOptions<LanguageOptions>({
name: "en-ID"
})

export class EnID extends EnUs {
public get utility(): EnUsUtility {
return this.container.stores.get("languages").get("en-ID/utility") as EnUsUtility;
}

public get interactionHandlers(): EnUsInteractionHandlers {
return this.container.stores.get("languages").get("en-US/interaction-handlers") as EnUsInteractionHandlers;
}

public get commands(): EnUsCommands {
return this.container.stores.get("languages").get("en-US/commands") as EnUsCommands;
}

public get preconditions(): EnUsPreconditions {
return this.container.stores.get("languages").get("en-US/preconditions") as EnUsPreconditions;
}

public get player(): EnUsPlayer {
return this.container.stores.get("languages").get("en-US/player") as EnUsPlayer;
}
}

0 comments on commit 037cb3d

Please sign in to comment.