Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

tt-bot-dev/languages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

languages

This repository serves as a git submodule for tt.bot that serves the locale files without granting the translators the permissions to tamper with the main bot repository unknowingly.

Current languages

Language Native name English name Maintainers Fallback language
cs-CZ Čeština Czech @tt-bot-dev/cs-cz en
en English English @tt-bot-dev/maintainers none
ro-RO Română Romanian @tt-bot-dev/ro-ro en
sk-NR Slovenčina (Nitránske nárečí) Slovak (Nitránske nárečí) @TheMorc sk-SK
sk-SK Slovenčina Slovak @tt-bot-dev/sk-sk cs-CZ
trans NATIVE_LOCALE_NAME ENGLISH_LOCALE_NAME @TTtie none

Adding languages

So you want to add your native language, huh?

Prerequisites

  • Basic understanding of ES6 and newer
  • Basic understanding of how Discord works
  • Basic understanding of how to control your computer

How-to

  1. Make a copy of en.js and rename it appropriately. The format is xx-YY, where the xx stands for the language, and the YY stands for the region/dialect of the language.
  2. Translate the strings into your native language.
  3. Create a pull request.
  4. ???
  5. Profit - after approval, we will create a new team for your language and add you to the tt-bot-dev organization.

What is the context of the strings?

To see which strings are used in which places, switch your locale to trans.
This will switch you to a special locale that will show the term names instead of the actual strings. However, arguments are ignored and in some strings, you won't see what you want to see. If this is the case, go to tt.bot's repository and look for code similar to one of these:

await ctx.t("TERM_NAME", args, moreArgs)
await bot.i18n.getTranslation("TERM_NAME", "LOCALE", args, moreArgs)
await this.sosamba.getTranslation("TERM_NAME", "LOCALE", args, moreArgs);