Skip to content

Commit 818ed5d

Browse files
authored
chore: update transifex api from v2 to v3 (#272)
* chore: Update transifex api from v2 to v3 * refactor: remove duplicate line
1 parent 07eb589 commit 818ed5d

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-footer
1+
export TRANSIFEX_RESOURCE = frontend-component-footer
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
@@ -38,6 +38,7 @@
3838
"@edx/frontend-build": "12.4.19",
3939
"@edx/frontend-platform": "^3.0.1",
4040
"@edx/paragon": "^20.19.0",
41+
"@edx/reactifex": "^2.1.1",
4142
"enzyme": "3.11.0",
4243
"enzyme-adapter-react-16": "1.15.7",
4344
"husky": "8.0.3",
@@ -47,7 +48,6 @@
4748
"react-redux": "7.2.9",
4849
"react-router-dom": "5.3.4",
4950
"react-test-renderer": "16.14.0",
50-
"reactifex": "1.1.1",
5151
"redux": "4.2.1",
5252
"semantic-release": "19.0.5"
5353
},

0 commit comments

Comments
 (0)