From 19357e654810f3c28ce1d36c96ea5d0d69343fcb Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Wed, 9 Jan 2019 15:56:11 +0200 Subject: [PATCH] Add folder for scripts --- docs/translations.md | 8 ++++---- package.json | 3 ++- translations.js => scripts/translations.js | 0 3 files changed, 6 insertions(+), 5 deletions(-) rename translations.js => scripts/translations.js (100%) diff --git a/docs/translations.md b/docs/translations.md index cd830c13..1a5ad6d7 100644 --- a/docs/translations.md +++ b/docs/translations.md @@ -179,7 +179,7 @@ In case you have added a new language translation file and are pulling translati in sync. Running the following command in the project root ``` -node translations.js +yarn run translate ``` will start a command line application: @@ -189,8 +189,8 @@ will start a command line application: The command line application can be used to match a translation file against the English translations. If your new translations file follows the `.json` naming, the CLI will pick it up automatically. In order to improve readability, you can add the language name to the -`TARGET_LANG_NAMES` map in `translations.js` if it is not yet in there and the CLI will use the -correct name for your language instead of the language code when prompting about translations. +`TARGET_LANG_NAMES` map in `scripts/translations.js` if it is not yet in there and the CLI will use +the correct name for your language instead of the language code when prompting about translations. In case you wish to use something else than English as the source language, modify the `SOURCE_LANG` -object in `translations.js` to match your needs. +object in `scripts/translations.js` to match your needs. diff --git a/package.json b/package.json index d76f1127..ed30a2cd 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "eject": "sharetribe-scripts eject", "start": "node server/index.js", "dev-server": "export NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000&&yarn run build&&nodemon --watch server server/index.js", - "heroku-postbuild": "yarn run build" + "heroku-postbuild": "yarn run build", + "translate": "node scripts/translations.js" }, "prettier": { "singleQuote": true, diff --git a/translations.js b/scripts/translations.js similarity index 100% rename from translations.js rename to scripts/translations.js