Skip to content

Automated translation scripts for .po or .pot file. 针对po或pot文件的自动化翻译脚本。

License

Notifications You must be signed in to change notification settings

alexwoo1900/potranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README: ENGLIST | 简体中文

PO Translator

Automated translation scripts for .po or .pot file.

Demo

Demo

Quick start

Assuming you have generated a po or pot file from gettext or some other program.

Case I

  • you treat msgid as original text
  • you want to translate text from language A to language B
python main.py -s A -d B -f msgid -i pot_file -o po_file

Case II

  • you treat msgstr as original text
  • you want to translate text to all supported languages
python main.py -d all -f msgstr -i pot_file

Case III

  • You don't have python installed, you just a translator looking for a dummy tool
  • You use Windows
  1. Press win + r and type "cmd" to open the command line
  2. cd /d potranslator_folder
    main.exe -d all -i pot_file

Detail

The project uses (only implements) Google translation engine by default. Please configure your network environment in translator/config.ini before using it.

Q&A

Q: How the translation part works

A: This project uses the translator from skywind3000. It simulates a browser sending a translation request to the Google translation engine. This implementation is reliable enough, lightweight, and more importantly, it's free.

Q: Which parts can be customized

A: Because the code is simple enough, you can modify almost everything. You can modify global variables to extend the supported formats of the program. You can also write the implementation of other translation engines yourself.

About

Automated translation scripts for .po or .pot file. 针对po或pot文件的自动化翻译脚本。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages