-
Notifications
You must be signed in to change notification settings - Fork 57
Use i18n update script when generating JS bundle #4411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
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 6e241e1
Remove makepot commands and no longer needed scripts
fluiddot 3e66063
Remove translation files of jetpack and layout-grid
fluiddot 6693dda
Use translation files from i18n-cache folder
fluiddot 5405d5d
Update localization strings files
fluiddot 109eb44
Merge branch 'add/i18n-update-script' into add/use-i18n-update-on-bundle
fluiddot b015a64
Update localization strings files
fluiddot 7d5a272
Merge branch 'add/i18n-update-script' into add/use-i18n-update-on-bundle
fluiddot 3fc857a
Update android-build-image docker image version
fluiddot 5d65aff
Add skip if cache option to i18n update script
fluiddot 3a68754
Update .gitignore
fluiddot 3c3bb03
Attach i18n update to postinstall command
fluiddot b423c75
Extract update gutenberg i18n cache to a function
fluiddot f89eb16
Fix i18n update upon dependencies install
fluiddot fb9e3f5
Update i18n cache path in CircleCI jobs
fluiddot 45422de
Update gb-mobile-image docker image version
fluiddot 9af4de6
Add i18n check cache script
fluiddot 535b7ee
Update script description
fluiddot 0832eda
Update Gutenberg ref
fluiddot 144a07d
Add WP_CLI_ALLOW_ROOT env variable to pipeline
fluiddot 9c998ce
Update gb-mobile-image version for testing
fluiddot c68a1b3
Update Gutenberg ref
fluiddot 40fa739
Use latest gb-mobile-image version
fluiddot b0c47c9
Update Gutenberg ref
fluiddot 7350438
Merge branch 'develop' into add/use-i18n-update-on-bundle
fluiddot 2f735a6
Remove wrong parameter validation
fluiddot c44a212
Remove unnecessary plugin_name parameter
fluiddot 6e81af1
Update Gutenberg ref with merge commit
fluiddot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Attach i18n update to postinstall command
- Loading branch information
commit 3c3bb0377e6aa0bbe96e73b4ef9db9ee3ab4ea28
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", | ||
| "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", | ||
|
|
@@ -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", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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).