Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions web/src/components/settings/SystemSetting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ const SystemSetting = () => {
<Card>
<Form.Section text={t('代理设置')}>
<Text>
支持{' '}
{t('支持')}{' '}
<a
href='https://github.com/Calcium-Ion/new-api-worker'
target='_blank'
Expand All @@ -558,14 +558,14 @@ const SystemSetting = () => {
<Form.Input
field='WorkerUrl'
label={t('Worker地址')}
placeholder='例如:https://workername.yourdomain.workers.dev'
placeholder={t('例如:') + 'https://workername.yourdomain.workers.dev'}
/>
</Col>
<Col xs={24} sm={24} md={12} lg={12} xl={12}>
<Form.Input
field='WorkerValidKey'
label={t('Worker密钥')}
placeholder='敏感信息不会发送到前端显示'
placeholder={t('敏感信息不会发送到前端显示')}
type='password'
/>
</Col>
Expand Down Expand Up @@ -700,7 +700,7 @@ const SystemSetting = () => {
)
}
>
启用邮箱域名白名单
{t('启用邮箱域名白名单')}
</Form.Checkbox>
</Col>
<Col xs={24} sm={24} md={12} lg={12} xl={12}>
Expand All @@ -714,7 +714,7 @@ const SystemSetting = () => {
)
}
>
启用邮箱别名限制
{t('启用邮箱别名限制')}
</Form.Checkbox>
</Col>
</Row>
Expand Down Expand Up @@ -776,7 +776,7 @@ const SystemSetting = () => {
field='SMTPToken'
label={t('SMTP 访问凭证')}
type='password'
placeholder='敏感信息不会发送到前端显示'
placeholder={t('敏感信息不会发送到前端显示')}
/>
</Col>
<Col xs={24} sm={24} md={8} lg={8} xl={8}>
Expand Down
109 changes: 108 additions & 1 deletion web/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1997,5 +1997,112 @@
"深色": "Dark",
"浅色": "Light",
"点击复制模型名称": "Click to copy model name",
"已复制:{{name}}": "Copied: {{name}}"
"已复制:{{name}}": "Copied: {{name}}",
"追加模式:新密钥将添加到现有密钥列表的末尾": "Append mode: New keys will be added to the end of the existing key list",
"密钥更新模式": "Key update mode",
"请选择密钥更新模式": "Please select key update mode",
"追加到现有密钥": "Append to existing keys",
"覆盖现有密钥": "Overwrite existing keys",
"键为请求中的模型名称,值为要替换的模型名称": "Key is the model name in the request, value is the model name to replace",
"旧格式模板": "Old format template",
"新格式模板": "New format template",
"请求头覆盖": "Request header override",
"格式模板": "Format template",
"键为原状态码,值为要复写的状态码,仅影响本地判断": "Key is the original status code, value is the status code to be rewritten, only affects local judgment",
"系统提示词拼接": "System prompt concatenation",
"如果用户请求中包含系统提示词,则使用此设置拼接到用户的系统提示词前面": "If the system prompt is included in the user's request, this setting will be used to concatenate it to the front of the user's system prompt",
"此项可选,用于覆盖请求参数。不支持覆盖 stream 参数": "This is optional, used to override request parameters. Does not support overriding stream parameters",
"旧格式(直接覆盖):": "Old format (directly overwrite):",
"新格式(支持条件判断与json自定义):": "New format (supports conditional judgment and json customization):",
"此项可选,用于覆盖请求头参数": "This is optional, used to override request header parameters",
"格式示例:": "Format example:",
"代理设置": "Proxy settings",
"支持": "Supports",
"Worker地址": "Worker address",
"Worker密钥": "Worker key",
"例如:": "For example:",
"允许 HTTP 协议图片请求(适用于自部署代理)": "Allow HTTP protocol image requests (for self-deployed proxy)",
"更新Worker设置": "Update Worker settings",
"允许通过 Linux DO 账户登录 & 注册": "Allow login & registration through Linux DO account",
"允许新用户注册": "Allow new user registration",
"配置 Telegram 登录": "Configure Telegram login",
"允许通过 Telegram 进行登录": "Allow login via Telegram",
"允许通过 OIDC 进行登录": "Allow login via OIDC",
"允许 Turnstile 用户校验": "Enable Turnstile user verification",
"配置邮箱域名白名单": "Configure email domain whitelist",
"用以防止恶意用户利用临时邮箱批量注册": "Prevent malicious users from mass registering with temporary emails",
"启用邮箱域名白名单": "Enable email domain whitelist",
"启用邮箱别名限制": "Enable email alias restriction",
"输入要添加的邮箱域名": "Enter the email domains to add",
"保存邮箱域名白名单设置": "Save email domain whitelist settings",
"添加": "Add",
"SMTP 发送者邮箱": "SMTP sender email",
"启用SMTP SSL": "Enable SMTP SSL",
"配置 OIDC": "Configure OIDC",
"用以支持通过 OIDC 登录,例如 Okta、Auth0 等兼容 OIDC 协议的 IdP": "Support login via OIDC, such as Okta, Auth0, and other OIDC-compliant IdPs",
"主页链接填": "Homepage URL fill in",
"重定向 URL 填": "Redirect URL fill in",
"网站地址": "Website address",
"若你的 OIDC Provider 支持 Discovery Endpoint,你可以仅填写 OIDC Well-Known URL,系统会自动获取 OIDC 配置": "If your OIDC Provider supports Discovery Endpoint, you can only enter the OIDC Well-Known URL, and the system will automatically fetch OIDC configuration",
"保存 OIDC 设置": "Save OIDC settings",
"输入 OIDC 的 Userinfo Endpoint": "Enter OIDC Userinfo Endpoint",
"输入 OIDC 的 Token Endpoint": "Enter OIDC Token Endpoint",
"输入 OIDC 的 Authorization Endpoint": "Enter OIDC Authorization Endpoint",
"配置 Linux DO OAuth": "Configure Linux DO OAuth",
"用以支持通过 Linux DO 进行登录注册": "Support login and registration via Linux DO",
"管理你的 LinuxDO OAuth App": "Manage your LinuxDO OAuth App",
"回调 URL 填": "Callback URL fill in",
"允许注册的最低信任等级": "Minimum trust level allowed for registration",
"输入你注册的 LinuxDO OAuth APP 的 ID": "Enter the ID of your registered LinuxDO OAuth APP",
"保存 Linux DO OAuth 设置": "Save Linux DO OAuth settings",
"WeChat Server 服务器地址": "WeChat Server URL",
"用以支持通过 Telegram 进行登录注册": "Support login and registration via Telegram",
"Telegram Bot 名称": "Telegram Bot Name",
"保存 Telegram 登录设置": "Save Telegram login settings",
"Stripe 设置": "Stripe settings",
"Stripe 密钥、Webhook 等设置请": "Stripe keys, webhooks, etc. Please",
"需要包含事件:": "Need to include events: ",
"进行设置,最好先在": "to set up, it's best to first",
"测试环境": "Test environment",
"进行测试。": "to test.",
"API 密钥": "API key",
"Webhook 签名密钥": "Webhook signature key",
"商品价格 ID": "Product price ID",
"更新 Stripe 设置": "Update Stripe settings",
"sk_xxx 或 rk_xxx 的 Stripe 密钥,敏感信息不显示": "sk_xxx or rk_xxx Stripe key, sensitive information is not displayed",
"whsec_xxx 的 Webhook 签名密钥,敏感信息不显示": "whsec_xxx Webhook signature key, sensitive information is not displayed",
"price_xxx 的商品价格 ID,新建产品后可获得": "price_xxx Product price ID, obtain after creating a product",
"Webhook 填:": "Webhook fill in:",
"例如:7,就是7元/美金": "For example: 7, which is 7 dollars/USD",
"例如:2,就是最低充值2$": "For example: 2, which is the minimum recharge of 2$",
"例如:0001": "For example: 0001",
"全局设置": "Global settings",
"启用请求透传": "Enable request passthrough",
"开启后,所有请求将直接透传给上游,不会进行任何处理(重定向和渠道适配也将失效),请谨慎开启": "After enabling, all requests will be passed through directly to the upstream, without any processing (redirects and channel adapters will also fail). Please turn it on with caution",
"连接保活设置": "Connection keep-alive settings",
"警告:启用保活后,如果已经写入保活数据后渠道出错,系统无法重试,如果必须开启,推荐设置尽可能大的Ping间隔": "Warning: After enabling keep-alive, if the channel fails after writing keep-alive data, the system cannot retry. If you must open it, I recommend setting a Ping interval as large as possible",
"启用Ping间隔": "Enable Ping interval",
"Ping间隔(秒)": "Ping interval (seconds)",
"开启后,将定期发送ping数据保持连接活跃": "After enabling, periodic ping data will be sent to keep the connection active",
"Gemini思考适配设置": "Gemini thinking adaptation settings",
"适配 -thinking、-thinking-预算数字 和 -nothinking 后缀": "Adaptation -thinking, -thinking-budget number and -nothinking suffix",
"Gemini思考适配 BudgetTokens = MaxTokens * BudgetTokens 百分比": "Gemini thinking adaptation BudgetTokens = MaxTokens * BudgetTokens percentage",
"0.002-1之间的小数": "0.002-1 between decimals",
"分组速率限制": "Group rate limit",
"分组倍率设置,可以在此处新增分组或修改现有分组的倍率,格式为 JSON 字符串,例如:": "Group rate limit settings, you can add new groups or modify existing group ratios in this way, the format is JSON string, for example:",
",表示 vip 分组的倍率为 0.5,test 分组的倍率为 1": ", which means the ratio of the vip group is 0.5, and the ratio of the test group is 1",
"分组特殊倍率": "Group special ratio",
"自动分组auto,从第一个开始选择": "Auto group auto, choose from the first one",
"用户新建令牌时可选的分组,格式为 JSON 字符串,例如:": "User-created tokens can choose from the following groups, in JSON string format, for example:",
",表示用户可以选择 vip 分组和 test 分组": ", which means the user can choose the vip group and the test group",
"键为分组名称,值为另一个 JSON 对象,键为分组名称,值为该分组的用户的特殊分组倍率,例如:": "The key is the group name, and the value is another JSON object, the key is the group name, and the value is the special group ratio of the users in the group, for example:",
",表示 vip 分组的用户在使用default分组的令牌时倍率为0.5,使用test分组时倍率为1": ", which means that the user in the vip group uses the default group token with a ratio of 0.5, and uses the test group with a ratio of 1",
"创建令牌默认选择auto分组,初始令牌也将设为auto(否则留空,为用户默认分组)": "The default selection is auto group when creating a token, and the initial token will also be set to auto (otherwise leave blank, for the user's default group)",
"使用 JSON 对象格式,格式为:": "Use JSON object format, format as:",
"示例:": "Example:",
"。": ".",
"[最多请求次数]必须大于等于0,[最多请求完成次数]必须大于等于1。": "[Maximum request count] must be greater than or equal to 0, [Maximum successful request count] must be greater than or equal to 1.",
"[最多请求次数]和[最多请求完成次数]的最大值为2147483647。": "The maximum value for [Maximum request count] and [Maximum successful request count] is 2147483647.",
"分组速率配置优先级高于全局速率限制。": "Group rate limit configuration has higher priority than global rate limit.",
"限制周期统一使用上方配置的“限制周期”值。": "The limit period uses the \"Limit Period\" value configured above uniformly."
}
12 changes: 4 additions & 8 deletions web/src/pages/Setting/Model/SettingGeminiModel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,9 @@ export default function SettingGeminiModel(props) {
<Row>
<Col span={16}>
<Text>
{t(
"和Claude不同,默认情况下Gemini的思考模型会自动决定要不要思考,就算不开启适配模型也可以正常使用," +
"如果您需要计费,推荐设置无后缀模型价格按思考价格设置。" +
"支持使用 gemini-2.5-pro-preview-06-05-thinking-128 格式来精确传递思考预算。"
)}
{t('和Claude不同,默认情况下Gemini的思考模型会自动决定要不要思考,就算不开启适配模型也可以正常使用,')}
{t('如果您需要计费,推荐设置无后缀模型价格按思考价格设置。')}
{t('支持使用 gemini-2.5-pro-preview-06-05-thinking-128 格式来精确传递思考预算。')}
</Text>
</Col>
</Row>
Expand All @@ -216,9 +214,7 @@ export default function SettingGeminiModel(props) {
<Row>
<Col span={16}>
<Text>
{t(
'Gemini思考适配 BudgetTokens = MaxTokens * BudgetTokens 百分比',
)}
{t('Gemini思考适配 BudgetTokens = MaxTokens * BudgetTokens 百分比')}
</Text>
</Col>
</Row>
Expand Down
6 changes: 3 additions & 3 deletions web/src/pages/Setting/Model/SettingGlobalModel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function SettingGlobalModel(props) {
})
}
extraText={
'开启后,所有请求将直接透传给上游,不会进行任何处理(重定向和渠道适配也将失效),请谨慎开启'
t('开启后,所有请求将直接透传给上游,不会进行任何处理(重定向和渠道适配也将失效)请谨慎开启')
}
/>
</Col>
Expand All @@ -116,7 +116,7 @@ export default function SettingGlobalModel(props) {
<Col span={24}>
<Banner
type="warning"
description="警告:启用保活后,如果已经写入保活数据后渠道出错,系统无法重试,如果必须开启,推荐设置尽可能大的Ping间隔"
description={t('警告:启用保活后,如果已经写入保活数据后渠道出错,系统无法重试,如果必须开启,推荐设置尽可能大的Ping间隔')}
/>
</Col>
</Row>
Expand All @@ -126,7 +126,7 @@ export default function SettingGlobalModel(props) {
label={t('启用Ping间隔')}
field={'general_setting.ping_interval_enabled'}
onChange={(value) => setInputs({ ...inputs, 'general_setting.ping_interval_enabled': value })}
extraText={'开启后,将定期发送ping数据保持连接活跃'}
extraText={t('开启后,将定期发送ping数据保持连接活跃')}
/>
</Col>
<Col xs={24} sm={12} md={8} lg={8} xl={8}>
Expand Down
14 changes: 7 additions & 7 deletions web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,33 +131,33 @@ export default function SettingsPaymentGateway(props) {
>
<Form.Section text={t('Stripe 设置')}>
<Text>
Stripe 密钥、Webhook 等设置请
{t('Stripe 密钥、Webhook 等设置请')}
<a
href='https://dashboard.stripe.com/developers'
target='_blank'
rel='noreferrer'
>
点击此处
{t('点击此处')}
</a>
进行设置,最好先在
{t('进行设置,最好先在')}
<a
href='https://dashboard.stripe.com/test/developers'
target='_blank'
rel='noreferrer'
>
测试环境
{t('测试环境')}
</a>
进行测试。
{t('进行测试。')}

<br />
</Text>
<Banner
type='info'
description={`Webhook 填:${props.options.ServerAddress ? removeTrailingSlash(props.options.ServerAddress) : t('网站地址')}/api/stripe/webhook`}
description={t('Webhook 填:') + `${props.options.ServerAddress ? removeTrailingSlash(props.options.ServerAddress) : t('网站地址')}/api/stripe/webhook`}
/>
<Banner
type='warning'
description={`需要包含事件:checkout.session.completed 和 checkout.session.expired`}
description={t('需要包含事件:') + 'checkout.session.completed 和 checkout.session.expired'}
/>
<Row
gutter={{ xs: 8, sm: 16, md: 24, lg: 24, xl: 24, xxl: 24 }}
Expand Down
6 changes: 3 additions & 3 deletions web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ export default function RequestRateLimit(props) {
<div>
<p>{t('说明:')}</p>
<ul>
<li>{t('使用 JSON 对象格式,格式为:{"组名": [最多请求次数, 最多请求完成次数]}')}</li>
<li>{t('示例:{"default": [200, 100], "vip": [0, 1000]}。')}</li>
<li>{t('[最多请求次数]必须大于等于0,[最多请求完成次数]必须大于等于1。')}</li>
<li>{t('使用 JSON 对象格式,格式为:') + '{"组名": [最多请求次数, 最多请求完成次数]}'}</li>
<li>{t('示例:') + '{"default": [200, 100], "vip": [0, 1000]}' + t('。')}</li>
<li>{t('[最多请求次数]必须大于等于0,[最多请求完成次数]必须大于等于1。')}</li>
<li>{t('[最多请求次数]和[最多请求完成次数]的最大值为2147483647。')}</li>
<li>{t('分组速率配置优先级高于全局速率限制。')}</li>
<li>{t('限制周期统一使用上方配置的“限制周期”值。')}</li>
Expand Down
Loading