changeset 1802:70573eea890e

improve Translation process : improve package.json and update the documentation * update vue-gettext dependency * add script to automate the `make translations` process via yarn serve/build * delete run:both, it misses the step in serve/build * update the Documention according to the last changes
author Fadi Abbud <fadi.abbud@intevation.de>
date Tue, 15 Jan 2019 09:50:59 +0100
parents 11669276e197
children 975a7de89f05 bda5cf9eb2e0 9a2fbeaabd52
files client/README.md client/docs/developer.md client/package.json
diffstat 3 files changed, 8 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/client/README.md	Tue Jan 15 09:42:38 2019 +0100
+++ b/client/README.md	Tue Jan 15 09:50:59 2019 +0100
@@ -3,6 +3,8 @@
 
 * Install dependencies
 
+  * Install (`xgettext`) tool (e.g. for Debian xgettext (GNU gettext-tools) 0.19.8.1)
+
   * Javascript
 
     `yarn install`
@@ -21,10 +23,6 @@
 
     Run webpack-dev-server with `yarn serve`
 
-  * If you also want to start the backend, try
-
-    `yarn run:both`
-
 * Build `yarn build`
 
   builds the production ready assets to `web` folder.
@@ -34,7 +32,7 @@
 
 * Translation
   * Extract Messages via `make makemessages`
-  * Translations are converted via `make translations`
+  * Translations are converted via `make translations` which is executed automatically with yarn serve/build
 
   For more information see [developer documentation](./docs/developer.md)
 
--- a/client/docs/developer.md	Tue Jan 15 09:42:38 2019 +0100
+++ b/client/docs/developer.md	Tue Jan 15 09:50:59 2019 +0100
@@ -75,11 +75,8 @@
 - SK
 - HU
 - HR
-- RS
-- BiH
 - BG
 - RO
-- UA
 
 ## Our preferred translation cycle is as follows:
 
@@ -113,7 +110,8 @@
 
 In order to extract the messages from the templates call `make makemessages`.
 After that you have the `.po`-file which could be translated.
-After translation, you have to call `make translations` to generate the `translations.json`
+
+After translation, `make translations` has to be called to generate the `translations.json`, that is being done automatically via yarn serve/build.
 which is consumed by `vue-gettext`.
 
 The workflow is as follows:
--- a/client/package.json	Tue Jan 15 09:42:38 2019 +0100
+++ b/client/package.json	Tue Jan 15 09:50:59 2019 +0100
@@ -8,9 +8,8 @@
   },
   "private": true,
   "scripts": {
-    "run:both": "concurrently \"../cmd/gemma/gemma\" \"vue-cli-service serve\"",
-    "serve": "VUE_APP_HGREV=$(hg log -r . --template \"{data|shortdate}-{node|short}\") vue-cli-service serve",
-    "build": "VUE_APP_HGREV=$(hg log -r . --template \"{data|shortdate}-{node|short}\") vue-cli-service build",
+    "serve": "make translations && VUE_APP_HGREV=$(hg log -r . --template \"{data|shortdate}-{node|short}\") vue-cli-service serve",
+    "build": "make translations && VUE_APP_HGREV=$(hg log -r . --template \"{data|shortdate}-{node|short}\") vue-cli-service build",
     "analyze": "ANALYZE=true vue-cli-service serve",
     "lint": "vue-cli-service lint",
     "test:unit": "vue-cli-service test:unit",
@@ -65,7 +64,7 @@
     "node-sass": "^4.10.0",
     "pretty-quick": "^1.8.0",
     "sass-loader": "^7.0.1",
-    "vue-gettext": "^2.1.1",
+    "vue-gettext": "^2.1.2",
     "vue-template-compiler": "^2.5.17",
     "webpack-bundle-analyzer": "^3.0.3"
   },