Stop commiting built lang files
This commit is contained in:
parent
1332f9f38a
commit
804f744fb3
|
@ -1,2 +1,3 @@
|
||||||
/server/games.backup.json
|
/server/games.backup.json
|
||||||
/public/config.js
|
/public/config.js
|
||||||
|
/public/l10n
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -13,15 +13,17 @@ endif
|
||||||
all: lang
|
all: lang
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo make lang: build translation files
|
@echo make lang: build the translation files
|
||||||
@echo make eslint: use ESLint to check code standard conformence
|
@echo make eslint: use ESLint to check conformance against the coding style
|
||||||
@echo make start-dev-server: start a development server
|
@echo make start-dev-server: start a development server
|
||||||
|
|
||||||
lang:
|
public/l10n/js/fr.js: $(wildcard l10n/po/*/*.po)
|
||||||
cd l10n; make
|
cd l10n; make
|
||||||
|
|
||||||
|
lang: public/l10n/js/fr.js
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
-${ESLINT} **/*.js
|
-${ESLINT} **/*.js
|
||||||
|
|
||||||
start-dev-server:
|
start-dev-server: lang
|
||||||
cd server && make start-dev-server
|
cd server && make start-dev-server
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
make
|
||||||
|
|
||||||
exec "$(dirname "$0")/disable-const-let.sh"
|
exec "$(dirname "$0")/disable-const-let.sh"
|
||||||
|
|
||||||
if ! [ -f "$(dirname "$(dirname "$0")")/public/config.js" ]; then
|
if ! [ -f "$(dirname "$(dirname "$0")")/public/config.js" ]; then
|
||||||
|
|
|
@ -4,11 +4,12 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const ROOT = "../public/l10n/";
|
const ROOT = "../public/l10n/js";
|
||||||
|
|
||||||
/* Builds translation files. */
|
/* Builds translation files. */
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
let po;
|
let po;
|
||||||
let i;
|
let i;
|
||||||
|
@ -60,8 +61,10 @@ function parseString() {
|
||||||
let msgid;
|
let msgid;
|
||||||
let msgstr;
|
let msgstr;
|
||||||
|
|
||||||
|
fs.mkdirSync(ROOT, {recursive: true});
|
||||||
|
|
||||||
for (const lang of fs.readdirSync("po")) {
|
for (const lang of fs.readdirSync("po")) {
|
||||||
const jsFile = fs.openSync(ROOT + "js/" + lang + ".js", "w");
|
const jsFile = fs.openSync(path.join(ROOT, lang + ".js"), "w");
|
||||||
fs.writeSync(jsFile, "(function(){var ");
|
fs.writeSync(jsFile, "(function(){var ");
|
||||||
let translationFunction = "translationFunction";
|
let translationFunction = "translationFunction";
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
trivabble.applyL10n();
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue