@open-xchange/vite-plugin-i18next-gettext 1.3.0 → 1.3.1
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 +4 -0
- package/dist/index.js +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { sep, relative, posix } from "node:path";
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import pm from "picomatch";
|
|
4
4
|
import converter from "gettext-converter";
|
|
5
|
-
import
|
|
5
|
+
import { parseSourceFiles } from "@open-xchange/i18next-po-parser";
|
|
6
6
|
// constants ==================================================================
|
|
7
7
|
export const PROJECT_NAME = "@open-xchange/vite-plugin-i18next-gettext";
|
|
8
8
|
// plugin =====================================================================
|
|
@@ -42,7 +42,7 @@ export default function vitePluginI18nextGettext(options) {
|
|
|
42
42
|
// parse source files and create POT files per namespace
|
|
43
43
|
async generateBundle() {
|
|
44
44
|
// parse all source files, extract translations, collect into POT catalogs
|
|
45
|
-
const catalogs = await
|
|
45
|
+
const catalogs = await parseSourceFiles({ project: options.projectName, files: options.srcFiles });
|
|
46
46
|
// warn when writing multiple POT files to same file location
|
|
47
47
|
if ((catalogs.size > 1) && !options.potFile.includes("[NAMESPACE]")) {
|
|
48
48
|
this.warn("multiple POT files written to same file location (missing placeholder '[NAMESPACE]' in option 'potFile')");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/vite-plugin-i18next-gettext",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Vite integration of i18next using gettext",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=20.18"
|
|
13
13
|
},
|
|
14
|
-
"packageManager": "yarn@4.
|
|
14
|
+
"packageManager": "yarn@4.10.3",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"lint": "tsc && tsc --project src/tsconfig.json --noEmit && eslint ."
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@open-xchange/i18next-po-parser": "^1.1
|
|
28
|
+
"@open-xchange/i18next-po-parser": "^1.2.1",
|
|
29
29
|
"gettext-converter": "^1.3.0",
|
|
30
30
|
"picomatch": "^4.0.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@open-xchange/linter-presets": "^1.9.
|
|
33
|
+
"@open-xchange/linter-presets": "^1.9.6",
|
|
34
34
|
"@types/node": "^24.5.2",
|
|
35
|
-
"eslint": "^9.
|
|
36
|
-
"jiti": "^2.
|
|
35
|
+
"eslint": "^9.36.0",
|
|
36
|
+
"jiti": "^2.6.0",
|
|
37
37
|
"premove": "^4.0.0",
|
|
38
38
|
"typescript": "^5.9.2",
|
|
39
|
-
"vite": "^7.1.
|
|
39
|
+
"vite": "^7.1.7"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vite": "^6.0.0 || ^7.0.0"
|