优化vite翻译插件,增加一些翻译
This commit is contained in:
parent
4ad23c57ab
commit
6a2276f595
@ -419,23 +419,38 @@ function parseCSV(csvPath) {
|
||||
if (!trimmed || trimmed.startsWith('#')) continue;
|
||||
|
||||
// 标准 CSV 解析(支持引号)
|
||||
// 只有当字段以引号开始时,引号才作为 CSV 格式的引号处理
|
||||
const parts = [];
|
||||
let current = '';
|
||||
let inQuotes = false;
|
||||
let fieldStartedWithQuote = false;
|
||||
|
||||
for (let i = 0; i < trimmed.length; i++) {
|
||||
const char = trimmed[i];
|
||||
if (char === '"') {
|
||||
// 处理转义的引号 ""
|
||||
if (i + 1 < trimmed.length && trimmed[i + 1] === '"') {
|
||||
current += '"';
|
||||
i++;
|
||||
// 如果当前字段还没开始(current 为空),且这是字段的第一个字符,标记为引号包裹的字段
|
||||
if (current === '' && !inQuotes) {
|
||||
fieldStartedWithQuote = true;
|
||||
inQuotes = true;
|
||||
// 不将开始的引号添加到 current
|
||||
} else if (inQuotes && fieldStartedWithQuote) {
|
||||
// 在引号包裹的字段中,处理转义的引号 "" 或结束引号
|
||||
if (i + 1 < trimmed.length && trimmed[i + 1] === '"') {
|
||||
current += '"';
|
||||
i++;
|
||||
} else {
|
||||
// 结束引号,不添加到 current
|
||||
inQuotes = false;
|
||||
fieldStartedWithQuote = false;
|
||||
}
|
||||
} else {
|
||||
inQuotes = !inQuotes;
|
||||
// 不在引号包裹的字段中,引号是内容的一部分
|
||||
current += char;
|
||||
}
|
||||
} else if (char === ',' && !inQuotes) {
|
||||
parts.push(current);
|
||||
current = '';
|
||||
fieldStartedWithQuote = false;
|
||||
} else {
|
||||
current += char;
|
||||
}
|
||||
|
||||
@ -1134,3 +1134,57 @@ Weak,弱,
|
||||
Fair,一般,
|
||||
Strong,强,
|
||||
Very Strong,非常强,
|
||||
Server,服务器,
|
||||
Configuration,配置,
|
||||
Public IP,公网IP,
|
||||
Please select server configuration and payment method. Click "Create" to automatically provision the server.,请选择服务器配置和支付方式。点击"创建"以自动配置服务器。,
|
||||
Region Selection,区域选择,
|
||||
Please select a region,请选择一个区域,
|
||||
Image Selection (Jsite servers recommend Ubuntu-22.04),镜像选择(Jsite服务器推荐 Ubuntu-22.04),
|
||||
Please select an image,请选择一个镜像,
|
||||
Plan Selection,计划选择,
|
||||
Purchase Duration,购买时长,
|
||||
Monthly Fee,月费,
|
||||
months,个月,
|
||||
Select Payment Method,选择支付方式,
|
||||
Balance Payment,余额支付,
|
||||
Processing...,处理中...,
|
||||
Processing payment, please wait...,正在处理支付,请稍候...,
|
||||
Payment Successful!,支付成功!,
|
||||
Your order has been paid successfully and the server record has been created. The server is being created in the background. Creation and startup will take 3-5 minutes, please be patient.,您的订单已成功支付,服务器记录已创建。服务器正在后台创建中。创建和启动需要3-5分钟,请耐心等待。,
|
||||
You can check the server status in the server list. After creation is complete, the status will be updated to "Running".,您可以在服务器列表中查看服务器状态。创建完成后,状态将更新为"运行中"。,
|
||||
Back to Server List,返回服务器列表,
|
||||
1 month,1个月,
|
||||
3 months,3个月,
|
||||
6 months,6个月,
|
||||
1 year,1年,
|
||||
2 years,2年,
|
||||
3 years,3年,
|
||||
cores,核,
|
||||
public IPs,个公网IP,
|
||||
month,月,
|
||||
General Type - ,通用型 - ,
|
||||
Multi Public IP Type - ,多公网IP型 - ,
|
||||
International Type - ,国际型 - ,
|
||||
Capacity Type - ,容量型 - ,
|
||||
Unknown image,未知镜像,
|
||||
Unknown method,未知方法,
|
||||
Region data format is incorrect or empty,区域数据格式不正确或为空,
|
||||
Failed to get regions,获取区域失败,
|
||||
Failed to get plans,获取计划失败,
|
||||
Image data format is incorrect or empty,镜像数据格式不正确或为空,
|
||||
Failed to get images,获取镜像失败,
|
||||
Please select complete configuration,请选择完整配置,
|
||||
Please select payment method,请选择支付方式,
|
||||
Failed to create server order,创建服务器订单失败,
|
||||
Missing order information,缺少订单信息,
|
||||
Payment failed, please ensure sufficient balance,支付失败,请确保余额充足,
|
||||
Insufficient balance,余额不足,
|
||||
Balance payment processing failed,余额支付处理失败,
|
||||
Alipay payment processing failed,支付宝支付处理失败,
|
||||
WeChat Pay payment processing failed,微信支付处理失败,
|
||||
Order information is incomplete, please try again,订单信息不完整,请重试,
|
||||
Please complete Alipay payment in the new page,请在新页面完成支付宝支付,
|
||||
If it does not automatically redirect, please click the button below to open the payment page,如果未自动跳转,请点击下方按钮打开支付页面,
|
||||
Open Payment Page,打开支付页面,
|
||||
After payment is completed, please wait a moment, the system will automatically refresh the page,支付完成后,请稍等片刻,系统将自动刷新页面,
|
||||
|
||||
|
Can't render this file because it has a wrong number of fields in line 390.
|
Loading…
x
Reference in New Issue
Block a user