cc-translate 1.3.2 → 1.3.3
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 +77 -32
- package/index.d.ts +3 -3
- package/index.js +296 -132
- package/lib/cache/index.d.ts +8 -4
- package/lib/cache/index.d.ts.map +1 -1
- package/lib/cache/index.js +77 -12
- package/lib/translation-format.d.ts +5 -0
- package/lib/translation-format.d.ts.map +1 -0
- package/lib/translation-format.js +31 -0
- package/lib/translation-metadata.d.ts +4 -1
- package/lib/translation-metadata.d.ts.map +1 -1
- package/lib/translation-metadata.js +49 -22
- package/lib/translation-response.d.ts +7 -0
- package/lib/translation-response.d.ts.map +1 -1
- package/lib/translation-response.js +122 -0
- package/package.json +3 -2
- package/types/index.d.ts +20 -4
- package/types/index.d.ts.map +1 -1
- package/CHANGELOG.md +0 -78
package/CHANGELOG.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [Unreleased]
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
|
|
9
|
-
- Source JSON files can define optional `_meta.context` for file-wide
|
|
10
|
-
business context and `_meta.noTranslate` for words or phrases that should
|
|
11
|
-
be preserved inside translated sentences.
|
|
12
|
-
- The agent accepts global `noTranslate` terms. File-level matches take
|
|
13
|
-
precedence when they overlap with global matches.
|
|
14
|
-
- Tracked reference changes retranslate only the affected keys in each target
|
|
15
|
-
language, even when the source text stays the same.
|
|
16
|
-
|
|
17
|
-
## [1.3.2] - 2026-11-26
|
|
18
|
-
|
|
19
|
-
### Fixed
|
|
20
|
-
|
|
21
|
-
- Retry responses that contain translation preambles or response labels
|
|
22
|
-
while allowing inline JSON examples in the translated text.
|
|
23
|
-
- Use NodeNext-compatible relative imports in published TypeScript declarations.
|
|
24
|
-
|
|
25
|
-
## [1.3.1] - 2026-11-25
|
|
26
|
-
|
|
27
|
-
### Added
|
|
28
|
-
|
|
29
|
-
- `translate()` now accepts an ordered array of reference plugins alongside
|
|
30
|
-
the existing single-plugin call. Available references are passed to each
|
|
31
|
-
translation request in array order.
|
|
32
|
-
|
|
33
|
-
## [1.3.0] - 2026-11-25
|
|
34
|
-
|
|
35
|
-
### Added
|
|
36
|
-
|
|
37
|
-
- Added the optional `TranslationReferencePlugin` for using a reviewed locale
|
|
38
|
-
as context for pending translations. It matches by filename and JSON key,
|
|
39
|
-
with translation eligibility determined by the existing cache.
|
|
40
|
-
- Added a reference coverage preview before translation. Missing files or
|
|
41
|
-
entries require terminal confirmation to continue with source-only
|
|
42
|
-
translation for those entries. Invalid reference directories and malformed
|
|
43
|
-
matching files stop the run.
|
|
44
|
-
- Added an opt-in conflict check shared across target languages
|
|
45
|
-
(`checkConflicts: true`). By default, translation uses the source and
|
|
46
|
-
matched reference directly. When enabled, conflicts and checks that fail
|
|
47
|
-
after retries are logged separately once per filename and key. Skipped entries
|
|
48
|
-
keep their existing translations and cache state. The reference locale is
|
|
49
|
-
read-only.
|
|
50
|
-
|
|
51
|
-
### Changed
|
|
52
|
-
|
|
53
|
-
- Improved terminal translation progress and added a final task summary.
|
|
54
|
-
|
|
55
|
-
### Fixed
|
|
56
|
-
|
|
57
|
-
- Added progress updates and per-request timeouts during reference conflict
|
|
58
|
-
checks. Entries that still time out after retries are logged and skipped.
|
|
59
|
-
|
|
60
|
-
## [1.0.0] - 2026-03-04
|
|
61
|
-
|
|
62
|
-
### Changed
|
|
63
|
-
- Refactored translator core from `CwalletTranslate` to `I18nTranslateAgent`.
|
|
64
|
-
- Reworked OpenAI configuration to use `openaiClientConfig` and `chatCompletionCreateParams`.
|
|
65
|
-
- Updated translation logs to clearer English output and added task-level summary counters.
|
|
66
|
-
- Optimized `No content to translate` logging: switched from per-item spam to one aggregated summary line.
|
|
67
|
-
- Standardized package metadata in `package.json` (`main` / `module` / `types` / `exports` / `files` / `engines` / `sideEffects` / `bugs` / `homepage`).
|
|
68
|
-
- Updated publish scripts to `compile`, `prepublishOnly`, and `release`.
|
|
69
|
-
|
|
70
|
-
### Added
|
|
71
|
-
- Added retry support in concurrency queue with incremental backoff (`runWithConcurrencyLimit`).
|
|
72
|
-
- Added settled-style task results (`fulfilled` / `rejected`) for better post-run reporting.
|
|
73
|
-
- Added `test.js` entry for test flow.
|
|
74
|
-
|
|
75
|
-
### Fixed
|
|
76
|
-
- Fixed npm `bugs` URL to repository issue tracker.
|
|
77
|
-
- Fixed package export/type consistency with built output (`index.js` + `index.d.ts`).
|
|
78
|
-
- Moved `ts-node` to `devDependencies` to avoid unnecessary runtime dependency.
|