@powerlines/plugin-i18next 0.1.575 → 0.1.577
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/README.md +30 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -74,6 +74,36 @@ A Powerlines plugin to generate project code with [i18next](https://www.i18next.
|
|
|
74
74
|
|
|
75
75
|
<!-- END doctoc -->
|
|
76
76
|
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- Internationalization with i18next for Powerlines projects
|
|
80
|
+
- Generates i18next TypeScript resources (`Resources` interface and `CustomTypeOptions` declaration) from parsed locale files during the build
|
|
81
|
+
- Supports namespace merging with a warning when top-level keys are not namespaces
|
|
82
|
+
- Resource types under `./types/i18n` and options via `./types/plugin` (`I18NextPluginOptions`)
|
|
83
|
+
|
|
84
|
+
## Usage
|
|
85
|
+
|
|
86
|
+
Install the plugin:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pnpm add @powerlines/plugin-i18next
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Register it in `powerlines.config.ts`:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { defineConfig } from "powerlines";
|
|
96
|
+
import { plugin as i18next } from "@powerlines/plugin-i18next";
|
|
97
|
+
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
plugins: [
|
|
100
|
+
i18next()
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Run the Powerlines build for your project to activate the plugin.
|
|
106
|
+
|
|
77
107
|
## Installing
|
|
78
108
|
|
|
79
109
|
Using [pnpm](http://pnpm.io):
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.cjs";
|
|
2
1
|
import { n as ResourceContent, t as Resource } from "../i18n-BbaDg6Ol.cjs";
|
|
2
|
+
import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.cjs";
|
|
3
3
|
export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig, Resource, ResourceContent };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.mjs";
|
|
2
1
|
import { n as ResourceContent, t as Resource } from "../i18n-BbaDg6Ol.mjs";
|
|
2
|
+
import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.mjs";
|
|
3
3
|
export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig, Resource, ResourceContent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-i18next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.577",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to use i18next for internationalization.",
|
|
6
6
|
"keywords": ["i18next", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -104,19 +104,19 @@
|
|
|
104
104
|
"typings": "dist/index.d.mts",
|
|
105
105
|
"files": ["dist/**/*"],
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@stryke/fs": "^0.33.
|
|
108
|
-
"@stryke/path": "^0.29.
|
|
109
|
-
"@stryke/type-checks": "^0.6.
|
|
110
|
-
"@stryke/types": "^0.12.
|
|
107
|
+
"@stryke/fs": "^0.33.119",
|
|
108
|
+
"@stryke/path": "^0.29.44",
|
|
109
|
+
"@stryke/type-checks": "^0.6.50",
|
|
110
|
+
"@stryke/types": "^0.12.45",
|
|
111
111
|
"defu": "^6.1.7",
|
|
112
|
-
"i18next-cli": "^1.80.
|
|
113
|
-
"i18next-resources-for-ts": "^2.1.
|
|
114
|
-
"powerlines": "^0.47.
|
|
112
|
+
"i18next-cli": "^1.80.5",
|
|
113
|
+
"i18next-resources-for-ts": "^2.1.2",
|
|
114
|
+
"powerlines": "^0.47.218"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
117
|
+
"@powerlines/plugin-plugin": "^0.12.631",
|
|
118
118
|
"@types/node": "^25.9.9"
|
|
119
119
|
},
|
|
120
120
|
"publishConfig": { "access": "public" },
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "c71daefe09bbd0d26190c3096e0a30120d3a244b"
|
|
122
122
|
}
|