Skip to content

Releases: pescheckit/python-gpt-po

Enhanced language code handling

23 Dec 15:56
572f803
Compare
Choose a tag to compare

This release adds robust language code handling:

  • Accepts "Language: French" and "Language: fr" in metadata
  • Added pycountry for standardized language support
  • Handles ISO codes, full names, and native names

Breaking Changes

None

Dependencies

  • pycountry>=22.1.10

Usage

pip install --upgrade python-gpt-po

Added tenacity

19 Dec 13:58
ea6872d
Compare
Choose a tag to compare
  • Added tenacity

Updated to 0.2.12

09 Sep 09:31
Compare
Choose a tag to compare
  • Added --detail-lang

Updated correct handeling of multiple languages

21 Aug 13:24
Compare
Choose a tag to compare
  • Updated correct handeling of multiple languages

Significant Enhancements with a Minor Update

21 Aug 11:04
Compare
Choose a tag to compare

Major Functional Updates

  • Enhanced Batch Processing: Improved precision in batch functions, adjusting batch size for optimal performance and accuracy.
  • Retry Mechanism Introduced: Implemented retries across multiple scenarios to enhance reliability, including retries specifically for translation and parsing issues.
  • AI Translation Enhancements: Enhanced context handling for AI translations, including retries when certain explanatory phrases are detected.
  • Contextual Awareness for AI: Updated the AI's context to explicitly recognize its role as a translator, ensuring more accurate and context-aware translations.

Technical Details

  • Updated Batch Size: Batch size adjusted from 50 to 40 to better manage API limits and improve processing efficiency.
  • JSON Array Parsing: Introduced a structured JSON array format for parsing, improving data handling and ensuring consistent translation output.
  • Batch and Single Translation Improvements: Refined the bulk and single translation methods to better handle chunk processing, including retries for individual translations when bulk translations fail.
  • Improved Error Handling: Enhanced error handling and logging to provide more detailed information about translation failures and retries.
  • Translation Context Improvements: Updated the translation prompt context to provide clearer and more direct instructions for the AI, reducing the likelihood of errors and unnecessary explanations.
  • Enhanced PO File Handling: Added methods to manage and update PO file entries more effectively, including handling fuzzy translations and validating translation quality.

Example Translation Context:

f"Translate the following list of texts from English to {target_language}. "
"Provide only the translations in a JSON array format, maintaining the original order. "
"Each translation should be concise and direct, without explanations or additional context. "
"Keep special characters, placeholders, and formatting intact. "
"If a term should not be translated (like 'URL' or technical terms), keep it as is. "
"Example format: [\"Translation 1\", \"Translation 2\", ...]\n\n"
"Texts to translate:\n"

Additional Changes:

  • PO File Management: Introduced new utilities to disable fuzzy translations and infer file languages based on folder structure.
  • Unit Test Enhancements: Updated unit tests to reflect the new bulk and single translation logic, including improved mock handling and test coverage.
  • Dependency Updates: Updated dependencies to include the latest versions of openai and tenacity libraries, ensuring compatibility with the latest API features.

This update brings significant improvements in precision, reliability, and overall functionality of the translation system, ensuring smoother operations and more accurate results.

video.mp4

Release 0.1.13

03 Jul 15:45
Compare
Choose a tag to compare
  • Added simple tests

Updated version to 0.1.12

21 Jun 15:20
Compare
Choose a tag to compare
  • Fixed issue with non --bulk

Updated version to 0.1.10

29 Dec 13:06
Compare
Choose a tag to compare
  • Fixed issue with index

Updated version to 0.1.9

29 Dec 10:26
Compare
Choose a tag to compare
  • Changed workflow github to make sure only build when linting is done

Updated to version 0.1.8

29 Dec 09:55
Compare
Choose a tag to compare
  • Added indexing of gpt