mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 05:32:01 +00:00
fix double plurals with context
This commit is contained in:
@@ -321,10 +321,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => {
|
|||||||
{!onlyOnePage && (
|
{!onlyOnePage && (
|
||||||
<div className="rounded-b bg-white dark:bg-gray-900 dark:text-gray-100">
|
<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">
|
<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,
|
count: size,
|
||||||
totalFileNum: isLoadingMore ? '...' : folderChildren.length
|
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>
|
</div>
|
||||||
<button
|
<button
|
||||||
className={`flex w-full items-center justify-center space-x-2 p-3 disabled:cursor-not-allowed ${
|
className={`flex w-full items-center justify-center space-x-2 p-3 disabled:cursor-not-allowed ${
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ module.exports = {
|
|||||||
keySeparator: false,
|
keySeparator: false,
|
||||||
namespaceSeparator: false,
|
namespaceSeparator: false,
|
||||||
pluralSeparator: '——',
|
pluralSeparator: '——',
|
||||||
|
contextSeparator: '——',
|
||||||
lineEnding: 'lf',
|
lineEnding: 'lf',
|
||||||
locales: i18n.locales,
|
locales: i18n.locales,
|
||||||
output: path.join(localePath, '$LOCALE/$NAMESPACE.json'),
|
output: path.join(localePath, '$LOCALE/$NAMESPACE.json'),
|
||||||
|
|||||||
@@ -5,5 +5,10 @@ module.exports = {
|
|||||||
defaultLocale: 'en',
|
defaultLocale: 'en',
|
||||||
locales: ['en', 'zh-CN']
|
locales: ['en', 'zh-CN']
|
||||||
},
|
},
|
||||||
localePath: path.resolve('public/locales')
|
localePath: path.resolve('public/locales'),
|
||||||
|
reloadOnPrerender: process.env.NODE_ENV === 'development',
|
||||||
|
keySeparator: false,
|
||||||
|
namespaceSeparator: false,
|
||||||
|
pluralSeparator: '——',
|
||||||
|
contextSeparator: '——'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"- showing {{count}} page(s) of {{totalFileNum}} files -——one": "- showing {{count}} page of {{totalFileNum}} files -",
|
"- showing {{count}} page(s) ——one": "- showing {{count}} page ",
|
||||||
"- showing {{count}} page(s) of {{totalFileNum}} files -——other": "- showing {{count}} pages of {{totalFileNum}} files -",
|
"- showing {{count}} page(s) ——other": "- showing {{count}} pages ",
|
||||||
"{{count}} item(s)——one": "{{count}} item",
|
"{{count}} item(s)——one": "{{count}} item",
|
||||||
"{{count}} item(s)——other": "{{count}} items",
|
"{{count}} item(s)——other": "{{count}} items",
|
||||||
"Actions": "Actions",
|
"Actions": "Actions",
|
||||||
@@ -45,6 +45,10 @@
|
|||||||
"Name": "Name",
|
"Name": "Name",
|
||||||
"No more files": "No more files",
|
"No more files": "No more files",
|
||||||
"Nothing here.": "Nothing here.",
|
"Nothing here.": "Nothing here.",
|
||||||
|
"of {{count}} file(s) -——loaded——one": "of {{count}} file -",
|
||||||
|
"of {{count}} file(s) -——loaded——other": "of {{count}} files -",
|
||||||
|
"of {{count}} file(s) -——loading——one": "of ... file(s) -",
|
||||||
|
"of {{count}} file(s) -——loading——other": "of ... file(s) -",
|
||||||
"Oops, that's a <1>four-oh-four</1>.": "Oops, that's a <1>four-oh-four</1>.",
|
"Oops, that's a <1>four-oh-four</1>.": "Oops, that's a <1>four-oh-four</1>.",
|
||||||
"Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.": "Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.",
|
"Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.": "Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.",
|
||||||
"Search ...": "Search ...",
|
"Search ...": "Search ...",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"- showing {{count}} page(s) of {{totalFileNum}} files -——other": "已显示 {{count}} 页,共 {{totalFileNum}} 个文件",
|
"- showing {{count}} page(s) ——other": "已显示 {{count}} 页",
|
||||||
"{{count}} item(s)——other": "{{count}} 个项目",
|
"{{count}} item(s)——other": "{{count}} 个项目",
|
||||||
"Actions": "操作",
|
"Actions": "操作",
|
||||||
"Cancel": "取消",
|
"Cancel": "取消",
|
||||||
@@ -43,6 +43,8 @@
|
|||||||
"Name": "文件名",
|
"Name": "文件名",
|
||||||
"No more files": "加载完毕",
|
"No more files": "加载完毕",
|
||||||
"Nothing here.": "无内容。",
|
"Nothing here.": "无内容。",
|
||||||
|
"of {{count}} file(s) -——loaded——other": "共 {{count}} 个文件",
|
||||||
|
"of {{count}} file(s) -——loading——other": "共 ... 个文件",
|
||||||
"Oops, that's a <1>four-oh-four</1>.": "Oops,这里是 <1>404</1> 页面。",
|
"Oops, that's a <1>four-oh-four</1>.": "Oops,这里是 <1>404</1> 页面。",
|
||||||
"Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.": "请按下 <2>F12</2> 来打开开发者工具窗口以获取详细信息,或是到 <6>onedrive-vercel-index 社区讨论</6> 处寻求帮助。",
|
"Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.": "请按下 <2>F12</2> 来打开开发者工具窗口以获取详细信息,或是到 <6>onedrive-vercel-index 社区讨论</6> 处寻求帮助。",
|
||||||
"Search ...": "搜索……",
|
"Search ...": "搜索……",
|
||||||
|
|||||||
Reference in New Issue
Block a user