当前位置:网站首页>Operation instructions of star boundary text automatic translator

Operation instructions of star boundary text automatic translator

2022-04-23 14:10:00 Senzhiqianshou

Preface

Trying to translate Franklin mod The text of , Used Baidu translation . It is found that the accuracy of machine turning is very high . The operation of repeatedly filtering text and then copying and translating is very boring for a programmer , So I came up with the idea of writing this tool . I am good at front-end and Android development , And the text translation is just the front-end web page . At present, I have written a pure html The translator for . Consider using... Later vue To rewrite , It can be done to UI And functions have better support .

Tool features

1、 Using Baidu translation api Carry out machine turnover , The quality is guaranteed

2、 Support single json file , The content format is like :

[
    {
    
        "Texts":{
    
            "Eng":"xxxxxx"
        }
    },
    {
    
    	"Texts":{
    
            "Eng":"xxxxxx"
        }
    }
]

Automatic translation of .

3、 After translation , You can choose the specified directory to download the translated files .( Of course, you can specify the source directory to overwrite )

The reason why it is not made to automatically overwrite the source file , It's because it's not IE The browser cannot operate the system's local files , This is a hard injury. .

Usage method

1、 Register Baidu translation account , apply appid and key

 Baidu translation

2、 from github Download source code

3、 Fill in the source code of the website appid and key

It can be used VSCode、WebStorm、sublim、notepad Set Notepad to open the source project \html\translator.html
 fill appid and key

4、 start-up

double-click translator.html It's ready to run .
webstorm It can be started by embedded server , I know everything I know :
 start-up
Interface after startup
 Translation machine
The interface is simple , Click on the left Select File The file selector will pop up , It's filtered json file
 File selection
Open this file , The text to be translated will be displayed
 Text to be translated
At this time , We can click on the other side Start translating
 Translation results
The page will display the translation results . The right side will prompt to save the translated file (edge browser )
It should be noted that , The accuracy of turning over is not 100%, After translating a document , It needs to be verified manually .
thus , The tutorial is over .
in addition , A large on the star border MOD- Franklin universe Sinicization project It's open source , Welcome students who like this game to join Sinochem

Exception description

 The translation is abnormal
There may be an exception as shown in the figure 52003, Please confirm your configuration appid and key Whether it works

版权声明
本文为[Senzhiqianshou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231405036900.html