summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--extension/Makefile32
-rw-r--r--extension/package.json5
-rw-r--r--extension/pogen/pogen.ts2
4 files changed, 40 insertions, 2 deletions
diff --git a/README b/README
index 846edee8d..d9503941d 100644
--- a/README
+++ b/README
@@ -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/
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()