Translation Guide
Guide on how to translate Friend Time.
Last updated
Guide on how to translate Friend Time.
Last updated
Friend Time stores language data in JSON files. JSON is a format for storing data in an easy to read way. You may be familiar with similar data formats such as YAML (YML).
Example JSON File:
If you are not familiar with JSON you can still provide a translation, however you must be aware of which parts of JSON are translatable, and which are not. In the above example the parts in blue are called "keys", and should be left alone. While the parts in orange are called "values", which can be translated.
It is also recommended to have a text editor that supports JSON, so that you can get pretty coloring like the example above, thus making it easier to read.
Recommended Text Editors with JSON Support:
The following should NOT be changed:
JSON Keys and Structure
See the above section for more information.
Variables
Look like this{{MY_VARIABLE}}
These will end up getting filled in by the bot.
References
Look like this {{REF:my.reference}}
It's important to understand how these work for translations.
Anytime you see a REF, it will end up getting filled in with whatever text it points to in the refs
section of the language file.
For example {{REF:bot.name}}
will get filled in with whatever text is in refs.bot.name
("Friend Time").
Markdown Formatting
These are special character that provide:
bold (**)
italic (*)
underline (__)
code (`)
link [This is a link](http://google.com/)
See here for more information about markdown.
Colors
Look like this: #0099ff
Emojis
Links
Bot Name
In addition to the above, the following should be kept as similar as possible unless inappropriate for the language:
Capitalization
Punctuation
Spacing
Order of Sentences
Translate regular text, commands, settings, etc. Anything that is not part of the above list of items to leave alone.
There are a few fields which have special cases:
ref.meta.language
Should be an ISO 639-1 language code.
ref.meta.locale
Should be the same as ref.meta.language
.
ref.meta.translators
Provide your discord tag here and a link to a profile or social media of your choice.
regexes.meta.language
Should include:
The language code from ref.meta.language
The language name from ref.meta.languageDisplay
You may notice the regexes
section of the translation file looks a little odd. Each value in the regex section should look something like this:
/\b(find|f|lookup|search)\b/i
You can essentially ignore everything except for this part:
find|f|lookup|search
Which is just a list of words the user can type in place of a certain command, separated by tall lines (|).
When translating the regexes
section, just focus on translating these words and adding or removing words from the list as you see necessary.