langsys-js-typescript 0.4.2 → 0.4.3
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 +6 -0
- package/README.md +3 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 0.4.3 - 2026-07-08
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- **The params diagnostic no longer names the wrong framework.** 0.4.2's warning hardcoded "the framework compiler (Svelte/JSX)" and the `{key}` spelling, which misdiagnoses Vue users — Vue consumes `{{ key }}`, not single braces, so a Vue developer hitting the warning was pointed at a syntax their framework never touches. The message is now framework-neutral and names both brace spellings.
|
|
6
|
+
|
|
1
7
|
## 0.4.2 - 2026-07-08
|
|
2
8
|
|
|
3
9
|
### Added
|
package/README.md
CHANGED
|
@@ -199,8 +199,9 @@ Writing `{key}` in markup fails *silently* — the base locale still looks right
|
|
|
199
199
|
|
|
200
200
|
```
|
|
201
201
|
Langsys Warning <Translate> received params with no matching placeholder in its
|
|
202
|
-
content: %count%. If you wrote {count} in markup,
|
|
203
|
-
|
|
202
|
+
content: %count%. If you wrote {count} or {{ count }} in markup, your framework's
|
|
203
|
+
template compiler substituted it before Langsys saw the text — write %count%
|
|
204
|
+
instead.
|
|
204
205
|
```
|
|
205
206
|
|
|
206
207
|
The check runs whenever the params key-set changes, so a ticking `count` won't spam the console, and it's silent in production.
|
package/dist/index.js
CHANGED
|
@@ -284,7 +284,7 @@ function warnUnmatchedParams(source, texts, params, context) {
|
|
|
284
284
|
if (!unused.length) return;
|
|
285
285
|
const keyList = unused.map((key) => `%${key}%`).join(", ");
|
|
286
286
|
logger.warn(
|
|
287
|
-
`${source} received params with no matching placeholder in its content: ${keyList}. If you wrote {${unused[0]}} in markup,
|
|
287
|
+
`${source} received params with no matching placeholder in its content: ${keyList}. If you wrote {${unused[0]}} or {{ ${unused[0]} }} in markup, your framework's template compiler substituted it before Langsys saw the text \u2014 write %${unused[0]}% instead.` + (context ? ` [${context}]` : "")
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
function interpolate(template, params, locale) {
|