@plop-next/i18n 0.1.0 → 0.1.2

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/README.md +62 -1
  2. package/package.json +5 -5
  3. package/CHANGELOG.md +0 -24
package/README.md CHANGED
@@ -1 +1,62 @@
1
- # i18n
1
+ # @plop-next/i18n
2
+
3
+ Internationalization plugin for plop-next.
4
+
5
+ This package adds locale registration and prompt/message localization on top of `@plop-next/core`.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @plop-next/core @plop-next/i18n
11
+ ```
12
+
13
+ or:
14
+
15
+ ```bash
16
+ yarn add @plop-next/core @plop-next/i18n
17
+ ```
18
+
19
+ ## Quick example
20
+
21
+ ```ts
22
+ import { PlopNextCore } from "@plop-next/core";
23
+ import { PlopNextI18n } from "@plop-next/i18n";
24
+
25
+ const core = new PlopNextCore();
26
+ const i18n = new PlopNextI18n(core);
27
+
28
+ i18n.registerLocale("fr", {
29
+ cli: {
30
+ selectGenerator: "Choisissez un generateur",
31
+ },
32
+ });
33
+
34
+ core.useI18n({ force: "fr" });
35
+ ```
36
+
37
+ ## Built-in locales
38
+
39
+ - `en`
40
+ - `es`
41
+ - `fr`
42
+ - `pt`
43
+ - `zh`
44
+
45
+ ## Common exports
46
+
47
+ - `PlopNextI18n`
48
+ - `I18nRegistry`
49
+ - `EN_MESSAGES`, `FR_MESSAGES`, `ES_MESSAGES`, `PT_MESSAGES`, `ZH_MESSAGES`
50
+
51
+ ## Development scripts
52
+
53
+ ```bash
54
+ yarn workspace @plop-next/i18n build
55
+ yarn workspace @plop-next/i18n test
56
+ ```
57
+
58
+ ## Links
59
+
60
+ - Documentation: [https://nivvdiy.github.io/plop-next/](https://nivvdiy.github.io/plop-next/)
61
+ - Repository: [https://github.com/nivvdiy/plop-next](https://github.com/nivvdiy/plop-next)
62
+ - Issues: [https://github.com/nivvdiy/plop-next/issues](https://github.com/nivvdiy/plop-next/issues)
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@plop-next/i18n",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Internationalization utilities for plop-next",
5
5
  "bugs": {
6
- "url": "https://github.com/nivvdiy/plop-next/issues"
6
+ "url": "https://github.com/Nivvdiy/plop-next/issues"
7
7
  },
8
8
  "license": "MIT",
9
9
  "author": "Nivvdiy <nivvdiy@example.com>",
@@ -14,7 +14,7 @@
14
14
  "repository": {
15
15
  "directory": "packages/i18n",
16
16
  "type": "git",
17
- "url": "https://github.com/nivvdiy/plop-next.git"
17
+ "url": "https://github.com/Nivvdiy/plop-next.git"
18
18
  },
19
19
  "scripts": {
20
20
  "build": "tsup src/index.ts --format esm --dts",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@inquirer/i18n": "^1.0.2",
26
- "@plop-next/core": "0.1.0",
26
+ "@plop-next/core": "workspace:*",
27
27
  "dlv": "^1.1.3",
28
28
  "resolve": "^1.22.11",
29
29
  "tinyglobby": "^0.2.15"
@@ -39,4 +39,4 @@
39
39
  },
40
40
  "type": "module",
41
41
  "types": "dist/index.d.ts"
42
- }
42
+ }
package/CHANGELOG.md DELETED
@@ -1,24 +0,0 @@
1
- # @plop-next/i18n
2
-
3
- ## 0.1.0
4
-
5
- ### Minor Changes
6
-
7
- - "@plop-next/cli": minor
8
-
9
- "@plop-next/core": minor
10
-
11
- "@plop-next/i18n": minor
12
-
13
- Refactor internal generator prompt handling from generator-select to generatorList across cli, core, and i18n.
14
-
15
- Reserve generatorList for internal generator selection and improve validation and error messages.
16
-
17
- Align theme selector flow and generated scaffold theme slots with generatorList.
18
-
19
- Update i18n/theme integrations and tests to keep behavior consistent.
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies
24
- - @plop-next/core@0.1.0