28 lines
842 B
TypeScript
28 lines
842 B
TypeScript
import { formatNumber, t } from '@/i18n'
|
|
|
|
export function entriesNotice(total: number) {
|
|
if (total <= 0) {
|
|
return ''
|
|
}
|
|
return total === 1
|
|
? t('1 entry uses this content type. Changes are checked against it when you save.')
|
|
: t('{0} entries use this content type. Changes are checked against them when you save.', [
|
|
formatNumber(total),
|
|
])
|
|
}
|
|
|
|
export function entriesLine(name: string, total: number) {
|
|
return total === 1
|
|
? t('{0} has 1 entry. Each one is checked against the new fields when you apply.', [name])
|
|
: t('{0} has {1} entries. Each one is checked against the new fields when you apply.', [
|
|
name,
|
|
formatNumber(total),
|
|
])
|
|
}
|
|
|
|
export function entriesCountLine(name: string, total: number) {
|
|
return total === 1
|
|
? t('{0} has 1 entry', [name])
|
|
: t('{0} has {1} entries', [name, formatNumber(total)])
|
|
}
|