Skip to content

v0.7.0b1

Latest
Compare
Choose a tag to compare
@skytin1004 skytin1004 released this 31 Jan 17:22
b98c1ba

What's Changed

  • Core, Build, Docs: Add Black code formatter and apply formatting by @skytin1004 in #74
  • Core, Build, Docs: Improve Translation Management & Metadata Handling by @skytin1004 in #76

Full Changelog: v0.6.3...v0.7.0b1

Purpose

We are currently preparing a GitHub Action version of Co-op Translator to streamline multilingual documentation workflows.

As part of this initiative, this release introduces key enhancements and fixes based on **issue #70 **, focusing on improved translation management, directory synchronization, metadata handling, and test coverage.

Key Improvements

  • Metadata Integration: Added metadata to each translation file to detect outdated translations and improve tracking.
  • Enhanced Directory Management: Ensures translation directories remain in sync with the original project structure.
  • Improved Translation Quality: Refined markdown and image translation processes for better accuracy and formatting.
  • Optimized CLI Experience: Simplified command-line options for a more intuitive user experience.
  • Robust Error Handling: Improved failure recovery mechanisms for better resilience against API failures.

Translation Workflow

When the translation process starts, it follows these structured steps:

  1. Remove orphaned translations – Deletes translated files that no longer have a corresponding source file.
  2. Synchronize directory structure – Ensures translated content mirrors the original folder hierarchy.
  3. Identify outdated translations – Detects and flags files requiring re-translation based on metadata changes.
  4. Perform translation – Processes only the required files, reducing unnecessary API calls and improving efficiency.

These enhancements lay the groundwork for seamless automation in GitHub Actions, making Co-op Translator more scalable and efficient.

Description

This update enhances the Co-op Translator by refining the translation workflow, adding missing metadata for better tracking, and improving error handling. The CLI has been adjusted to provide better user feedback when selecting translation options. Additionally, the directory manager now ensures that translations align with the original project's structure.

Key changes:

  • Added metadata support with structured comments for translations.
  • Improved handling of orphaned translations by cleaning up outdated files.
  • Implemented a more robust error-handling mechanism for API failures.
  • Streamlined CLI options for more intuitive use.
  • Enhanced test coverage for directory and translation management.
    co_op_translator-0.7.0b1.tar.gz

Warning

This feature will take effect starting from version 0.7.0b1. Beginning with this release, Co-op Translator uses metadata to detect outdated translations. If a translation file does not contain CO_OP_TRANSLATOR_METADATA, it will be automatically deleted and retranslated.