move traduction files out of server data directory

This commit is contained in:
Laurent Mazet 2020-05-01 22:08:34 +02:00
parent 4176cffcc2
commit fd8b9173ca
9 changed files with 16 additions and 4 deletions

13
Makefile Normal file
View File

@ -0,0 +1,13 @@
# -*- Makefile -*-
PORT = 3000
help:
@echo make lang: build translation files
@echo make start-debug-server: start a debugging server
lang:
cd l10n; node makejs.js
start-debug-server:
DEV_ENABLE_SERVING_FILES=true TRIVABBLE_PORT=$(PORT) nodejs trivabble-server.js

View File

@ -1,5 +1,7 @@
#!/usr/bin/env node
var ROOT = "../server-data/l10n/";
/* Builds translation files.*/
var fs = require('fs');
@ -50,7 +52,7 @@ function parseString() {
for (var l in langs) {
var lang = langs[l];
var jsFile = fs.openSync("js/" + lang + ".js", "w");
var jsFile = fs.openSync(ROOT + "js/" + lang + ".js", "w");
fs.writeSync(jsFile, "(function(){var ");
var poFiles = fs.readdirSync("po/" + lang);
for (var p in poFiles) {

View File

@ -1,3 +0,0 @@
all:
node makejs.js