Skip to content

Conversation

@johngray1965
Copy link

Upped max_tokens to 1024, it was failing on some things with the lower value.
Chunk the input into chunks of 16.
Divide those chucks if they fail.
Write successful chucks immediately so it'll process as much as possible.

With these changes, I'm able to translate my apps strings (313) into Ukrainian. It handled 311 of 313 strings.

value.
Chunk the input into chunks of 16.
Divide those chucks if they fail.
Write succesful chucks immediately so it'll process as much as possible.
@johngray1965
Copy link
Author

A couple of things, I realized I left some debug logging in there.
And it has all my languages in there.
Another change I made was to escape single quotes, the some Ukrainian strings needed that.

Command Line Arguments
@johngray1965
Copy link
Author

Added support for Google Translate and command line arguments.
Now you specify everything via the command line (or as env vars).

Google Translate requires adding the module to python, enabling the API in the Google cloud apis, and getting a key.

You can just comment out the import and it'll work without Google Translate

gray added 2 commits March 12, 2023 15:37
GoogleTranslate and OpenAITranslator implement fetch to
get the translated string.
Added Documentation. Cleaned up python code a bit
so it uses python common style.
@johngray1965
Copy link
Author

Changed the code to use classes.

that were coming back with the placeholders munged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant