Files
web/scripts/generate-language-list.js
T
Mcat12 37c9e6a487 Move language list generation out of update-translations.js
Also moved the scripts into a new scripts folder.

The language list generation is independent of the parsing we do for
POEditor. This also makes it easier to move to a different translation
service while keeping the languages.json generation.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-01-21 16:21:14 -08:00

18 lines
609 B
JavaScript

/* Pi-hole: A black hole for Internet advertisements
* (c) 2019 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
*
* Web Interface
* Update languages.json with the current languages
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
const fs = require("fs-extra");
// Get the available languages
const languages = fs.readdirSync("public/i18n");
// Save the language list so the web interface knows what's available
fs.outputFileSync("src/languages.json", JSON.stringify(languages));