v0.18.0
What's Changed
Highlights
This release promotes Co-op Translator beyond a CLI-only workflow by adding a first-class programmatic translation API, shared estimation utilities, and stronger Markdown translation safeguards.
Key improvements include:
- A new public
co_op_translator.api.run_translationentrypoint for running translations directly from Python code. - Preflight token and word estimation support shared across CLI and API flows.
- Configurable YAML frontmatter handling, including preserve/translate field rules and nested content support.
- More reliable Markdown link handling for current-document links, anchors, query-only links, and TOC references.
- Safer Markdown chunking for large nested lists so long table-of-contents sections keep their original line breaks, indentation, and spacing.
- Refreshed translation outputs and language folder paths aligned with canonical language codes.
Core
- Added a first-class programmatic translation API via
co_op_translator.api.run_translation, enabling consumers to run the translation pipeline from Python code instead of only through the CLI by @skytin1004 in #394 - Added shared token and word estimation utilities, plus pre-translation estimate output for CLI/API workflows by @skytin1004 in #394
- Added deterministic frontmatter handling with configurable preserve/translate fields, including support for nested frontmatter content such as
quickLinksby @skytin1004 in #394 - Added
lang_subdirsupport through project, directory, and translation manager flows for more flexible translation output layouts by @skytin1004 in #394 - Added glossary support for translation prompt integration by @skytin1004 in #394
Markdown Reliability
- Fixed current-document Markdown links so empty links, dot links, query-only links, and same-page anchors are preserved instead of being rewritten as source-directory relative paths by @skytin1004 in #396
- Fixed oversized nested Markdown lists being flattened into one-line chunks during translation by splitting list items at safer boundaries by @skytin1004 in #397
- Replaced word-based oversized chunk fallback splitting with whitespace-preserving splitting, keeping newlines, indentation, repeated spaces, and long unbroken spans intact by @skytin1004 in #397
Translations and Language Metadata
- Synced translations with the latest source changes by @skytin1004 in #391
- Updated generated translation metadata files and refreshed localized README/getting-started content by @skytin1004 in #391
- Standardized translated language folder references to canonical language codes such as
zh-CN,zh-HK,zh-MO,zh-TW,pt-BR, andpt-PTby @skytin1004 in #391 - Updated README language table and sparse-checkout guidance for Bash/macOS/Linux and Windows CMD users by @skytin1004 in #391
Dependencies
- Bumped
pygmentsfrom 2.19.1 to 2.20.0 by @dependabot[bot] in #387 - Bumped
aiohttpfrom 3.13.3 to 3.13.4 by @dependabot[bot] in #389 - Bumped
pillowfrom 12.1.1 to 12.2.0 by @dependabot[bot] in #395
Build
- Upgraded the package version to
v0.18.0by @skytin1004 in #398
Upgrade Notes
This release includes internal translation layout and language-code normalization work. If you directly reference generated translation folders, prefer the canonical language folder names now used in the README language table, such as zh-CN, zh-HK, zh-MO, zh-TW, pt-BR, and pt-PT.
No breaking runtime change is expected for standard CLI usage.