diff options
author | tg(x) <*@tg-x.net> | 2016-02-22 19:08:16 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-02-22 19:08:16 +0100 |
commit | 4c005a15960174ba96903f5e3882f56ab7485d81 (patch) | |
tree | fc8ccb3878a692452a99357279cbee9d900be397 /extension | |
parent | 5a0b3935d81422ae19a5b7aefbd11e20bef4a3d7 (diff) |
Makefile + po2json
Diffstat (limited to 'extension')
-rw-r--r-- | extension/Makefile | 32 | ||||
-rw-r--r-- | extension/package.json | 5 | ||||
-rw-r--r-- | extension/pogen/pogen.ts | 2 |
3 files changed, 37 insertions, 2 deletions
diff --git a/extension/Makefile b/extension/Makefile new file mode 100644 index 000000000..4055cb00e --- /dev/null +++ b/extension/Makefile @@ -0,0 +1,32 @@ +src = lib background content_scripts pages + +gulp = node_modules/gulp/bin/gulp.js +tsc = node_modules/typescript/bin/tsc +po2json = node_modules/po2json/bin/po2json + +.PHONY: taler.po lib/i18n.json + +package-stable: tsc i18n + $(gulp) package-stable + +package-unstable: tsc i18n + $(gulp) package-unstable + +tsc: tsconfig.json node_modules + $(tsc) + +tsconfig.json: gulpfile.js node_modules + $(gulp) tsconfig + +i18n: lib/i18n.json + +taler.po: node_modules + for f in `find $(src) -name '*.ts' -or -name '*.tsx'`; do echo $$f; pogen/pogen.js $$f > `dirname $$f`/`basename $$f .ts`.po; done + touch $@ + msgcat `find $(src) -name '*.po'` | msgmerge -o $@ $@ - + +lib/i18n.json: taler.po node_modules + $(po2json) $< $@ + +node_modules: + npm install . diff --git a/extension/package.json b/extension/package.json index a08fa47ba..4523b91b0 100644 --- a/extension/package.json +++ b/extension/package.json @@ -22,7 +22,10 @@ "gulp-zip": "^3.1.0", "map-stream": "0.0.6", "mocha": "^2.3.4", + "po2json": "^0.4.1", "systemjs": "^0.19.14", - "typescript": "^1.8.0-dev.20160118" + "through2": "^2.0.1", + "typescript": "^1.8.0-dev.20160118", + "vinyl": "^1.1.1" } } diff --git a/extension/pogen/pogen.ts b/extension/pogen/pogen.ts index 47617b04c..8122bbfe5 100644 --- a/extension/pogen/pogen.ts +++ b/extension/pogen/pogen.ts @@ -163,7 +163,7 @@ msgstr "" "Language-Team: LANGUAGE <LL@li.org>\\n" "Language: \\n" "MIME-Version: 1.0\\n" -"Content-Type: text/plain; charset=CHARSET\\n" +"Content-Type: text/plain; charset=UTF-8\\n" "Content-Transfer-Encoding: 8bit\\n"`); console.log() |