diff --git a/package.json b/package.json index d1388349..14779056 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "browser": "./src/index.js", "bin": { "build-i18n-src": "./scripts/build-i18n-src.js", - "sync-tx-src": "./scripts/sync_tx_src.js" + "tx-push-src": "./scripts/tx-push-src.js" }, "scripts": { "build:data": "babel-node scripts/build-data", @@ -15,17 +15,17 @@ "lint:js": "eslint . --ext .js", "lint:json": "jshint -e .json www editor/blocks editor/extensions editor/interface editor/paint-editor", "lint": "npm run lint:js && npm run lint:json", - "sync:gui": "babel-node scripts/sync_tx_translations scratch-editor interface ./editor/interface/", - "sync:paint": "babel-node scripts/sync_tx_translations scratch-editor paint-editor ./editor/paint-editor/", - "sync:extensions": "babel-node scripts/sync_tx_translations scratch-editor extensions ./editor/extensions/", - "sync:blocks": "babel-node scripts/sync_tx_blocks ./editor/blocks/", - "sync:editor": "npm run sync:blocks && npm run sync:extensions && npm run sync:paint && npm run sync:gui", + "pull:interface": "babel-node scripts/tx-pull-translations scratch-editor interface ./editor/interface/", + "pull:paint": "babel-node scripts/tx-pull-translations scratch-editor paint-editor ./editor/paint-editor/", + "pull:extensions": "babel-node scripts/tx-pull-translations scratch-editor extensions ./editor/extensions/", + "pull:blocks": "babel-node scripts/tx-pull-blocks ./editor/blocks/", + "pull:editor": "npm run pull:blocks && npm run pull:extensions && npm run pull:paint && npm run pull:interface", "test": "npm run lint:js && npm run validate:editor && npm run build && npm run lint:json", - "validate:blocks": "babel-node scripts/validate_translations ./editor/blocks/", - "validate:extensions": "babel-node scripts/validate_translations ./editor/extensions/", - "validate:gui": "babel-node scripts/validate_translations ./editor/interface/", - "validate:paint": "babel-node scripts/validate_translations ./editor/paint-editor/", - "validate:editor": "npm run validate:blocks && npm run validate:extensions && npm run validate:gui && npm run validate:paint" + "validate:blocks": "babel-node scripts/validate-translations ./editor/blocks/", + "validate:extensions": "babel-node scripts/validate-translations ./editor/extensions/", + "validate:interface": "babel-node scripts/validate-translations ./editor/interface/", + "validate:paint": "babel-node scripts/validate-translations ./editor/paint-editor/", + "validate:editor": "npm run validate:blocks && npm run validate:extensions && npm run validate:interface && npm run validate:paint" }, "repository": { "type": "git", diff --git a/scripts/sync_tx_blocks.js b/scripts/tx-pull-blocks.js similarity index 98% rename from scripts/sync_tx_blocks.js rename to scripts/tx-pull-blocks.js index 50594464..76197a11 100644 --- a/scripts/sync_tx_blocks.js +++ b/scripts/tx-pull-blocks.js @@ -12,7 +12,7 @@ const args = process.argv.slice(2); const usage = ` Pull blocks translations from Transifex. Usage: - node sync_tx_blocks.js path + node tx-pull-blocks.js path path: where to put the downloaded json files NOTE: TX_TOKEN environment variable needs to be set with a Transifex API token. See the Localization page on the GUI wiki for information about setting up Transifex. diff --git a/scripts/sync_tx_translations.js b/scripts/tx-pull-translations.js similarity index 95% rename from scripts/sync_tx_translations.js rename to scripts/tx-pull-translations.js index e9d579d7..cb03a850 100644 --- a/scripts/sync_tx_translations.js +++ b/scripts/tx-pull-translations.js @@ -12,7 +12,7 @@ const args = process.argv.slice(2); const usage = ` Pull supported language translations from Transifex. Usage: - node sync_tx_translations.js tx-project tx-resource path + node tx-pull-translations.js tx-project tx-resource path tx-project: project on Transifex (e.g., scratch-editor) tx-resource: resource within the project (e.g., interface) path: where to put the downloaded json files @@ -29,7 +29,7 @@ import fs from 'fs'; import path from 'path'; import transifex from 'transifex'; import async from 'async'; -import {flattenJson, validateTranslations} from './tx_util.js'; +import {flattenJson, validateTranslations} from './tx-util.js'; import locales, {localeMap} from '../src/supported-locales.js'; // Globals diff --git a/scripts/sync_tx_src.js b/scripts/tx-push-src.js similarity index 92% rename from scripts/sync_tx_src.js rename to scripts/tx-push-src.js index 73442379..ee116d8a 100644 --- a/scripts/sync_tx_src.js +++ b/scripts/tx-push-src.js @@ -15,8 +15,8 @@ const transifex = require('transifex'); const args = process.argv.slice(2); const usage = ` -Sync English source strings with Transifex. Usage: - node sync_tx_src.js tx-project tx-resource english-json-file +Push English source strings to Transifex. Usage: + node tx-push-src.js tx-project tx-resource english-json-file tx-project: the project slug on transifex tx-resource: the resource slug on transifex english-json-file: path to the en.json source diff --git a/scripts/tx_util.js b/scripts/tx-util.js similarity index 100% rename from scripts/tx_util.js rename to scripts/tx-util.js diff --git a/scripts/sync_tx.sh b/scripts/update-translations.sh similarity index 91% rename from scripts/sync_tx.sh rename to scripts/update-translations.sh index be87711c..67e78b9f 100644 --- a/scripts/sync_tx.sh +++ b/scripts/update-translations.sh @@ -4,7 +4,7 @@ git checkout master -npm run sync:editor +npm run pull:editor npm run test diff --git a/scripts/validate_translations.js b/scripts/validate-translations.js similarity index 95% rename from scripts/validate_translations.js rename to scripts/validate-translations.js index 5420ae1f..f666381b 100644 --- a/scripts/validate_translations.js +++ b/scripts/validate-translations.js @@ -19,7 +19,7 @@ if (args.length < 1) { import fs from 'fs'; import path from 'path'; import async from 'async'; -import {validateTranslations} from './tx_util.js'; +import {validateTranslations} from './tx-util.js'; import locales from '../src/supported-locales.js'; // Globals