rename files for clarity

also made the naming convention consistent (dashes not underscore)
This commit is contained in:
chrisgarrity 2018-11-27 11:05:23 -05:00
parent 0f1dafef0e
commit 1646441f4a
7 changed files with 18 additions and 18 deletions

View file

@ -6,7 +6,7 @@
"browser": "./src/index.js", "browser": "./src/index.js",
"bin": { "bin": {
"build-i18n-src": "./scripts/build-i18n-src.js", "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": { "scripts": {
"build:data": "babel-node scripts/build-data", "build:data": "babel-node scripts/build-data",
@ -15,17 +15,17 @@
"lint:js": "eslint . --ext .js", "lint:js": "eslint . --ext .js",
"lint:json": "jshint -e .json www editor/blocks editor/extensions editor/interface editor/paint-editor", "lint:json": "jshint -e .json www editor/blocks editor/extensions editor/interface editor/paint-editor",
"lint": "npm run lint:js && npm run lint:json", "lint": "npm run lint:js && npm run lint:json",
"sync:gui": "babel-node scripts/sync_tx_translations scratch-editor interface ./editor/interface/", "pull:interface": "babel-node scripts/tx-pull-translations scratch-editor interface ./editor/interface/",
"sync:paint": "babel-node scripts/sync_tx_translations scratch-editor paint-editor ./editor/paint-editor/", "pull:paint": "babel-node scripts/tx-pull-translations scratch-editor paint-editor ./editor/paint-editor/",
"sync:extensions": "babel-node scripts/sync_tx_translations scratch-editor extensions ./editor/extensions/", "pull:extensions": "babel-node scripts/tx-pull-translations scratch-editor extensions ./editor/extensions/",
"sync:blocks": "babel-node scripts/sync_tx_blocks ./editor/blocks/", "pull:blocks": "babel-node scripts/tx-pull-blocks ./editor/blocks/",
"sync:editor": "npm run sync:blocks && npm run sync:extensions && npm run sync:paint && npm run sync:gui", "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", "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:blocks": "babel-node scripts/validate-translations ./editor/blocks/",
"validate:extensions": "babel-node scripts/validate_translations ./editor/extensions/", "validate:extensions": "babel-node scripts/validate-translations ./editor/extensions/",
"validate:gui": "babel-node scripts/validate_translations ./editor/interface/", "validate:interface": "babel-node scripts/validate-translations ./editor/interface/",
"validate:paint": "babel-node scripts/validate_translations ./editor/paint-editor/", "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:editor": "npm run validate:blocks && npm run validate:extensions && npm run validate:interface && npm run validate:paint"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -12,7 +12,7 @@ const args = process.argv.slice(2);
const usage = ` const usage = `
Pull blocks translations from Transifex. 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 path: where to put the downloaded json files
NOTE: TX_TOKEN environment variable needs to be set with a Transifex API token. See 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. the Localization page on the GUI wiki for information about setting up Transifex.

View file

@ -12,7 +12,7 @@ const args = process.argv.slice(2);
const usage = ` const usage = `
Pull supported language translations from Transifex. 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-project: project on Transifex (e.g., scratch-editor)
tx-resource: resource within the project (e.g., interface) tx-resource: resource within the project (e.g., interface)
path: where to put the downloaded json files path: where to put the downloaded json files
@ -29,7 +29,7 @@ import fs from 'fs';
import path from 'path'; import path from 'path';
import transifex from 'transifex'; import transifex from 'transifex';
import async from 'async'; 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'; import locales, {localeMap} from '../src/supported-locales.js';
// Globals // Globals

View file

@ -15,8 +15,8 @@ const transifex = require('transifex');
const args = process.argv.slice(2); const args = process.argv.slice(2);
const usage = ` const usage = `
Sync English source strings with Transifex. Usage: Push English source strings to Transifex. Usage:
node sync_tx_src.js tx-project tx-resource english-json-file node tx-push-src.js tx-project tx-resource english-json-file
tx-project: the project slug on transifex tx-project: the project slug on transifex
tx-resource: the resource slug on transifex tx-resource: the resource slug on transifex
english-json-file: path to the en.json source english-json-file: path to the en.json source

View file

@ -4,7 +4,7 @@
git checkout master git checkout master
npm run sync:editor npm run pull:editor
npm run test npm run test

View file

@ -19,7 +19,7 @@ if (args.length < 1) {
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
import async from 'async'; import async from 'async';
import {validateTranslations} from './tx_util.js'; import {validateTranslations} from './tx-util.js';
import locales from '../src/supported-locales.js'; import locales from '../src/supported-locales.js';
// Globals // Globals