@esgettext/tools 1.3.2 → 1.3.4
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/dist/commands/convert.js
CHANGED
|
@@ -194,7 +194,8 @@ class Convert {
|
|
|
194
194
|
filename = undefined;
|
|
195
195
|
}
|
|
196
196
|
if (typeof filename !== 'undefined') {
|
|
197
|
-
|
|
197
|
+
const b = fs.readFileSync(filename);
|
|
198
|
+
return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
|
|
198
199
|
}
|
|
199
200
|
// Must read from standard input.
|
|
200
201
|
const stdinFd = 0;
|
|
@@ -204,7 +205,8 @@ class Convert {
|
|
|
204
205
|
while ((bytesRead = fs.readSync(stdinFd, buffer, 0, buffer.length, null)) > 0) {
|
|
205
206
|
chunks.push(Buffer.from(buffer.subarray(0, bytesRead)));
|
|
206
207
|
}
|
|
207
|
-
|
|
208
|
+
const b = Buffer.concat(chunks);
|
|
209
|
+
return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
|
|
208
210
|
}
|
|
209
211
|
catch (error) {
|
|
210
212
|
if (typeof filename === 'undefined') {
|
package/dist/commands/init.js
CHANGED
|
@@ -669,7 +669,7 @@ class Init {
|
|
|
669
669
|
message: gtx._x("(Boolean) options to invoke '{tool}' with", {
|
|
670
670
|
tool: 'msgmerge',
|
|
671
671
|
}),
|
|
672
|
-
default: '--
|
|
672
|
+
default: '--update --previous',
|
|
673
673
|
}),
|
|
674
674
|
msgfmt: yield (0, prompts_1.input)({
|
|
675
675
|
message: gtx._x("The '{tool}' program to use:", { tool: 'msgfmt' }),
|
package/dist/commands/install.js
CHANGED
|
@@ -183,7 +183,8 @@ class Install {
|
|
|
183
183
|
}));
|
|
184
184
|
}
|
|
185
185
|
const input = (0, fs_1.readFileSync)(inFile);
|
|
186
|
-
const
|
|
186
|
+
const b = input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength);
|
|
187
|
+
const catalog = (0, runtime_1.parseMoCatalog)(b);
|
|
187
188
|
const json = JSON.stringify(catalog);
|
|
188
189
|
(0, fs_1.writeFile)(outFile, json, err => {
|
|
189
190
|
if (err) {
|
|
@@ -208,7 +209,8 @@ class Install {
|
|
|
208
209
|
}));
|
|
209
210
|
}
|
|
210
211
|
const input = (0, fs_1.readFileSync)(inFile);
|
|
211
|
-
const
|
|
212
|
+
const b = input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength);
|
|
213
|
+
const catalog = (0, runtime_1.parseMoCatalog)(b);
|
|
212
214
|
const msgs = {};
|
|
213
215
|
for (const msgid in catalog.entries) {
|
|
214
216
|
const msgstr = catalog.entries[msgid];
|
package/dist/package.js
CHANGED
package/dist/parser/parser.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esgettext/tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Gettext-like po creation and manipulation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gettext",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@babel/parser": "^7.24.7",
|
|
106
106
|
"@babel/traverse": "^7.24.7",
|
|
107
|
-
"@esgettext/runtime": "^1.3.
|
|
107
|
+
"@esgettext/runtime": "^1.3.4",
|
|
108
108
|
"@inquirer/prompts": "^5.0.6",
|
|
109
109
|
"@npmcli/package-json": "^5.2.0",
|
|
110
110
|
"@valibot/i18n": "^0.15.0",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"valibot": "^0.31.1",
|
|
115
115
|
"yargs": "^17.7.2"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "b874712f63ffbc0dfeebd5d23a2fdeafd232857b"
|
|
118
118
|
}
|