Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ff7c03a
Use i18n update script when generating JS bundle
fluiddot Dec 29, 2021
6e241e1
Remove makepot commands and no longer needed scripts
fluiddot Dec 29, 2021
3e66063
Remove translation files of jetpack and layout-grid
fluiddot Dec 29, 2021
6693dda
Use translation files from i18n-cache folder
fluiddot Dec 29, 2021
5405d5d
Update localization strings files
fluiddot Dec 29, 2021
109eb44
Merge branch 'add/i18n-update-script' into add/use-i18n-update-on-bundle
fluiddot Dec 30, 2021
b015a64
Update localization strings files
fluiddot Dec 30, 2021
7d5a272
Merge branch 'add/i18n-update-script' into add/use-i18n-update-on-bundle
fluiddot Jan 5, 2022
3fc857a
Update android-build-image docker image version
fluiddot Jan 5, 2022
5d65aff
Add skip if cache option to i18n update script
fluiddot Jan 5, 2022
3a68754
Update .gitignore
fluiddot Jan 5, 2022
3c3bb03
Attach i18n update to postinstall command
fluiddot Jan 5, 2022
b423c75
Extract update gutenberg i18n cache to a function
fluiddot Jan 5, 2022
f89eb16
Fix i18n update upon dependencies install
fluiddot Jan 5, 2022
fb9e3f5
Update i18n cache path in CircleCI jobs
fluiddot Jan 5, 2022
45422de
Update gb-mobile-image docker image version
fluiddot Jan 5, 2022
9af4de6
Add i18n check cache script
fluiddot Jan 7, 2022
535b7ee
Update script description
fluiddot Jan 7, 2022
0832eda
Update Gutenberg ref
fluiddot Jan 7, 2022
144a07d
Add WP_CLI_ALLOW_ROOT env variable to pipeline
fluiddot Jan 7, 2022
9c998ce
Update gb-mobile-image version for testing
fluiddot Jan 7, 2022
c68a1b3
Update Gutenberg ref
fluiddot Jan 7, 2022
40fa739
Use latest gb-mobile-image version
fluiddot Jan 10, 2022
b0c47c9
Update Gutenberg ref
fluiddot Jan 10, 2022
7350438
Merge branch 'develop' into add/use-i18n-update-on-bundle
fluiddot Jan 10, 2022
2f735a6
Remove wrong parameter validation
fluiddot Jan 11, 2022
c44a212
Remove unnecessary plugin_name parameter
fluiddot Jan 11, 2022
6e81af1
Update Gutenberg ref with merge commit
fluiddot Jan 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Attach i18n update to postinstall command
  • Loading branch information
fluiddot committed Jan 5, 2022
commit 3c3bb0377e6aa0bbe96e73b4ef9db9ee3ab4ea28
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"wd": "^1.11.1"
},
"scripts": {
"postinstall": "patch-package && npm ci --prefix gutenberg && cd jetpack/projects/plugins/jetpack && npx pnpm install",
"postinstall": "patch-package && npm run i18n:update:skip-if-cache && npm ci --prefix gutenberg && cd jetpack/projects/plugins/jetpack && npx pnpm install",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translations are required for running the editor, and since they are not versioned, it's important that we guarantee their presence when installing the dependencies. This behavior follows the same approach we do on Gutenberg (reference).

"start": "echo \"\\x1b[33mThe start command is not available in this project. It is strongly recommended to use \\x1b[1:33mstart:reset\\x1b[0m\\x1b[33m to perform some cleanup when starting the metro bundler.\nOr you may use \\x1b[1:33mstart:quick\\x1b[0m\\x1b[33m for a quicker startup, but this may lead to unexpected javascript errors when running the app.\\x1b[0m\"",
"start:reset": "npm run core clean:runtime && npm run start:quick -- --reset-cache",
"start:quick": "react-native start --config ./metro.config.js",
Expand All @@ -62,7 +62,8 @@
"rn-bundle": "react-native bundle",
"postrn-bundle": "patch-package --reverse --patch-dir gutenberg/packages/react-native-editor/metro-patch",
"i18n:update": "./bin/i18n-update.sh jetpack ./jetpack/projects/plugins/jetpack/extensions layout-grid ./block-experiments/blocks/layout-grid",
"i18n:update:debug": "./bin/i18n-update.sh --debug jetpack ./jetpack/projects/plugins/jetpack/extensions layout-grid ./block-experiments/blocks/layout-grid",
"i18n:update:skip-if-cache": "./bin/i18n-update.sh --skip-if-cache jetpack ./jetpack/projects/plugins/jetpack/extensions layout-grid ./block-experiments/blocks/layout-grid",
"i18n:update:test": "./bin/i18n-update.sh --path i18n-test jetpack ./jetpack/projects/plugins/jetpack/extensions layout-grid ./block-experiments/blocks/layout-grid",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an extra command I added in case we want to check the intermediate files produced when updating localizations.

"bundle": "npm run clean; npm run bundle:js",
"prebundle:js": "npm run i18n:update",
"bundle:js": "npm run bundle:android && npm run bundle:ios",
Expand Down