emdash-schema-i18n 1.1.1 → 1.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.
package/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  > Dynamic schema, collections, and block types localization for **EmDash CMS** Admin UI.
4
4
 
5
- [![npm version](https://img.shields.io/badge/version-1.1.1-blue.svg)](https://github.com/NimitzUA/emdash-schema-i18n)
6
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/emdash-schema-i18n.svg)](https://www.npmjs.com/package/emdash-schema-i18n)
6
+ [![npm downloads](https://img.shields.io/npm/dm/emdash-schema-i18n.svg)](https://www.npmjs.com/package/emdash-schema-i18n)
7
+ [![license](https://img.shields.io/npm/l/emdash-schema-i18n.svg)](LICENSE)
7
8
 
8
9
  **Author:** Serhii Parshyn (<serhii@parshyn.com>)
9
10
 
@@ -23,7 +24,7 @@ In EmDash CMS, metadata for collections, fields, and block types (`label`, `labe
23
24
  - **Dictionary phrase lookup:** Easily map English phrases to any target language (`"Case studies": "Кейси"`, `"Chapter": "Розділ"`).
24
25
  - **Exact path overrides:** Override specific fields when needed (e.g. `collections.case_study.fields.title.label`).
25
26
  - **Comprehensive coverage:** Localizes collections, singular labels, field inputs, dropdown options, and block types with all their nested version fields.
26
- - **Automatic Scaffolding:** Comes with an extraction script (`npm run i18n:extract`) that scans schemas and block types to scaffold untranslated strings.
27
+ - **Automatic Scaffolding:** Scans schemas and block types to scaffold untranslated strings via CLI.
27
28
  - **Zero-config slash fallback:** Still supports automatic splitting of legacy bilingual strings (`"Українська / English"`).
28
29
 
29
30
  ---
@@ -40,7 +41,27 @@ In EmDash CMS, metadata for collections, fields, and block types (`label`, `labe
40
41
 
41
42
  ---
42
43
 
43
- ## Installation & Setup
44
+ ## Installation
45
+
46
+ Install the package from npm using your package manager of choice:
47
+
48
+ ```bash
49
+ # npm
50
+ npm install emdash-schema-i18n
51
+
52
+ # pnpm
53
+ pnpm add emdash-schema-i18n
54
+
55
+ # yarn
56
+ yarn add emdash-schema-i18n
57
+
58
+ # bun
59
+ bun add emdash-schema-i18n
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Setup & Configuration
44
65
 
45
66
  ### 1. In `astro.config.mjs`
46
67
 
@@ -134,15 +155,20 @@ export default adminDictionary;
134
155
 
135
156
  ---
136
157
 
137
- ## Scaffolding
138
-
139
- To extract all schema and block type strings automatically:
158
+ ## Scaffolding & CLI
159
+
160
+ To extract all schema and block type strings into a translation dictionary automatically:
140
161
 
141
162
  ```bash
163
+ # Run directly via npx
164
+ npx emdash-schema-i18n extract
165
+
166
+ # Or add to your package.json scripts:
167
+ # "i18n:extract": "emdash-schema-i18n extract"
142
168
  npm run i18n:extract
143
169
  ```
144
170
 
145
- The script scans `seed/seed.json` and block types, preserves all existing translations, and appends any newly created untranslated fields.
171
+ The CLI scans `seed/seed.json` and block types, preserves all existing translations, and appends any newly created untranslated fields.
146
172
 
147
173
  ---
148
174
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "slug": "schema-i18n",
3
3
  "name": "Schema & Blocks i18n",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "description": "Dynamic schema, collections, and block types localization for EmDash CMS Admin UI",
6
6
  "license": "MIT",
7
7
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emdash-schema-i18n",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Dynamic schema, collections, and block types localization for EmDash CMS Admin UI",
5
5
  "author": {
6
6
  "name": "Serhii Parshyn",