From 5654a40183d9c7c2d2933157a7d2fe757dc8bdcc Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 25 Oct 2024 17:04:27 +0200 Subject: [PATCH] Update extract_locales usage --- base/tools/extract_locales.js | 7 +++---- readme.md | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/base/tools/extract_locales.js b/base/tools/extract_locales.js index e4a7aab8c..108afb8d5 100644 --- a/base/tools/extract_locales.js +++ b/base/tools/extract_locales.js @@ -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=` -// `../../armorcore/make --js extract_locales.js` +// `../../armorcore/make --js extract_locales.js ` // Generates a `base/assets/locale/.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(); } diff --git a/readme.md b/readme.md index 4ff498cc2..edaabf266 100644 --- a/readme.md +++ b/readme.md @@ -10,8 +10,7 @@ armortools **Generating a locale file** ```bash -export ARM_LOCALE= -./armorcore/make --js base/tools/extract_locales.js +./armorcore/make --js base/tools/extract_locales.js # Generates a `base/assets/locale/.json` file ```