| Crates.io | weblate-luau |
| lib.rs | weblate-luau |
| version | 0.1.0 |
| created_at | 2025-09-22 17:32:48.734779+00 |
| updated_at | 2025-09-22 17:32:48.734779+00 |
| description | Generates a Luau table for weblate translations that are represented in basic JSON |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1850428 |
| size | 27,665 |
This tool is intended to translate simple JSON weblate translation files as described
by Weblate Documentation into Lua(u) objects. The output
is valid in both Lua and Luau languages and is intended for use in Warsaw Revamped scripts alongside the
localization package.
Generates a Luau table for weblate translations that are represented in basic JSON.
Usage: weblate-lua <ROOT> <OUTPUT>
Arguments:
<ROOT> The root path of the localization folder
<OUTPUT> The path to the output file
Options:
-h, --help Print help
-V, --version Print version
Only languages supported by Battlefield 4 are supported. This includes:
| Language | Frostbite Code | Additional Codes |
|---|---|---|
| English | en |
en_US, en_GB |
| French | fr |
fr_FR, fr_CA |
| Italian | it |
it_IT |
| German | de |
de_DE |
| Spanish - Spain | es |
es_ES |
| Czech | cs |
cs_CZ |
| Korean | ko |
ko_KR |
| Polish | pl |
pl_PL |
| Portuguese - Brazil | br |
pt, pt_BR, pt_PT |
| Russian | ru |
ru_RU |
| Chinese - Traditional | zh |
zh_ZH, zh_TW |
| Japanese | ja |
ja_JP |
The tool collects translations in order of:
{frostbite_code}.json{frostbite_code}{additional_code-n}.json{additional_code-n}Nested translations are handled by forming a complete path separated by periods. For example, the following:
{
"a": {
"b": {
"c": {
"en": "string"
}
}
}
}
will be converted to:
{
["a.b.c"] = {
en = "string"
},
}