@leancodepl/intl 9.6.5 → 9.7.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [9.7.0](https://github.com/leancodepl/js_corelibrary/compare/v9.6.6...v9.7.0) (2025-12-18)
7
+
8
+ **Note:** Version bump only for package @leancodepl/intl
9
+
10
+ # Change Log
11
+
12
+ All notable changes to this project will be documented in this file. See
13
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
14
+
15
+ ## [9.6.6](https://github.com/leancodepl/js_corelibrary/compare/v9.6.5...v9.6.6) (2025-11-18)
16
+
17
+ **Note:** Version bump only for package @leancodepl/intl
18
+
19
+ # Change Log
20
+
21
+ All notable changes to this project will be documented in this file. See
22
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
23
+
6
24
  ## [9.6.5](https://github.com/leancodepl/js_corelibrary/compare/v9.6.4...v9.6.5) (2025-10-16)
7
25
 
8
26
  **Note:** Version bump only for package @leancodepl/intl
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @leancodepl/intl
2
2
 
3
- A command-line tool for managing FormatJS translations with POEditor integration. Extracts messages from TypeScript/React source files, uploads terms to POEditor, downloads translations, and compiles them for use in internationalized applications.
3
+ A command-line tool for managing FormatJS translations with POEditor integration. Extracts messages from
4
+ TypeScript/React source files, uploads terms to POEditor, downloads translations, and compiles them for use in
5
+ internationalized applications.
4
6
 
5
7
  ## Installation
6
8
 
@@ -25,34 +27,37 @@ Configure POEditor credentials using environment variables:
25
27
 
26
28
  ### `local`
27
29
 
28
- Extracts FormatJS messages from source files. When POEditor credentials are provided, merges extracted messages with downloaded translations for default language.
29
- Downloaded translations are not overridden - only new terms added during development are added to translations file.
30
- Use this command during development to fix build errors after adding new term in code.
30
+ Extracts FormatJS messages from source files. When POEditor credentials are provided, merges extracted messages with
31
+ downloaded translations for default language. Downloaded translations are not overridden - only new terms added during
32
+ development are added to translations file. Use this command during development to fix build errors after adding new
33
+ term in code.
31
34
 
32
35
  **Usage:**
36
+
33
37
  ```sh
34
38
  npx @leancodepl/intl local [options]
35
39
  ```
36
40
 
37
41
  **Options:**
42
+
38
43
  - `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
39
44
  - `-o, --output-dir <dir>` - Output directory for compiled translations (default: `"lang"`)
40
45
  - `-d, --default-language <lang>` - Default language for translations (required when using POEditor integration)
41
46
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var)
42
47
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var)
43
48
 
44
-
45
-
46
49
  ### `upload`
47
50
 
48
51
  Extracts FormatJS messages from source files and uploads both terms and default language translations to POEditor.
49
52
 
50
53
  **Usage:**
54
+
51
55
  ```sh
52
56
  npx @leancodepl/intl upload [options]
53
57
  ```
54
58
 
55
59
  **Options:**
60
+
56
61
  - `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
57
62
  - `-d, --default-language <lang>` - Default language for translations (required)
58
63
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
@@ -63,11 +68,13 @@ npx @leancodepl/intl upload [options]
63
68
  Downloads translations from POEditor for specified languages and compiles them to JSON files.
64
69
 
65
70
  **Usage:**
71
+
66
72
  ```sh
67
73
  npx @leancodepl/intl download [options]
68
74
  ```
69
75
 
70
76
  **Options:**
77
+
71
78
  - `-o, --output-dir <dir>` - Output directory for compiled translations (default: `"lang"`)
72
79
  - `-l, --languages <langs...>` - Languages to download (space-separated list, required)
73
80
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
@@ -75,14 +82,17 @@ npx @leancodepl/intl download [options]
75
82
 
76
83
  ### `sync`
77
84
 
78
- Combines upload and download operations. Uploads extracted terms and default language translations to POEditor, then downloads and compiles translations for specified languages.
85
+ Combines upload and download operations. Uploads extracted terms and default language translations to POEditor, then
86
+ downloads and compiles translations for specified languages.
79
87
 
80
88
  **Usage:**
89
+
81
90
  ```sh
82
91
  npx @leancodepl/intl sync [options]
83
92
  ```
84
93
 
85
94
  **Options:**
95
+
86
96
  - `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
87
97
  - `-o, --output-dir <dir>` - Output directory for compiled translations (default: `"lang"`)
88
98
  - `-l, --languages <langs...>` - Languages to download (space-separated list, required)
@@ -92,14 +102,17 @@ npx @leancodepl/intl sync [options]
92
102
 
93
103
  ### `diff`
94
104
 
95
- Compares locally extracted terms with POEditor terms to identify unused terms in the translation service. Helps maintain clean translation projects by finding orphaned entries.
105
+ Compares locally extracted terms with POEditor terms to identify unused terms in the translation service. Helps maintain
106
+ clean translation projects by finding orphaned entries.
96
107
 
97
108
  **Usage:**
109
+
98
110
  ```sh
99
111
  npx @leancodepl/intl diff [options]
100
112
  ```
101
113
 
102
114
  **Options:**
115
+
103
116
  - `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
104
117
  - `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
105
118
  - `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
@@ -139,6 +152,7 @@ To simplify local development tests can be used with real POEditor integration.
139
152
  ### Running Tests
140
153
 
141
154
  #### Run tests with POEditor integration
155
+
142
156
  Set the following environment variables:
143
157
 
144
158
  - `POEDITOR_API_TOKEN`: Your POEditor API token
@@ -150,5 +164,6 @@ To run specific command run only test for that command. Example for `local` comm
150
164
  POEDITOR_API_TOKEN=your_token POEDITOR_PROJECT_ID=your_project_id npx nx test intl -- local.spec.ts
151
165
  ```
152
166
 
153
- Tests will use predefined test project for extracting example messages and will save outputs in `/__tests__/testProject/lang`.
154
- Be careful with running `sync` and `upload` commands. Terms extracted from example project will be added to your POEditor project!
167
+ Tests will use predefined test project for extracting example messages and will save outputs in
168
+ `/__tests__/testProject/lang`. Be careful with running `sync` and `upload` commands. Terms extracted from example
169
+ project will be added to your POEditor project!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/intl",
3
- "version": "9.6.5",
3
+ "version": "9.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "intl": "src/bin.js"