Skip to content

v0.18.0

Choose a tag to compare

@skytin1004 skytin1004 released this 20 Apr 03:18
· 19 commits to main since this release
218abab

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_translation entrypoint 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 quickLinks by @skytin1004 in #394
  • Added lang_subdir support 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, and pt-PT by @skytin1004 in #391
  • Updated README language table and sparse-checkout guidance for Bash/macOS/Linux and Windows CMD users by @skytin1004 in #391

Dependencies

Build

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.

Full Changelog

v0.17.2...v0.18.0