@leancodepl/intl 9.5.2 → 9.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.
- package/CHANGELOG.md +18 -0
- package/README.md +8 -8
- package/package.json +1 -1
- package/src/bin.js +4 -4
- package/src/bin.js.map +1 -1
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.6.0](https://github.com/leancodepl/js_corelibrary/compare/v9.5.3...v9.6.0) (2025-09-05)
|
|
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.5.3](https://github.com/leancodepl/js_corelibrary/compare/v9.5.2...v9.5.3) (2025-08-26)
|
|
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.5.2](https://github.com/leancodepl/js_corelibrary/compare/v9.5.1...v9.5.2) (2025-08-13)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @leancodepl/intl
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ npx @leancodepl/intl local [options]
|
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
**Options:**
|
|
38
|
-
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src
|
|
38
|
+
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
|
|
39
39
|
- `-o, --output-dir <dir>` - Output directory for compiled translations (default: `"lang"`)
|
|
40
40
|
- `-d, --default-language <lang>` - Default language for translations (required when using POEditor integration)
|
|
41
41
|
- `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var)
|
|
@@ -53,7 +53,7 @@ npx @leancodepl/intl upload [options]
|
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
**Options:**
|
|
56
|
-
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src
|
|
56
|
+
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
|
|
57
57
|
- `-d, --default-language <lang>` - Default language for translations (required)
|
|
58
58
|
- `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
|
|
59
59
|
- `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
|
|
@@ -83,7 +83,7 @@ npx @leancodepl/intl sync [options]
|
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
**Options:**
|
|
86
|
-
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src
|
|
86
|
+
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
|
|
87
87
|
- `-o, --output-dir <dir>` - Output directory for compiled translations (default: `"lang"`)
|
|
88
88
|
- `-l, --languages <langs...>` - Languages to download (space-separated list, required)
|
|
89
89
|
- `-d, --default-language <lang>` - Default language for translations (required)
|
|
@@ -100,7 +100,7 @@ npx @leancodepl/intl diff [options]
|
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
**Options:**
|
|
103
|
-
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src
|
|
103
|
+
- `-s, --src-pattern <pattern>` - Source file pattern for extraction (default: `"src/**/!(*.d).{ts,tsx}"`)
|
|
104
104
|
- `-t, --poeditor-api-token <token>` - POEditor API token (overrides `POEDITOR_API_TOKEN` env var, required)
|
|
105
105
|
- `-p, --poeditor-project-id <id>` - POEditor project ID (overrides `POEDITOR_PROJECT_ID` env var, required)
|
|
106
106
|
|
|
@@ -114,19 +114,19 @@ Configure intl commands as Nx target in your `project.json`. Example configurati
|
|
|
114
114
|
"defaultConfiguration": "local",
|
|
115
115
|
"configurations": {
|
|
116
116
|
"local": {
|
|
117
|
-
"command": "npx @leancodepl/intl local --src-pattern 'src
|
|
117
|
+
"command": "npx @leancodepl/intl local --src-pattern 'src/**/!(*.d).{ts,tsx}' --output-dir '{projectRoot}/lang' --default-language pl --poeditor-project-id 123456"
|
|
118
118
|
},
|
|
119
119
|
"download": {
|
|
120
120
|
"command": "npx @leancodepl/intl download --output-dir '{projectRoot}/lang' --languages pl en --poeditor-project-id 123456"
|
|
121
121
|
},
|
|
122
122
|
"diff": {
|
|
123
|
-
"command": "npx @leancodepl/intl diff --src-pattern 'src
|
|
123
|
+
"command": "npx @leancodepl/intl diff --src-pattern 'src/**/!(*.d).{ts,tsx}' --poeditor-project-id 123456"
|
|
124
124
|
},
|
|
125
125
|
"upload": {
|
|
126
|
-
"command": "npx @leancodepl/intl upload --src-pattern 'src
|
|
126
|
+
"command": "npx @leancodepl/intl upload --src-pattern 'src/**/!(*.d).{ts,tsx}' --default-language pl --poeditor-project-id 123456"
|
|
127
127
|
},
|
|
128
128
|
"sync": {
|
|
129
|
-
"command": "npx @leancodepl/intl sync --src-pattern 'src
|
|
129
|
+
"command": "npx @leancodepl/intl sync --src-pattern 'src/**/!(*.d).{ts,tsx}' --output-dir '{projectRoot}/lang' --languages pl en --default-language pl --poeditor-project-id 123456"
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
package/package.json
CHANGED
package/src/bin.js
CHANGED
|
@@ -18,7 +18,7 @@ commander_1.program.name("intl").description("CLI tool for managing formatjs tra
|
|
|
18
18
|
commander_1.program
|
|
19
19
|
.command("local")
|
|
20
20
|
.description("Extract, download from translation service, and compile formatjs translations locally")
|
|
21
|
-
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src
|
|
21
|
+
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src/**/!(*.d).{ts,tsx}")
|
|
22
22
|
.option("-o, --output-dir <dir>", "Output directory for compiled translations", "lang")
|
|
23
23
|
.option("-d, --default-language <lang>", "Default language for translations")
|
|
24
24
|
.option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)")
|
|
@@ -42,7 +42,7 @@ commander_1.program
|
|
|
42
42
|
commander_1.program
|
|
43
43
|
.command("upload")
|
|
44
44
|
.description("Extract terms and upload to translation service")
|
|
45
|
-
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src
|
|
45
|
+
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src/**/!(*.d).{ts,tsx}")
|
|
46
46
|
.option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)")
|
|
47
47
|
.option("-p, --poeditor-project-id <id>", "POEditor project ID", value => parseInt(value, 10))
|
|
48
48
|
.option("-d, --default-language <lang>", "Default language for translations")
|
|
@@ -86,7 +86,7 @@ commander_1.program
|
|
|
86
86
|
commander_1.program
|
|
87
87
|
.command("sync")
|
|
88
88
|
.description("Upload local changes and download updated translations")
|
|
89
|
-
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src
|
|
89
|
+
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src/**/!(*.d).{ts,tsx}")
|
|
90
90
|
.option("-o, --output-dir <dir>", "Output directory for compiled translations", "lang")
|
|
91
91
|
.option("-l, --languages <langs...>", "Languages to download")
|
|
92
92
|
.option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)")
|
|
@@ -110,7 +110,7 @@ commander_1.program
|
|
|
110
110
|
commander_1.program
|
|
111
111
|
.command("diff")
|
|
112
112
|
.description("Compare local terms with translation service to find unused terms")
|
|
113
|
-
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src
|
|
113
|
+
.option("-s, --src-pattern <pattern>", "Source file pattern for extraction", "src/**/!(*.d).{ts,tsx}")
|
|
114
114
|
.option("-t, --poeditor-api-token <token>", "POEditor API token (can also use POEDITOR_API_TOKEN env var)")
|
|
115
115
|
.option("-p, --poeditor-project-id <id>", "POEditor project ID", value => parseInt(value, 10))
|
|
116
116
|
.action(async (options) => {
|
package/src/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../../packages/intl/src/bin.ts"],"names":[],"mappings":";;;AAEA,yCAAmC;AACnC,+BAA0B;AAC1B,0CAAgE;AAChE,kDAA4E;AAC5E,4CAAmE;AACnE,0CAAgE;AAChE,8CAAsE;AACtE,iDAA6C;AAC7C,+EAA2E;AAE3E,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,gBAAgB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,iBAAiB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA;AAEF,mBAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,uEAAuE,CAAC,CAAA;AAEzG,mBAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,uFAAuF,CAAC;KACpG,MAAM,CAAC,6BAA6B,EAAE,oCAAoC,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../../packages/intl/src/bin.ts"],"names":[],"mappings":";;;AAEA,yCAAmC;AACnC,+BAA0B;AAC1B,0CAAgE;AAChE,kDAA4E;AAC5E,4CAAmE;AACnE,0CAAgE;AAChE,8CAAsE;AACtE,iDAA6C;AAC7C,+EAA2E;AAE3E,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,gBAAgB,EAAE,MAA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