Makefile + po2json

This commit is contained in:
tg(x) 2016-02-22 19:08:16 +01:00
parent 5a0b3935d8
commit 4c005a1596
4 changed files with 40 additions and 2 deletions

3
README
View File

@ -1,3 +1,6 @@
Cross-browser Taler wallet written for the WebExtensions API.
See the documentation at http://doc.taler.net/dev-wallet-wx.html
Run make in the extension/ directory to build the extension.
The build output directory is extension/build/

32
extension/Makefile Normal file
View File

@ -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 .

View File

@ -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"
}
}

View File

@ -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()