Repository navigation
v2.1.0
β¨ v2.1.0 π
π₯ Major changes
- 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. β
- 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. π
- Update of placeholder processing:
- Complete refactoring of the mechanism for replacing and restoring placeholders (
_BL0CK,_L1NK,_HTMLand others). π - Added detailed debug information for tracking placeholders. π
- 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
Noneappeared 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?
- Make sure you already have our action.
- Update the
example.ymlfile:uses: mrf0rtuna4/Git-Markdown-AutoTranslator@v2.1.0
- Run the project with the new parameters to test the changes. π
2024 (c) mrf0rtuna4