@edx/frontend-platform 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ # i18n/scripts
2
+
3
+ This directory contains the `transifex-utils.js` file which is shared across all micro-frontends.
4
+
5
+ The package.json of `frontend-platform` includes the following section:
6
+
7
+ ```
8
+ "bin": {
9
+ "transifex-utils.js": "i18n/scripts/transifex-utils.js"
10
+ },
11
+ ```
12
+
13
+ This config block causes `transifex-utils.js` to be copied to the following path when `frontend-platform` is installed as a dependency of an micro-frontend:
14
+
15
+ ```
16
+ /node_modules/.bin/transifex-utils.js
17
+ ```
18
+
19
+ All micro-frontends have a `Makefile` with a line that loads `transifex-utils.js` from the above path:
20
+
21
+ ```
22
+ transifex_utils = ./node_modules/.bin/transifex-utils.js
23
+ ```
24
+
25
+ So if you delete `transifex-utils.js` or the `scripts` directory, you'll break all micro-frontend builds. Happy coding!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-platform",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Foundational application framework for Open edX micro-frontend applications.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -18,8 +18,7 @@
18
18
  "test:watch": "npm run test -- --watch"
19
19
  },
20
20
  "bin": {
21
- "transifex-utils.js": "i18n/scripts/transifex-utils.js",
22
- "transifex-Makefile": "i18n/scripts/Makefile"
21
+ "transifex-utils.js": "i18n/scripts/transifex-utils.js"
23
22
  },
24
23
  "repository": {
25
24
  "type": "git",
@@ -1,39 +0,0 @@
1
- # For more details about the translation jobs, see https://github.com/edx/frontend-i18n/blob/master/docs/how_tos/i18n.rst
2
-
3
- transifex_langs = "ar,fr,es_419,zh_CN"
4
- transifex_utils = ./node_modules/.bin/transifex-utils.js
5
- transifex_input = ./src/i18n/transifex_input.json
6
- tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/translation/en/strings/
7
- tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/source/
8
-
9
- i18n.extract:
10
- # Pulling display strings from .jsx files into .json files...
11
- rm -rf $(transifex_temp)
12
- npm run-script i18n_extract
13
-
14
- i18n.concat:
15
- # Gathering JSON messages into one file...
16
- $(transifex_utils) $(transifex_temp) $(transifex_input)
17
-
18
- detect_changed_source_translations:
19
- # Checking for changed translations...
20
- git diff --exit-code $(transifex_input)
21
-
22
- validate-no-uncommitted-package-lock-changes:
23
- # Checking for package-lock.json changes...
24
- git diff --exit-code package-lock.json
25
-
26
- # Push translations to Transifex. Run make extract_translations first.
27
- push_translations:
28
- # Pushing strings to Transifex...
29
- tx push -s
30
- # Fetching hashes from Transifex...
31
- ./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
32
- # Writing out comments to file...
33
- $(transifex_utils) $(transifex_temp) --comments
34
- # Pushing comments to Transifex...
35
- ./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
36
-
37
- # Pull translations from Transifex
38
- pull_translations:
39
- tx pull -f --mode reviewed --language=$(transifex_langs)