mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -25,7 +25,7 @@ const AppsInfo: FC<Props> = ({
|
||||
<UsageInfo
|
||||
className={className}
|
||||
Icon={RiApps2Line}
|
||||
name={t('billing.usagePage.buildApps')}
|
||||
name={t('usagePage.buildApps', { ns: 'billing' })}
|
||||
usage={usage.buildApps}
|
||||
total={total.buildApps}
|
||||
/>
|
||||
|
||||
@ -43,11 +43,11 @@ const UsageInfo: FC<Props> = ({
|
||||
? 'bg-components-progress-error-progress'
|
||||
: (percent >= WARNING_THRESHOLD ? 'bg-components-progress-warning-progress' : 'bg-components-progress-bar-progress-solid')
|
||||
const isUnlimited = total === NUM_INFINITE
|
||||
let totalDisplay: string | number = isUnlimited ? t('billing.plansCommon.unlimited') : total
|
||||
let totalDisplay: string | number = isUnlimited ? t('plansCommon.unlimited', { ns: 'billing' }) : total
|
||||
if (!isUnlimited && unit && unitPosition === 'inline')
|
||||
totalDisplay = `${total}${unit}`
|
||||
const showUnit = !!unit && !isUnlimited && unitPosition === 'suffix'
|
||||
const resetText = resetHint ?? (typeof resetInDays === 'number' ? t('billing.usagePage.resetsIn', { count: resetInDays }) : undefined)
|
||||
const resetText = resetHint ?? (typeof resetInDays === 'number' ? t('usagePage.resetsIn', { ns: 'billing', count: resetInDays }) : undefined)
|
||||
const rightInfo = resetText
|
||||
? (
|
||||
<div className="system-xs-regular ml-auto flex-1 text-right text-text-tertiary">
|
||||
|
||||
@ -25,8 +25,8 @@ const VectorSpaceInfo: FC<Props> = ({
|
||||
<UsageInfo
|
||||
className={className}
|
||||
Icon={RiHardDrive3Line}
|
||||
name={t('billing.usagePage.vectorSpace')}
|
||||
tooltip={t('billing.usagePage.vectorSpaceTooltip') as string}
|
||||
name={t('usagePage.vectorSpace', { ns: 'billing' })}
|
||||
tooltip={t('usagePage.vectorSpaceTooltip', { ns: 'billing' }) as string}
|
||||
usage={usage.vectorSpace}
|
||||
total={total.vectorSpace}
|
||||
unit="MB"
|
||||
|
||||
Reference in New Issue
Block a user