@gjsify/vite-plugin-gettext 0.42.0 → 0.43.0
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/lib/xgettext.js +5 -0
- package/package.json +3 -2
package/lib/xgettext.js
CHANGED
|
@@ -191,6 +191,11 @@ async function extractStrings(files, options, pluginName) {
|
|
|
191
191
|
// Add language-specific settings
|
|
192
192
|
switch (group) {
|
|
193
193
|
case 'js':
|
|
194
|
+
// Blueprint deliberately shares the JavaScript lexer: xgettext has no Blueprint
|
|
195
|
+
// parser at all (0.26 rejects `--language=Blueprint` outright), and Blueprint's
|
|
196
|
+
// `_("…")` / `C_("ctx", "…")` are lexically calls, which is exactly what the
|
|
197
|
+
// JavaScript scanner looks for. Measured on a .blp: all marked strings come out,
|
|
198
|
+
// unmarked literals stay out.
|
|
194
199
|
case 'blp':
|
|
195
200
|
baseArgs.push('--language=JavaScript');
|
|
196
201
|
baseArgs.push(...keywords.map((k) => `--keyword=${k}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/vite-plugin-gettext",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Gettext PO/MO/JSON pipeline for Vite / Rollup / Rolldown — extract via xgettext, compile via msgfmt, JSON for browser targets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/gjsify/gjsify.git"
|
|
25
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
26
|
+
"directory": "packages/infra/vite-plugin-gettext"
|
|
26
27
|
},
|
|
27
28
|
"bugs": {
|
|
28
29
|
"url": "https://github.com/gjsify/gjsify/issues"
|