Skip to content

Commit

Permalink
fix(i18n): fix i18n make targets
Browse files Browse the repository at this point in the history
ARCH-748
  • Loading branch information
robrap committed May 16, 2019
1 parent 0cf3164 commit 7ff9039
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules
temp

.idea/

src/i18n/transifex_input.json
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
extract_translations: ## no prerequisites so we can control order of operations
echo "We have to define this target due to tooling assumptions"
echo "Also we have to npm install using this hook b/c there's no other place for it in the current setup"
requirements:
npm install
npm run-script i18n_extract

i18n.extract:
# Pulling display strings from .jsx files into .json files...
Expand All @@ -12,14 +9,22 @@ i18n.concat:
# Gathering JSON messages into one file...
./src/i18n/i18n-concat.js ./temp/src ./src/i18n/transifex_input.json


# The following make targets are required by our tooling scripts found in:
# - https://github.com/edx/ecommerce-scripts/tree/master/transifex

extract_translations: | requirements i18n.extract i18n.concat

detect_changed_source_translations:
git diff --exit-code ./src/i18n/transifex_input.json

tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/frontend-component-footer/translation/en/strings/
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/frontend-component-footer/source/

# push translations to Transifex, doing magic so we can include the translator comments
push_translations: | i18n.extract
# Note: extract_translations is a prereq that our translation script calls separately.
push_translations:
tx push -s
# Adding translator comments...
# Fetching strings from Transifex...
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
Expand Down
39 changes: 0 additions & 39 deletions src/i18n/transifex_input.json

This file was deleted.

0 comments on commit 7ff9039

Please # to comment.