[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] branch master updated: fix strings.ts
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] branch master updated: fix strings.ts generation |
Date: |
Mon, 29 May 2017 12:37:39 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
The following commit(s) were added to refs/heads/master by this push:
new 9950c625 fix strings.ts generation
9950c625 is described below
commit 9950c62579298a5dac8cbd51d700507ce4d90063
Author: Florian Dold <address@hidden>
AuthorDate: Mon May 29 12:37:35 2017 +0200
fix strings.ts generation
---
gulpfile.js | 7 ++++++-
src/i18n/strings.ts | 8 ++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/gulpfile.js b/gulpfile.js
index e7d4ccef..0f206ed8 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -49,6 +49,7 @@ const Stream = require("stream").Stream;
const vfs = require("vinyl-fs");
const webpack = require("webpack");
const po2json = require("po2json");
+const path = require("path");
const paths = {
ts: {
@@ -322,7 +323,11 @@ function pofilesToJs(targetPath) {
if (error) {
throw error;
}
- const lang = file.stem;
+ const lang = path.basename(file.path, ".po");
+ if (!lang) {
+ throw Error();
+ }
+ console.log("lang", lang);
const pojson = po2json.parse(buf, {format: "jed1.x", fuzzy: true});
outStream.write("strings['" + lang + "'] = " + JSON.stringify(pojson,
null, " ") + ";\n");
cb();
diff --git a/src/i18n/strings.ts b/src/i18n/strings.ts
index 19a9293a..80698936 100644
--- a/src/i18n/strings.ts
+++ b/src/i18n/strings.ts
@@ -15,7 +15,7 @@
*/
export let strings: {[s: string]: any} = {};
-strings['undefined'] = {
+strings['de'] = {
"domain": "messages",
"locale_data": {
"messages": {
@@ -174,7 +174,7 @@ strings['undefined'] = {
}
}
};
-strings['undefined'] = {
+strings['en-US'] = {
"domain": "messages",
"locale_data": {
"messages": {
@@ -333,7 +333,7 @@ strings['undefined'] = {
}
}
};
-strings['undefined'] = {
+strings['fr'] = {
"domain": "messages",
"locale_data": {
"messages": {
@@ -492,7 +492,7 @@ strings['undefined'] = {
}
}
};
-strings['undefined'] = {
+strings['it'] = {
"domain": "messages",
"locale_data": {
"messages": {
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-wallet-webex] branch master updated: fix strings.ts generation,
gnunet <=