Commit 089e73bd authored by dragondean@qq.com's avatar dragondean@qq.com

完善翻译

parent 18983f23
......@@ -40,7 +40,7 @@ const translateText = (text, fromLang = 'zh', toLang = 'en') => {
'Content-Length': querystring.stringify(params).length
}
};
try{
const req = https.request(options, (res) => {
let data = '';
......@@ -60,6 +60,10 @@ const translateText = (text, fromLang = 'zh', toLang = 'en') => {
req.write(querystring.stringify(params));
req.end();
}catch (e) {
console.log(text + " 翻译失败:" + e)
}
})
};
......@@ -96,11 +100,19 @@ async function translate(obj){
// 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理
for(let text in obj){
if(obj[text] || text.includes('{'))continue
try{
const textEn = await translateText(text)
console.log(`${text} => ${textEn}\n`)
obj[text] = textEn
autoTransCnt ++
// 每次翻译后保存一次,防止意外退出导致的数据丢失
fs.writeFileSync(savePath, JSON.stringify(obj, null, 4))
}catch (e) {
console.log(text + " 翻译失败:" + e)
}
// 账号请求频率限制1ps
await new Promise(resolve => setTimeout(resolve, 1000))
}
......
......@@ -4348,5 +4348,163 @@
"已下载": "Downloaded",
"待下载": "To be downloaded",
"重试": "retry ",
"会员详情": "Member Details"
"会员详情": "Member Details",
"全部清除": "Clear All",
"确定要全部清除么?": "Are you sure you want to clear all?",
"已选择{n}条路线": "{n} routes have been selected",
"清关费加价": "Customs clearance fee markup",
"撤销理由": "Reason for revocation",
"我司承接": "Our company undertakes",
"客户自清": "Customer self clearance",
"请选择目的港清关": "Please select the destination port for customs clearance",
"请选择发货方式": "Please select the shipping method",
"方数(分拣/已装)": "Quantity (sorted/loaded)",
"重量(分拣/已装)": "Weight (sorted/loaded)",
"起飞时间": "Takeoff time",
"此出货单状态未到提单节点": "This shipment status has not arrived at the bill of lading node",
"刷新成功": "Refresh successful",
"更新所选订单到港状态": "Update selected order arrival status",
"更新全部订单到港状态": "Update all order arrival status",
"更新所选订单清关状态": "Update the customs clearance status of the selected order",
"更新全部订单清关状态": "Update the customs clearance status of all orders",
"撤销清关申请": "Revoke customs clearance application",
"更新起飞异常状态": "Update takeoff abnormal status",
"操作步骤必填": "Operation steps are mandatory",
"票异常必填": "Ticket Exception Required",
"是否更新订单动态": "Update order dynamics",
"到港情况": "Arrival situation",
"一次到港": "One arrival at the port",
"多次到港": "Multiple arrivals to the port",
"已到港订单": "Orders that have arrived at the port",
"关键字:": "Keywords:",
"请输入订单号、提单号、唛头": "Please enter the order number, bill of lading number, and shipping mark",
"到港状态": "Arrival status",
"未到港": "Not arrived at the port",
"批量选择": "Batch selection",
"控货中": "In control of goods",
"已放完货": "The goods have been released completely",
"部分控货": "Partial control of goods",
"请先选择订单": "Please select the order first",
"订舱代理": "Booking Agent",
"请选择订舱代理": "Please select a booking agent",
"出仓箱数": "Number of outgoing boxes",
"出仓件数与计划出仓件数不一致,请检查": "The number of outgoing items does not match the planned number of outgoing items. Please check",
"清关情况": "Customs clearance situation",
"一次清关": "One customs clearance",
"多次清关": "Multiple customs clearances",
"已清关订单": "Customs cleared orders",
"已清关": "Customs cleared",
"封箱标签": "Sealing label",
"长度保留两位小数": "Length to two decimal places",
"cm": "Cm",
"宽度保留两位小数": "Width to two decimal places",
"高度保留两位小数": "Height to two decimal places",
"全部分拣": "Sort All",
"分拣柜": "Sorting cabinet",
"泡货比": "Bubble ratio",
"(混箱)": "(Mixed box)",
"箱明细": "Box details",
"理货纠错": "Tallying correction",
"批量理货纠错": "Batch tally correction",
"预计二程起飞时间": "Estimated departure time for the second leg",
"请先通过完成到仓审核": "Please complete the warehouse audit first",
"提交完成到仓审核": "Submit for warehouse review upon completion",
"到仓审核中": "In warehouse review",
"请选择到仓时间": "Please select the time of arrival at the warehouse",
"确认到仓?": "Confirmed to warehouse?",
"存在未到港或未清关的订单": "There are orders that have not arrived at the port or have not been cleared through customs",
"请先完成到港操作": "Please complete the arrival operation first",
"空运-分拣": "Air freight - sorting",
"到仓反审": "Reverse review upon arrival at the warehouse",
"确定移除货物吗?": "Are you sure to remove the goods?",
"空运订单重量上限": "Air freight order weight limit",
"空运清关费": "Air freight customs clearance fee",
"已发布,投放中": "Released, in the process of deployment",
"取消投放": "Cancel placement",
"投放": "Advertising",
"1天内过期": "Expires within 1 day",
"还有{days}天到期": "Due in {days} days",
"请选择客户经理。": "Please select an account manager.",
"回收客户": "Recycling customers",
"是否要回收当前{name}": "",
"回收成功。": "Recycling successful.",
"已完成目标值": "Target value completed",
"请输入目标单位": "Please enter the target unit",
"新客户:": "New customers:",
"旧客户:": "Old customers:",
"清关费未报价": "Unquoted customs clearance fee",
"原泡重": "Original foam weight",
"新泡重": "New foam weight",
"用途": "purpose",
"混箱": "Mixed box",
"打包前入仓影像": "Pre packaging warehouse image",
"打包后入仓影像": "Packaging and warehousing images",
"暂无影像": "No images available at the moment",
"提单是否显示价格": "Does the bill of lading display the price",
"核销比例": "Verification ratio",
"是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式": "It refers to the agreement between the shipper and the consignee that our company, as a third party, controls the ownership of the goods during international transportation; A transaction method in which the consignee can only retrieve the goods on the bill of lading if the shipper authorizes our company to release the goods",
"我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现": "Our company will handle the export procedures for the goods on our behalf; Self declaration: The shipper shall provide relevant export documents for the goods and entrust our company to handle them on their behalf; There are two situations where the goods are mixed and reported on behalf of others",
"如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充": "If you need our company to package, please check the corresponding option. The payer and packaging requirements can be noted and supplemented",
"不可出": "Unable to leave",
"确定设置订单{orderNo}不可出么?": "Are you sure you want to set the order {orderNo} not to be issued?",
"预计运费/清关费": "Estimated freight/customs clearance fee",
"处理备注": "Processing remarks",
"详细说明": "elaborate on",
"注意:收款后无法修改备货信息,请先联系仓库确认订单备货完成": "Attention: After receiving payment, the stocking information cannot be modified. Please contact the warehouse first to confirm that the order stocking is completed",
"货值三分之一占运费和清关费总和比例": "The proportion of one-third of the value of goods to the total freight and customs clearance fees",
"渠道包装超限品名列表": "List of Channel Packaging Overlimit Product Names",
"重量超限改价审核中": "Weight exceeding limit and price change review in progress",
"取消重量超限改价审核": "Cancel weight limit and price change review",
"请输入空运订单上限": "Please enter the upper limit for air freight orders",
"请先去设置运费或清关费本身的货币单位、计价单位": "Please first set the currency unit and pricing unit for the shipping or customs clearance fees themselves",
"选择订单商品": "Select order items",
"添加新商品": "Add new product",
"影像": "image",
"请确认货物打包完成再并箱": "Please confirm that the goods have been packed and then combined into boxes",
"并箱": "Combined box",
"并箱后不可恢复,是否确认并箱?": "After merging, it cannot be restored. Are you sure to merge?",
"新建订单成功": "New order successfully created",
"您的订舱号": "Your booking number",
"复制订单信息": "Copy order information",
"复制成功": "Copy successful",
"复制失败": "copy failed",
"此阶梯未设置阶梯和价格,将会被忽略": "This ladder has no ladder or price set and will be ignored",
"此阶梯价信息设置不完整": "This tiered pricing information setting is incomplete",
"第{steps}阶梯设置不完整": "The {steps} step setting is incomplete",
"已选择{route}条路线,{product}个商品;确认提交修改?": "{route} selected, {product} products; Confirm submitting modifications?",
"是否含阶梯价": "Does it include tiered pricing",
"*针对所有价格减价": "*Reduce prices for all items",
"商品清关费价格": "Price of customs clearance fee for goods",
"未设置清关费": "No customs clearance fee set",
"已选择{route}条路线,确认提交?": "{route} has been selected, confirm submission?",
"缺少阶梯价格设置": "Lack of tiered pricing settings",
"单询": "Single inquiry",
"复制模板": "Copy Template",
"取消单询": "Cancel single inquiry",
"单询异常": "Single inquiry exception",
"海运订单国家代码-海运订单城市代码-空运订单国家代码-空运自编号国家代码,没有可填0-": "Sea freight order country code - Sea freight order city code - Air freight order country code - Air freight self number country code, no 0 can be filled in-",
"海运目的国家简称-海运目的城市简称-空运订单编号目的国家简称-空运自编号目的国简称,\\n注意:如果没有海运业务的城市设置,请将海运目的国家简称-海运目的城市简称设置为->0-0,前置的参数不能为空": "Shipping Destination Country Abbreviation - Shipping Destination City Abbreviation - Air Transport Order Number Destination Country Abbreviation - Air Transport Self numbered Destination Country Abbreviation. \\ n Note: If there is no city setting for shipping business, please set the Shipping Destination Country Abbreviation - Shipping Destination City Abbreviation to ->0-0, and the preceding parameters cannot be empty",
"空运发件人": "Airfreight sender",
"空运发件人英文": "Air freight sender in English",
"空运发件公司地址": "Air freight shipping company address",
"空运发件公司地址英文": "Air freight shipping company address in English",
"空运收货人": "Air freight consignee",
"空运收货人英文": "Air freight consignee in English",
"空运收货地址": "Air freight delivery address",
"空运收货地址英文": "Air freight delivery address in English",
"代码不能为空": "Code cannot be empty",
"保函证书": "Letter of Guarantee Certificate",
"公司信息": "Company Information",
"会员编号": "Member ID",
"会员昵称": "Member nickname",
"绑定邮箱": "Bind email",
"生日": "birthday",
"上次登录": "Last login",
"档口": "Gear opening",
"公司简介": "Company Introduction",
"认证信息": "Certification information",
"企业": "enterprise",
"身份证认证状态": "Identity card authentication status",
"角标字段": "Subscript field",
"不清楚请留空,已设勿改": "Unclear, please leave blank. It has been set to remain unchanged"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment