五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

輻射4 自動翻譯MOD

2023-07-22 07:07 作者:白紙貓又w  | 我要投稿
  1. 打開xTranslator,Ctrl+Alt+A勾選全部,右鍵標記為已翻譯,導(dǎo)出為XML文件。

  2. 修改python里的路徑,按下運行腳本按鈕,等待運行結(jié)束。

  3. xTranslator選擇導(dǎo)入xml,保存為翻譯文件。

import xml.etree.ElementTree as ET

import json

from shutil import copyfile

from tencentcloud.common import credential

from tencentcloud.common.profile.client_profile import ClientProfile

from tencentcloud.common.profile.http_profile import HttpProfile

from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException

from tencentcloud.tmt.v20180321 import tmt_client, models

token = credential.Credential(

? ? "這里輸入你的騰訊翻譯tk")

def transl(array):

? ? httpProfile = HttpProfile()

? ? httpProfile.endpoint = "tmt.tencentcloudapi.com"

? ? clientProfile = ClientProfile()

? ? clientProfile.httpProfile = httpProfile

? ? client = tmt_client.TmtClient(token, "ap-guangzhou", clientProfile)

? ? req = models.TextTranslateBatchRequest()

? ? params = {

? ? ? ? "Source": "auto",

? ? ? ? "Target": "zh",

? ? ? ? "ProjectId": 0,

? ? ? ? "SourceTextList": array

? ? }

? ? req.from_json_string(json.dumps(params))

? ? resp = client.TextTranslateBatch(req)

? ? return resp.TargetTextList

tree = ET.parse(r"你的xml路徑")

root = tree.getroot()

value_node = root.findall('./Content/')

for string_node in value_node:

? ? value = string_node.find('Dest').text

? ? if not "\n" in value:

? ? ? ? try:

? ? ? ? ? ? tl = transl([value])[0]

? ? ? ? except:

? ? ? ? ? ? tl = '[翻譯出錯]'+value

? ? ? ? string_node.find('Dest').text =tl

? ? ? ? print(value, tl)

tree.write(r"你的xml路徑", encoding='utf-8')


輻射4 自動翻譯MOD的評論 (共 條)

分享到微博請遵守國家法律
司法| 东丰县| 盱眙县| 额敏县| 方城县| 北辰区| 临安市| 高青县| 贞丰县| 巨野县| 合阳县| 斗六市| 江源县| 乐安县| 德保县| 阳东县| 尼木县| 昌吉市| 武威市| 乐山市| 大渡口区| 兴文县| 修文县| 来宾市| 兰州市| 探索| 淅川县| 巩留县| 海阳市| 凯里市| 旺苍县| 京山县| 漳州市| 杭锦旗| 全州县| 琼海市| 密山市| 嘉荫县| 茂名市| 肇东市| 溆浦县|