fix(web): i18n

This commit is contained in:
zhaoying
2026-04-14 14:59:32 +08:00
parent 7f8765b815
commit e539b3eeb7
2 changed files with 22 additions and 16 deletions

View File

@@ -1,34 +1,40 @@
/*
* @Author: ZhaoYing
* @Date: 2026-04-14 11:43:57
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-14 14:55:20
*/
export const billingUnits = [
{
key: 'workspace_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'skill_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'app_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'knowledge_capacity_quota',
unit: 'GB', placeholder: '如: 10',
unit: 'GB', placeholder: 'numberPlaceholder',
},
{
key: 'memory_engine_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'end_user_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'ontology_project_quota',
unit: '', placeholder: '如: 10',
unit: 'pcs', placeholder: 'numberPlaceholder',
},
{
key: 'model_quota',
unit: '次/秒', placeholder: '如: 10',
unit: 'ops', placeholder: 'numberPlaceholder',
},
]

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-25
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-14 14:48:13
* @Last Modified time: 2026-04-14 14:59:11
*/
/**
* Package Component
@@ -112,23 +112,23 @@ const Package: FC = () => {
return (
<div key={key} className="rb:flex rb:items-center rb:justify-between rb:text-sm">
<span className="rb:text-gray-500">{t(`package.${key}`)}</span>
<span>{pkg.quotas[key as keyof Package['quotas']]}{unit}</span>
<span>{pkg.quotas[key as keyof Package['quotas']]}{t(`package.${unit}`)}</span>
</div>
)
}
})}
{pkg.api_ops_rate_limit &&
<div className="rb:flex rb:items-center rb:justify-between rb:text-sm">
<span className="rb:text-gray-500">{t(`package.api_ops_rate_limit`)}</span>
<span>{pkg.api_ops_rate_limit}{t('package.ops')}</span>
</div>
}
{pkg.tech_support &&
<div className="rb:flex rb:items-center rb:justify-between rb:text-sm">
<span className="rb:text-gray-500">{t(`package.tech_support`)}</span>
<span>{String(pkg[getKeyWithLanguage('tech_support')] ?? '')}</span>
</div>
}
{pkg.api_ops_rate_limit &&
<div className="rb:flex rb:items-center rb:justify-between rb:text-sm">
<span className="rb:text-gray-500">{t(`package.api_ops_rate_limit`)}</span>
<span>{pkg.api_ops_rate_limit}/)</span>
</div>
}
</div>
</div>
</Flex>