diff --git a/README.md b/README.md index 10c0d3e..fed770f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ **如果喜欢这个项目,请给它一个Star;如果你发明了更好用的快捷键或函数插件,欢迎发pull requests** If you like this project, please give it a Star. If you've come up with more useful academic shortcuts or functional plugins, feel free to open an issue or pull request. We also have a README in [English|](docs/README_EN.md)[日本語|](docs/README_JP.md)[한국어|](https://github.com/mldljyh/ko_gpt_academic)[Русский|](docs/README_RS.md)[Français](docs/README_FR.md) translated by this project itself. +To translate this project to arbitary language with GPT, read and run [`multi_language.py`](multi_language.py) (experimental). > **Note** > diff --git a/multi_language.py b/multi_language.py index 33c692c..6c72598 100644 --- a/multi_language.py +++ b/multi_language.py @@ -1,5 +1,7 @@ """ - Translate this project to other languages + Translate this project to other languages (experimental, please open an issue if there is any bug) + + Usage: 1. modify LANG LANG = "English" @@ -11,7 +13,16 @@ Note: You need to run it multiple times to increase translation coverage because GPT makes mistakes sometimes. 4. Find the translated program in `multi-language\English\*` + + P.S. + - The translation mapping will be stored in `docs/translation_xxxx.json`, you can revised mistaken translation there. + + - If you would like to share your `docs/translation_xxxx.json`, (so that everyone can use the cached & revised translation mapping), please open a Pull Request + + - If there is any translation error in `docs/translation_xxxx.json`, please open a Pull Request + + - Welcome any Pull Request, regardless of language """ import os @@ -217,7 +228,7 @@ def trans(word_to_translate, language, special=False): # for a,b in zip(res_before_trans, res_after_trans): # translated_result[a] = b # except: - print('GPT输出格式错误,稍后可能需要再试一次') + print('GPT answers with unexpected format, some words may not be translated, but you can try again later to increase translation coverage.') res_before_trans = eval(result[i-1]) for a in res_before_trans: translated_result[a] = None