Skip to content

v2.1.0

Choose a tag to compare

@mrf0rtuna4 mrf0rtuna4 released this 25 Nov 16:29
· 62 commits to master since this release

✨ v2.1.0 πŸŽ‰

πŸ”₯ Major changes

  1. Saving empty lines:
  • Now empty lines are no longer lost! πŸ› οΈ
  • Blank lines are preserved as is to ensure that the structure of the original document remains unchanged. This ensures that Markdown markup is displayed correctly. βœ…
  1. Improved splitting of long lines:
  • Long lines are split more correctly. Now splitting does not break the content, keeping the words whole. βœ‚οΈ
  • Added logic to find space before break point. πŸ“
  1. Update of placeholder processing:
  • Complete refactoring of the mechanism for replacing and restoring placeholders (_BL0CK, _L1NK, _HTML and others). πŸ”„
  • Added detailed debug information for tracking placeholders. πŸ”
  1. Protection against missed placeholders:
  • The system now checks that all placeholders have been replaced. If there are any left, processing will not complete until they are fixed. πŸ›‘οΈ

⚑ String processing logic

  • Added check for empty lines:
  • Empty strings are automatically added to the translation without calling the API. This reduces the load on Google Translate. 🌱
  • Automatically ignore placeholder-only lines:
  • If a line consists only of placeholders, it is not sent for translation, but is saved in its original form. πŸ’‘

πŸ› Bug Fixes

  • πŸ›  Fixed bug with NoneType in strings:
  • Previously, the application crashed if None appeared in the string list. Now such strings are replaced with empty ones (""). πŸ”§
  • πŸ”— Placeholders don't get lost:
  • Fixed an issue where some placeholders were not restored when assembling translated content. Now everything is back in place! 🎯
  • ✨ Correct handling of Markdown widgets:
  • Fixed handling of special widgets such as links, code blocks and HTML tags.

πŸ“ˆ Optimization and performance

  • πŸ“‰ Reduced API load:
  • Improved logic for checking strings before calling the API. This saves time and money by eliminating unnecessary requests for empty strings or strings with placeholders. πŸ’°
  • ⚑ Fast processing of large files:
  • Splitting and assembling strings is much faster thanks to optimization of algorithms. πŸš€

πŸ’Ύ How ​​to update?

  1. Make sure you already have our action.
  2. Update the example.yml file:
    uses: mrf0rtuna4/Git-Markdown-AutoTranslator@v2.1.0
  3. Run the project with the new parameters to test the changes. πŸš€

2024 (c) mrf0rtuna4