@open-xchange/vite-plugin-i18next-gettext 1.5.0 → 1.6.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -45
  3. package/package.json +2 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## `1.6.0` – 2026-Apr-20
4
+
5
+ ### _PACKAGE DEPRECATED_
6
+
7
+ Use [@open-xchange/rolldown-plugin-i18next-gettext](https://www.npmjs.com/package/@open-xchange/rolldown-plugin-i18next-gettext) instead.
8
+
3
9
  ## `1.5.0` – 2026-Apr-09
4
10
 
5
11
  - chore: switch to `tsdown` for building packages
package/README.md CHANGED
@@ -1,47 +1,3 @@
1
1
  # @open-xchange/vite-plugin-i18next-gettext
2
2
 
3
- A Vite plugin that allows using [i18next](https://www.i18next.com/) in source code with gettext's `.po` and `.pot` files under the hood.
4
-
5
- This plugin has the following responsibilities:
6
-
7
- - Vite's development server will convert `.po` files imported in source code to i18next-compatible JSON data on-the-fly.
8
- - When building the project, `.po` files will be converted to and written as i18next-compatible JSON files into the bundle.
9
- - When building the project, the source code will be scanned for translation strings (`t` function calls), and a `.pot` file containing all strings will be generated into the output directory.
10
-
11
- This plugin is designed to work together with the i18next plugin [i18next-resources-to-backend](https://github.com/i18next/i18next-resources-to-backend) that will load the `.po` files into the i18next instance.
12
-
13
- ## Usage
14
-
15
- Add the plugin to your Vite configuration:
16
-
17
- ```ts
18
- // vite.config.ts
19
-
20
- import { defineConfig } from 'vite' // or 'vitest/config'
21
- import i18nextPlugin from '@open-xchange/vite-plugin-i18next-gettext'
22
-
23
- export default defineConfig(() => {
24
-
25
- // ...
26
-
27
- plugins: [
28
- // ...
29
-
30
- i18nextPlugin({
31
- poFiles: 'i18n/*.po',
32
- srcFiles: 'src/**/*.{js,jsx,ts,tsx}',
33
- potFile: 'dist/[NAMESPACE].pot',
34
- projectName: 'My Project',
35
- }),
36
- ],
37
- })
38
- ```
39
-
40
- ### Options
41
-
42
- | Name | Type | Default | Description |
43
- | - | - | - | - |
44
- | `poFiles` | `string\|string[]` | _required_ | Glob pattern(s) for all PO files containing the translations. |
45
- | `srcFiles` | `string\|string[]` | _required_ | Glob pattern(s) for all source files to be scanned for UI strings. |
46
- | `potFile` | `string` | _required_ | Path to the POT files to be generated when building the project, relative to the build output directory. Should contain the placeholder `[NAMESPACE]` if the project contains translation strings in different i18next namespaces. |
47
- | `projectName` | `string` | _required_ | The project name to be inserted into the POT file under the key 'Project-Id-Version'. May contain the placeholder `[NAMESPACE]` |
3
+ _Package is deprecated._ Use [@open-xchange/rolldown-plugin-i18next-gettext](https://www.npmjs.com/package/@open-xchange/rolldown-plugin-i18next-gettext) instead.
package/package.json CHANGED
@@ -1,52 +1,11 @@
1
1
  {
2
2
  "name": "@open-xchange/vite-plugin-i18next-gettext",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Vite integration of i18next using gettext",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://gitlab.open-xchange.com/fspd/commons/plugins.git",
8
8
  "directory": "packages/vite-plugin-i18next-gettext"
9
9
  },
10
- "license": "MIT",
11
- "engines": {
12
- "node": ">=20.18"
13
- },
14
- "type": "module",
15
- "exports": {
16
- ".": "./dist/index.mjs",
17
- "./package.json": "./package.json"
18
- },
19
- "files": [
20
- "dist",
21
- "CHANGELOG.*"
22
- ],
23
- "dependencies": {
24
- "@open-xchange/i18next-po-parser": "^1.2.5",
25
- "gettext-converter": "^1.3.1",
26
- "picomatch": "^4.0.4"
27
- },
28
- "devDependencies": {
29
- "@types/picomatch": "^4.0.3",
30
- "@vitest/coverage-v8": "^4.1.3",
31
- "i18next": "^26.0.4",
32
- "vite": "^8.0.8",
33
- "vite-v6": "npm:vite@^8.0.8",
34
- "vite-v7": "npm:vite@^8.0.8",
35
- "vite-v8": "npm:vite@^8.0.8",
36
- "vitest": "^4.1.3",
37
- "@open-xchange/linter-presets": "^1.22.0",
38
- "@open-xchange/tsconfig": "^0.0.2",
39
- "@open-xchange/vitest-plugin-extended": "^1.6.0",
40
- "@open-xchange/vitest-vite-plugin-utils": "^0.0.2"
41
- },
42
- "peerDependencies": {
43
- "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
44
- },
45
- "scripts": {
46
- "build": "tsdown",
47
- "coverage": "vitest run --coverage",
48
- "lint": "tsc && tsc --project src && tsc --project test && eslint .",
49
- "test": "vitest run",
50
- "verify": "pnpm build && pnpm lint && pnpm test"
51
- }
10
+ "license": "MIT"
52
11
  }