fix double plurals with context

This commit is contained in:
myl7
2022-02-06 20:09:59 +08:00
parent c0353b5455
commit 04e333aa36
5 changed files with 21 additions and 6 deletions
+5 -2
View File
@@ -321,10 +321,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => {
{!onlyOnePage && (
<div className="rounded-b bg-white dark:bg-gray-900 dark:text-gray-100">
<div className="border-b border-gray-200 p-3 text-center font-mono text-sm text-gray-400 dark:border-gray-700">
{t('- showing {{count}} page(s) of {{totalFileNum}} files -', {
{t('- showing {{count}} page(s) ', {
count: size,
totalFileNum: isLoadingMore ? '...' : folderChildren.length
})}
}) +
(isLoadingMore
? t('of {{count}} file(s) -', { count: folderChildren.length, context: 'loading' })
: t('of {{count}} file(s) -', { count: folderChildren.length, context: 'loaded' }))}
</div>
<button
className={`flex w-full items-center justify-center space-x-2 p-3 disabled:cursor-not-allowed ${