@automattic/i18n-check-webpack-plugin 1.1.20 → 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 +10 -0
- package/README.md +1 -0
- package/package.json +3 -3
- package/src/I18nCheckPlugin.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ 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
|
+
|
|
12
|
+
## [1.1.21] - 2025-06-03
|
|
13
|
+
### Changed
|
|
14
|
+
- Update package dependencies. [#43734]
|
|
15
|
+
|
|
8
16
|
## [1.1.20] - 2025-04-10
|
|
9
17
|
### Added
|
|
10
18
|
- Add keywords in package.json for npm search. [#42948]
|
|
@@ -257,6 +265,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
257
265
|
### Added
|
|
258
266
|
- Initial release.
|
|
259
267
|
|
|
268
|
+
[1.1.22]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.21...v1.1.22
|
|
269
|
+
[1.1.21]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.20...v1.1.21
|
|
260
270
|
[1.1.20]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.19...v1.1.20
|
|
261
271
|
[1.1.19]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.18...v1.1.19
|
|
262
272
|
[1.1.18]: https://github.com/Automattic/i18n-check-webpack-plugin/compare/v1.1.17...v1.1.18
|
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": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@automattic/jetpack-webpack-config": "workspace:*",
|
|
33
|
-
"@babel/core": "7.
|
|
34
|
-
"jest": "
|
|
33
|
+
"@babel/core": "7.27.4",
|
|
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
|
}
|