NucleusBot is a cross-platform cloud-hosted stream bot. This repository serves as the home for its translations. One of our missions for NucleusBot is to provide the opportunity for streamers to entertain their audiences in their native language. This is done by providing the option for various translations within the bot.
If you believe that translation is invalid, or does not make sense in the context that was provided, feel free to open a new Issue. If you would like to make a contribution, feel free to make a new Pull Request.
Icon | Status |
---|---|
Completed | |
Needs to be updated, or may need revision | |
May not need to be included | |
Missing |
NucleusBot uses ".properties" files to parse and store text at startup. Each property is stored with a defined "key", which is used to fetch the necessary value when needed, as so:
key = Value
Each key is provided in lowercase-snakecase. Values can be provided in any casing needed. Please refer to the "English" files provided for examples.
In some cases a key may contain one of more period ".
" in the case of subsets.
parent.keyA = ValueA
parent.keyB = ValueB
Keys that end with a "[]
" are ARRAYs. These keys support multiple Values that are separated by a semi-colon ";
"
key[] = Value1;Value2
ArrayValues can be split into multiple lines by escaping the newline using a backslash "\
"
New lines may also be indented to avoid being confused with new keys. Values are trimmed of any preceding or succeeding spaces.
key[] = Value1;\
Value2;\
Value3
A "Value" may also contain other Keys within them by using curly brackets {}
like so {key2}
.
This is called "Embedding" which includes another language value in the current one.
key1 = World
key2 = Hello {key1}
"key2" as shown above would display "Hello World".
Keys from a separate language file may be used by including that files name within the brackets, separated by a colon ":", {file_name:key}
.
key = {example:key}
Embedded keys may also include a value from an array. Including an ArrayValue will pick one of the values from the array at RANDOM when ran.
key1 = {key_array[]}
key2 = {example:key_array[]}
The "Website" section of the translations may make use of inline-links, where links may occur in the middle of sections of text.
To handle inline-links the translation properties makes use of embedded "references" within Values. A reference is surrounded with square brackets "[]" and consists of a reference and text separated by a colon ":", [reference:The Translation]
The left-side of the reference will always be the same across all files as this is the actual reference to the link to use, the right-side will be the translation to be contained within the link.
[tos:Terms of Service]
may become <a href="/terms">Terms of Service</a>
, or [tos:Your Text Here]
to <a href="/terms">Your Text Here</a>
The "Value" for each key may contain a "Variable" which will be added to the Value at runtime, and may include usernames, numeric values, or otherwise.
Variables are set as follows
%s
- Represents a string, Can be a username, rank, or parsed numeric value (1,000)
%d
- Represents an integer/digit. Can be a representative length of time, or other value
%1$
- The n^th provided variable, "%n$", if order of variables needs to be repeated or changed.
%n$s
- Represents the n^th variable as a string. Replace "n" with a digit
%n$d
- Represents the n^th variable as an integer/digit. Replace "n" with a digit
The number of Variables in the "Value" MUST be equal to the number of Variables as provided in the "English" examples. Failure to do so may cause errors while the bot is running. The "Empty" folder provided may be copied or overwritten to compensate for a new set of Language files.