Skip to content

Commit e8ccc4b

Browse files
authored
chore: Update transifex api from v2 to v3 (#310)
* chore: Update transifex api from v2 to v3 * refactor: remove duplicate line
1 parent 4d86780 commit e8ccc4b

File tree

3 files changed

+122
-23
lines changed

3 files changed

+122
-23
lines changed

Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
transifex_resource = frontend-component-header
1+
export TRANSIFEX_RESOURCE = frontend-component-header
22
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA"
33

44
transifex_utils = ./node_modules/.bin/transifex-utils.js
55
i18n = ./src/i18n
66
transifex_input = $(i18n)/transifex_input.json
7-
tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/translation/en/strings/
8-
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/source/
97

108
# This directory must match .babelrc .
119
transifex_temp = ./temp/babel-plugin-react-intl
@@ -42,11 +40,11 @@ push_translations:
4240
# Pushing strings to Transifex...
4341
tx push -s
4442
# Fetching hashes from Transifex...
45-
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
43+
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh
4644
# Writing out comments to file...
47-
$(transifex_utils) $(transifex_temp) --comments
45+
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path
4846
# Pushing comments to Transifex...
49-
./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
47+
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh
5048

5149
# Pulls translations from Transifex.
5250
pull_translations:

package-lock.json

Lines changed: 117 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@edx/browserslist-config": "^1.1.1",
3838
"@edx/frontend-build": "^12.4.19",
3939
"@edx/frontend-platform": "^3.0.1",
40+
"@edx/reactifex": "^2.1.1",
4041
"@testing-library/dom": "9.0.0",
4142
"@testing-library/jest-dom": "5.16.5",
4243
"@testing-library/react": "10.4.9",
@@ -51,7 +52,6 @@
5152
"react-redux": "7.2.9",
5253
"react-router-dom": "5.3.4",
5354
"react-test-renderer": "16.14.0",
54-
"reactifex": "1.1.1",
5555
"redux": "4.2.1",
5656
"redux-saga": "1.2.2"
5757
},

0 commit comments

Comments
 (0)