@automattic/i18n-check-webpack-plugin 1.1.21 → 1.1.22
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.
- package/CHANGELOG.md +5 -0
- package/README.md +1 -0
- package/package.json +2 -2
- package/src/I18nCheckPlugin.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.22] - 2025-06-18
|
|
9
|
+
### Added
|
|
10
|
+
- Add a link to the "Known problematic code patterns" documentation in relevant error messages. [#43974]
|
|
11
|
+
|
|
8
12
|
## [1.1.21] - 2025-06-03
|
|
9
13
|
### Changed
|
|
10
14
|
- Update package dependencies. [#43734]
|
|
@@ -261,6 +265,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
261
265
|
### Added
|
|
262
266
|
- Initial release.
|
|
263
267
|
|
|
268
|
+
[1.1.22]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.21...v1.1.22
|
|
264
269
|
[1.1.21]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.20...v1.1.21
|
|
265
270
|
[1.1.20]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.19...v1.1.20
|
|
266
271
|
[1.1.19]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.18...v1.1.19
|
package/README.md
CHANGED
|
@@ -132,6 +132,7 @@ example = flag ? __( 'Flag is set', 'domain' ) : _x( 'Flag is not set', '', 'dom
|
|
|
132
132
|
```js
|
|
133
133
|
example = flag ? _x( 'Flag is set', 'Something', 'domain' ) : _x( 'Flag is not set', 'Something different', 'domain' );
|
|
134
134
|
```
|
|
135
|
+
Note that, as far as `wp i18n` is concerned, `__( 'Something', 'domain' )` and `_x( 'Something', '', 'domain' )` are the same message.
|
|
135
136
|
|
|
136
137
|
### Pruned branches and common strings
|
|
137
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/i18n-check-webpack-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "A Webpack plugin to check that WordPress i18n hasn't been mangled by Webpack optimizations.",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/i18n-check-webpack-plugin/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@automattic/jetpack-webpack-config": "workspace:*",
|
|
33
33
|
"@babel/core": "7.27.4",
|
|
34
|
-
"jest": "
|
|
34
|
+
"jest": "30.0.0",
|
|
35
35
|
"webpack": "5.94.0",
|
|
36
36
|
"webpack-cli": "6.0.1"
|
|
37
37
|
},
|
package/src/I18nCheckPlugin.js
CHANGED
|
@@ -280,7 +280,8 @@ class I18nCheckPlugin {
|
|
|
280
280
|
compilation[ this.#reportkey ].push(
|
|
281
281
|
new Error(
|
|
282
282
|
// prettier-ignore
|
|
283
|
-
`${ filename }: Translator comments have gone missing for ${ str }\n - ` + missingComments.join( '\n - ' )
|
|
283
|
+
`${ filename }: Translator comments have gone missing for ${ str }\n - ` + missingComments.join( '\n - ' ) +
|
|
284
|
+
'\nSee https://github.com/Automattic/i18n-check-webpack-plugin?tab=readme-ov-file#known-problematic-code-patterns for common causes and fixes.'
|
|
284
285
|
)
|
|
285
286
|
);
|
|
286
287
|
}
|
|
@@ -329,7 +330,8 @@ class I18nCheckPlugin {
|
|
|
329
330
|
compilation[ this.#reportkey ].push(
|
|
330
331
|
new Error(
|
|
331
332
|
`${ filename }: Optimization seems to have broken the following translation strings:\n - ` +
|
|
332
|
-
Array.from( foundEntries.values(), this.#strentry ).sort().join( '\n - ' )
|
|
333
|
+
Array.from( foundEntries.values(), this.#strentry ).sort().join( '\n - ' ) +
|
|
334
|
+
'\nSee https://github.com/Automattic/i18n-check-webpack-plugin?tab=readme-ov-file#known-problematic-code-patterns for common causes and fixes.'
|
|
333
335
|
)
|
|
334
336
|
);
|
|
335
337
|
}
|