Skip to content

Commit

Permalink
Update extract_locales usage
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Oct 25, 2024
1 parent e8fe04f commit 5654a40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions base/tools/extract_locales.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// Extracts localizable strings from a set of source files and writes them to JSON files.
// This script can create new translations or update existing ones.
// Usage:
// `export ARM_LOCALE=<locale code>`
// `../../armorcore/make --js extract_locales.js`
// `../../armorcore/make --js extract_locales.js <locale code>`
// Generates a `base/assets/locale/<locale code>.json` file

let locale = std.getenv("ARM_LOCALE");
let locale = scriptArgs[4];

if (!locale) {
console.log("ARM_LOCALE env variable not set!");
console.log("Locale code not set!");
std.exit();
}

Expand Down
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ armortools

**Generating a locale file**
```bash
export ARM_LOCALE=<locale code>
./armorcore/make --js base/tools/extract_locales.js
./armorcore/make --js base/tools/extract_locales.js <locale code>
# Generates a `base/assets/locale/<locale code>.json` file
```

Expand Down

0 comments on commit 5654a40

Please sign in to comment.