Skip to content
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

Blocks: i18n: Translatable strings from *.min.js #21343

Closed
yuliyan opened this issue Oct 8, 2021 · 11 comments
Closed

Blocks: i18n: Translatable strings from *.min.js #21343

yuliyan opened this issue Oct 8, 2021 · 11 comments
Labels
[Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Focus] i18n Internationalization / i18n, adaptation to different languages [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Type] Bug When a feature is broken and / or not performing as intended

Comments

@yuliyan
Copy link
Member

yuliyan commented Oct 8, 2021

Impacted plugin

Jetpack

Steps to Reproduce

  1. Download Jetpack from https://wordpress.org/plugins/jetpack/
  2. Run wp i18n make-pot .
  3. Inspect the generated POT file to confirm translatable strings from *.min.js files are missing.
  4. Remove the .min suffix from the filename of any of the JS files that contain translatable strings (e.g. _inc/blocks/editor.min.js) and run wp i18n make-pot . again.
  5. Inspect the generated POT file and confirm the strings from that file are now included in the POT.

A clear and concise description of what you expected to happen.

AFAIK, the plugin directory is using the same (or pretty similar) approach to wp i18n make-pot . to generate POT file for a plugin and import into its translate.wordpress.org project. By default, the make-pot command excludes some files and directories from scanning, including *.min.js files.
As a result:

  • Strings referenced only in such JS files that were previously extracted and translated on translate.wordpress.org, became obsolete.
  • Language files for .min.js are no longer being generated, because none of the strings have reference to such file.

Other information

.min suffix introduced in: be80d26
Related issue: #21204

@yuliyan yuliyan added [Type] Bug When a feature is broken and / or not performing as intended [Focus] i18n Internationalization / i18n, adaptation to different languages [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Oct 8, 2021
@jeherve
Copy link
Member

jeherve commented Oct 8, 2021

This also came up in:

@jeherve jeherve changed the title i18n: Translatable strings from *.min.js Blocks: i18n: Translatable strings from *.min.js Oct 8, 2021
@kraftbj
Copy link
Contributor

kraftbj commented Oct 8, 2021

Noting that we switched to the .min.js file extension to prevent the built files from being handled by wp.com's JS minimization script, which started breaking when we dropped IE 11 (thus output into more modern JS).

@kraftbj
Copy link
Contributor

kraftbj commented Oct 8, 2021

This is apparently expected behavior for the make-pot CLI command:

[--exclude=]
[...] The following files and folders are always excluded: node_modules, .git, .svn, .CVS, .hg, vendor, *.min.js.

from https://developer.wordpress.org/cli/commands/i18n/make-pot/

I have in my mind that we checked GlotPress and confirmed the strings were there? If so, make-pot isn't the issue (I wouldn't think). If not, then we need to figure out something—either via make-pot or Systems re the wp.com need for .min.js that pushed us this way.

@yuliyan
Copy link
Member Author

yuliyan commented Oct 8, 2021

@kraftbj, I was able to get make-pot pick up the strings from the JS files locally by simply renaming the file from editor.min.js to editor.js, which makes me think that the min suffix is what's causing it.

Previously, there was a problem with the translation function names not being preserved in the minified output, but that got resolved in 1e56ff3 and by inspecting the plugin files I can confirm that __ function names are indeed preserved in the output files.

I'm not familiar with the reason why .min.js is needed on WP.com, but if that's the case, a possible workaround could be to have two copies of the same JS files with different filenames in the release, i.e. to have both editor.min.js and editor.js.

@kraftbj
Copy link
Contributor

kraftbj commented Oct 8, 2021

I'm not familiar with the reason why .min.js is needed on WP.com

WordPress.com has an automatically minimizing process for JS upon being served to a client. That process assumes ES5 code. When we dropped IE 11 support, we started shipping ES6 code which WordPress.com's minimizing function chokes on (thus breaking blocks on WordPress.com with the same code committed there as in Jetpack).

Systems said that we should update the file name to min.js, which the server ignores for that script.

Duplication is an okay immediate solution to get translations back for customers that we have control over, but I don't like it as a long-term solution as it doubles the JS payload we're shipping to customers with no benefit (beyond hacking around ecosystem issues).

tl;dr duplicate files is okay immediately but I'll task my team (or myself) to investigate further the make-pot or Systems routes towards a different solution.

@kraftbj kraftbj added this to the jetpack/10.2.1 milestone Oct 8, 2021
@anomiex
Copy link
Contributor

anomiex commented Oct 11, 2021

but I don't like it as a long-term solution as it doubles the JS payload we're shipping to customers with no benefit (beyond hacking around ecosystem issues).

"Shipping to customers" as in including both the minified and non-minifed built JS files in the Jetpack plugin? Or "shipping to customers" thinking that visitors to the site would get served both copies? To be clear, the latter would not happen.

@kraftbj
Copy link
Contributor

kraftbj commented Oct 11, 2021

Confirm, the latter wouldn't happen. I'd not want to ship too much extra to sites in the plugin upgrade routine.

@samiff
Copy link
Contributor

samiff commented Oct 15, 2021

Related: #21367

@jeherve jeherve modified the milestones: jetpack/10.2.1, jetpack/10.3 Oct 19, 2021
anomiex added a commit that referenced this issue Oct 20, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: #21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: #21004
[6]: #20484
[7]: #21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: #20926
[10]: #21349
anomiex added a commit that referenced this issue Oct 20, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: #21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: #21004
[6]: #20484
[7]: #21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: #20926
[10]: #21349
@jeherve jeherve removed this from the jetpack/10.3 milestone Oct 25, 2021
anomiex added a commit that referenced this issue Oct 25, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: #21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: #21004
[6]: #20484
[7]: #21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: #20926
[10]: #21349
[11]: #16549
anomiex added a commit that referenced this issue Oct 28, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: #21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: #21004
[6]: #20484
[7]: #21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: #20926
[10]: #21349
[11]: #16549
kraftbj pushed a commit that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: #21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: #21004
[6]: #20484
[7]: #21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: #20926
[10]: #21349
[11]: #16549
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: Automattic/jetpack#21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: Automattic/jetpack#21004
[6]: Automattic/jetpack#20484
[7]: Automattic/jetpack#21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: Automattic/jetpack#20926
[10]: Automattic/jetpack#21349
[11]: Automattic/jetpack#16549

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1409697994
matticbot pushed a commit to Automattic/jetpack-connection-ui that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: Automattic/jetpack#21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: Automattic/jetpack#21004
[6]: Automattic/jetpack#20484
[7]: Automattic/jetpack#21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: Automattic/jetpack#20926
[10]: Automattic/jetpack#21349
[11]: Automattic/jetpack#16549

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1409697994
matticbot pushed a commit to Automattic/jetpack-identity-crisis that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: Automattic/jetpack#21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: Automattic/jetpack#21004
[6]: Automattic/jetpack#20484
[7]: Automattic/jetpack#21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: Automattic/jetpack#20926
[10]: Automattic/jetpack#21349
[11]: Automattic/jetpack#16549

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1409697994
matticbot pushed a commit to Automattic/jetpack-backup-plugin that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: Automattic/jetpack#21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: Automattic/jetpack#21004
[6]: Automattic/jetpack#20484
[7]: Automattic/jetpack#21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: Automattic/jetpack#20926
[10]: Automattic/jetpack#21349
[11]: Automattic/jetpack#16549

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1409697994
matticbot pushed a commit to Automattic/jetpack-production that referenced this issue Nov 1, 2021
This is intended to (eventually) take care of several issues in the
monorepo:

* Calypso [doesn't use their own calyspo-build webpack config][1],
  which means it's not likely to be well-maintained.
  * It needs a hack to [work with monorepo packages][2].
  * And another to [get correct image paths][3].
  * And it [tries to redefine NODE_ENV, producing warnings][4].
  * And we have to [override a weird default everywhere][5].
* We have to [name our JS files with ".min.js"][6] to avoid their being
  broken by a wpcom minifier, but WordPress.org's translation
  infrastructure [ignores such files][7].
* The plugin used to fix the above [had to be forked][8], adds 772K to
  the plugin, and results in spurious changes in TC builds.
* The way translations are [being loaded for lazy-loaded bundles][9] is
  pretty hacky and doesn't lazy-load them.
* We can't use any cache busting for the lazy-loaded bundles, because
  embedding hashes in the filename breaks the link to the translation
  file and putting it in a query parameter [breaks building the RTL css][10].
* Webpack's minification is [losing translator comments][11].
* Calypso-build has a lot of peer dependencies we don't actually need.
  Not everything we have uses sass or postcss, and we have our own
  infrastructure for jest, react, and so on. Currently we just ignore
  the 76 warnings from that.

This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.

[1]: Automattic/jetpack#21004 (comment)
[2]: Automattic/wp-calypso#53353
[3]: Automattic/wp-calypso#56111
[4]: Automattic/wp-calypso#56291
[5]: Automattic/jetpack#21004
[6]: Automattic/jetpack#20484
[7]: Automattic/jetpack#21343
[8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35
[9]: Automattic/jetpack#20926
[10]: Automattic/jetpack#21349
[11]: Automattic/jetpack#16549

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1409697994
@yuliyan
Copy link
Member Author

yuliyan commented Nov 2, 2021

Do you have any update on this issue?

@jeherve
Copy link
Member

jeherve commented Nov 2, 2021

@yuliyan We've been discussing potential solutions here:
p9dueE-3Gb-p2

We'd be happy to have you chime in on that discussion!

anomiex added a commit that referenced this issue Nov 15, 2021
We renamed them to `.min.js` to avoid a broken wpcom minifier. But now
that we have `Assets::register_script()` to automatically add
`?minify=false` to them, we can put them back at the `.js` names.

Also we can again remove the hashes from the chunk filenames now that
`@automattic/webpack-rtl-plugin` is fixed.

This should fix #19752, and get us closer on #21343. We've got other
files being processed by gulp instead of webpack that may need attention
(or maybe just conversion to being processed by Webpack) before we can
say #21343 is complete.
@anomiex
Copy link
Contributor

anomiex commented Jan 6, 2022

I think that #21748 fixed this entirely after all. As far as I can tell none of the files that were being processed by gulp use @wordpress/i18n (and now we've switched them to being processed by Webpack anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Focus] i18n Internationalization / i18n, adaptation to different languages [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

5 participants