Note: An OpenAI key is needed along with bought credits. Ex: When using Open AI's credit with your key, each cunk(80 lines) is about 1 cent, my script shows the number of chunks needed so if have a 40000 file that needs trnaslating you would need around $5 to get credits.
python translate_game_script.py
-i Text_Event_Prod.txt
-o Text_Event_Prod_en.txt
--lines-per-chunk 80
--model gpt-4o-mini
--overwrite
python sanitize_game_text.py
Text_Event_Prod_en.txt
Text_Event_Prod_en_clean.txt
--encoding utf-8
--line-endings crlf
#Note: If error copy and paste partially to see which parts can be translated with the script and which can't
With this its easier to pinpoint errors and if you find them let me know!
Resuming a run
If it stopped midway, you can resume:
python translate_game_script.py
-i Text_Event_Prod.txt
-o Text_Event_Prod_en.txt
--lines-per-chunk 80
--model gpt-4o-mini
--resume