From d15b56cfbfecb1aadbb70ae8a67fe28206a9cb4e Mon Sep 17 00:00:00 2001 From: whphhg Date: Wed, 31 May 2017 17:35:44 +0200 Subject: [PATCH] README: cleanup --- README.md | 60 ++++++++++++++++++----------------- bin/README.md | 9 +++--- package.json | 10 +++--- src/locales/fr-FR/wallet.json | 1 - src/stores/gui.js | 4 +-- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index c4e1696..87d707e 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ The following dependencies are required to be installed: * git Clone this repository using `git clone`, move to the cloned directory -using `cd vcash-electron` and install Node.js dependencies using `npm install`. +using `cd vcash-electron/` and install Node.js dependencies using `npm install`. $ git clone https://github.com/whphhg/vcash-electron.git - $ cd vcash-electron + $ cd vcash-electron/ $ npm install -After it is done installing dependencies, you can run the GUI -using `npm run gui`. +You can run the GUI using `npm run gui` after the dependency installation +is completed. $ npm run gui @@ -28,40 +28,42 @@ using `npm run dev` or `npm run dev-win` on Windows. $ npm run dev (Linux and macOS) $ npm run dev-win (Windows) +## Launch the Vcash daemon on GUI start-up +Placing a daemon named `vcashd-ia32` or `vcashd-x64` into the `bin/` directory +will launch it on GUI start-up if it matches the correct platform and arch. It +will also get bundled with the GUI if you run any of the `npm run dist-*` scripts. + ## Contribute translations -First follow the `Install from source` guide above. Then create a copy of the -`en-US` directory in `src/locales` and construct the first part of the directory -name by using the `ISO 639-1 Code` +Follow the `Install from source` guide above and download the Vcash daemon +instead of the GUI. It's easier to have the daemon running separately while +you restart the GUI to look at the changes you've made to the translation file. + +Once you are done with the installation and have the daemon running, create a +copy of the `en-US` directory in `src/locales/` and construct the first part of +the copied directory name by using the `ISO 639-1 Code` [language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) and the second part by using the `ISO 3166 Alpha-2 code` [country code](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes). Delimit -the two with a dash `-`. - -After you've created the correctly named translation directory, open -`src/stores/gui.js` and add the new translation to the +the two parts with a dash `-`. The final step is to open `src/stores/gui.js` +and add your translation to the [languages](https://github.com/whphhg/vcash-electron/blob/master/src/stores/gui.js#L20-L24) -array (in alphabetical order). Please use 6 spaces to indent the line below. +array. Please add it in alphabetical order (by name) and use 6 spaces to indent +the line. - { language: 'languageCode-countryCode', name: 'New language' }, + { language: 'languageCode-countryCode', name: 'Language' }, -You can now select your new translation in the GUI and start translating the -strings in the `wallet.json`. +You can now select your translation in the GUI and start translating the strings +in `wallet.json`. **Note:** Please use an editor that will open and save `wallet.json` in UTF-8 (e.g. [Atom](https://atom.io/)). ## Package and build -To bundle the daemon with the GUI, name it `vcashd-arch`, where `arch` can -be either `ia32` or `x64` and place it into the `bin` directory. This directory -is checked for the current platform & arch daemon executable on start-up by -[daemon.js](https://github.com/whphhg/vcash-electron/blob/master/src/daemon.js) -and is not included in the asar archive, but gets unpacked into -the `dist/platform-unpacked/app.asar.unpacked` directory due to -[this](https://electron.atom.io/docs/tutorial/application-packaging/#executing-binaries-inside-asar-archive) -asar limitation. - -To only generate the `dist/platform-unpacked` package directory without -actually packaging the GUI run `npm run pack`. +To bundle the daemon with the GUI follow the `Launch the Vcash daemon on GUI +start-up` guide above. + +If you want to only generate the `dist/platform-unpacked/` package directory +without actually packaging the GUI run `npm run pack`. $ npm run pack @@ -77,7 +79,7 @@ Run the docker container. $ docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine To package in a distributable format run one of the scripts from the table -below, which will create the packages and save them into the `dist` directory. +below, which will create the packages and save them into the `dist/` directory. Packages will be created according to the `build` and `scripts` options in [package.json](https://github.com/whphhg/vcash-electron/blob/master/package.json#L11-L33). @@ -91,13 +93,13 @@ dist-win32-ia32 | ia32 | Create a 32-bit Windows portable executable dist-win32-x64 | x64 | Create a 64-bit Windows portable executable **Note:** If you are bundling daemons, `dist-nsis` script requires both -`vcashd-ia32.exe` and `vcashd-x64.exe` in the `bin` directory. Other scripts +`vcashd-ia32.exe` and `vcashd-x64.exe` in the `bin/` directory. Other scripts require only the daemon for the target arch of the platform they're packaging for. ## Linux and macOS To package in a distributable format run one of the scripts from the table below, which will create the packages for your current platform and save -them into the `dist` directory. Packages will be created according to the +them into the `dist/` directory. Packages will be created according to the `build` and `scripts` options in [package.json](https://github.com/whphhg/vcash-electron/blob/master/package.json#L11-L33). diff --git a/bin/README.md b/bin/README.md index 068aebf..75a91a6 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,5 +1,4 @@ -# Daemons -Placing a daemon named `vcashd-arch`, where `arch` can be either -`ia32` or `x64` into this directory will spawn it on start-up if it matches -the correct platform and arch. It will also get bundled with the GUI when -you run any of the `npm run dist-` scripts. +# Launch the Vcash daemon on GUI start-up +Placing a daemon named `vcashd-ia32` or `vcashd-x64` into this directory will +launch it on GUI start-up if it matches the correct platform and arch. It will +also get bundled with the GUI if you run any of the `npm run dist-*` scripts. diff --git a/package.json b/package.json index 5c51e72..439b8eb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vcash-electron", "productName": "Vcash Electron GUI", - "version": "0.32.1", + "version": "0.32.2", "description": "Multi-platform and multi-node GUI for Vcash.", "main": "src/electron.js", "scripts": { @@ -51,11 +51,11 @@ "parser": "babel-eslint" }, "dependencies": { - "antd": "2.10.2", + "antd": "2.10.3", "electron-compile": "6.4.1", "i18next": "8.4.0", "i18next-node-fs-backend": "1.0.0", - "mobx": "3.1.10", + "mobx": "3.1.11", "mobx-logger": "0.6.0", "mobx-react": "4.2.1", "moment": "2.18.1", @@ -69,13 +69,13 @@ "devDependencies": { "babel-core": "6.24.1", "babel-eslint": "7.2.3", - "babel-plugin-import": "1.2.0", + "babel-plugin-import": "1.2.1", "babel-plugin-transform-decorators-legacy": "1.3.4", "babel-preset-es2015": "6.24.1", "babel-preset-react": "6.24.1", "babel-preset-stage-0": "6.24.1", "babel-runtime": "6.23.0", - "electron-builder": "18.2.2", + "electron-builder": "18.3.0", "electron-prebuilt-compile": "1.7.0", "standard": "10.0.2" } diff --git a/src/locales/fr-FR/wallet.json b/src/locales/fr-FR/wallet.json index 498b7c4..f716cde 100644 --- a/src/locales/fr-FR/wallet.json +++ b/src/locales/fr-FR/wallet.json @@ -79,7 +79,6 @@ "insufficientFunds": "Vous n'avez pas suffisamment de fonds.", "keyFile": "Fichier clé", "keypoolRanOut": "Le pool des clés s'est épuisé.", - "lastSend": "Dernier envoi", "lastReceived": "Derniers reçus", "lastUpdated": "Derniers mis à jour", "latestRewards": "Dernières récompenses", diff --git a/src/stores/gui.js b/src/stores/gui.js index a7669dd..2468fde 100644 --- a/src/stores/gui.js +++ b/src/stores/gui.js @@ -19,11 +19,11 @@ class GUI { constructor () { this.languages = [ { language: 'en-US', name: 'English' }, - { language: 'es-ES', name: 'Spanish' }, { language: 'fr-FR', name: 'French' }, { language: 'pt-BR', name: 'Portuguese' }, { language: 'ru-RU', name: 'Russian' }, - { language: 'sl-SI', name: 'Slovenian' } + { language: 'sl-SI', name: 'Slovenian' }, + { language: 'es-ES', name: 'Spanish' } ] /** Update i18next and moment on locale change. */