From e28ce30987966e0cf0dd2b991da779e648beeb74 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 06:18:26 +0800 Subject: [PATCH 01/19] add next-i18next as i18n framework --- i18next-scanner.config.js | 26 ++ next-i18next.config.js | 9 + next.config.js | 5 +- package.json | 5 +- pages/[...path].tsx | 9 + pages/_app.tsx | 3 +- pages/index.tsx | 9 + pnpm-lock.yaml | 605 ++++++++++++++++++++++++++++++- public/locales/en/common.json | 1 + public/locales/zh-CN/common.json | 1 + 10 files changed, 655 insertions(+), 18 deletions(-) create mode 100644 i18next-scanner.config.js create mode 100644 next-i18next.config.js create mode 100644 public/locales/en/common.json create mode 100644 public/locales/zh-CN/common.json diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js new file mode 100644 index 0000000..aab3e37 --- /dev/null +++ b/i18next-scanner.config.js @@ -0,0 +1,26 @@ +const path = require('path') + +const { i18n, localePath } = require('./next-i18next.config') + +module.exports = { + input: ['**/*.{ts,tsx}', '!**/node_modules/**'], + options: { + sort: true, + removeUnusedKeys: true, + func: { + list: ['t'], + extensions: ['.ts', '.tsx'] + }, + lngs: i18n.locales, + ns: ['common'], + defaultLng: i18n.defaultLocale, + defaultNs: 'common', + defaultValue: (lng, _ns, key) => (lng === i18n.defaultLocale ? key : ''), + resource: { + loadPath: path.join(localePath, '{{lng}}/{{ns}}.json'), + savePath: path.join(localePath, '{{lng}}/{{ns}}.json') + }, + nsSeparator: false, + keySeparator: false + } +} diff --git a/next-i18next.config.js b/next-i18next.config.js new file mode 100644 index 0000000..bf2e486 --- /dev/null +++ b/next-i18next.config.js @@ -0,0 +1,9 @@ +const path = require('path') + +module.exports = { + i18n: { + defaultLocale: 'en', + locales: ['en', 'zh-CN'] + }, + localePath: path.resolve('public/locales') +} diff --git a/next.config.js b/next.config.js index 0d60710..f296f91 100644 --- a/next.config.js +++ b/next.config.js @@ -1,3 +1,6 @@ +const { i18n } = require('./next-i18next.config') + module.exports = { - reactStrictMode: true, + i18n, + reactStrictMode: true } diff --git a/package.json b/package.json index d433360..d7417ac 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "lint": "next lint", - "format": "prettier components/**/*.tsx config/*.js pages/**/*.tsx {types,utils}/**/*.ts --write" + "format": "prettier components/**/*.tsx config/*.js pages/**/*.tsx {types,utils}/**/*.ts --write", + "extract": "i18next-scanner" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", @@ -25,6 +26,7 @@ "ioredis": "^4.28.2", "jszip": "^3.7.1", "next": "^12.0.10", + "next-i18next": "^10.2.0", "nextjs-progressbar": "^0.0.13", "preview-office-docs": "^1.0.2", "prismjs": "^1.23.0", @@ -60,6 +62,7 @@ "eslint": "8.8.0", "eslint-config-next": "12.0.10", "eslint-config-prettier": "^8.3.0", + "i18next-scanner": "^3.1.0", "postcss": "^8.4.5", "prettier": "^2.5.1", "prettier-plugin-tailwindcss": "^0.1.4", diff --git a/pages/[...path].tsx b/pages/[...path].tsx index 13fb508..4eb6771 100644 --- a/pages/[...path].tsx +++ b/pages/[...path].tsx @@ -1,5 +1,6 @@ import Head from 'next/head' import { useRouter } from 'next/router' +import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import siteConfig from '../config/site.config' import Navbar from '../components/Navbar' @@ -32,3 +33,11 @@ export default function Folders() { ) } + +export async function getStaticProps({ locale }) { + return { + props: { + ...(await serverSideTranslations(locale, ['common'])) + } + } +} diff --git a/pages/_app.tsx b/pages/_app.tsx index 9e4f4eb..b512338 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -55,6 +55,7 @@ import * as Icons from '@fortawesome/free-brands-svg-icons' import type { AppProps } from 'next/app' import NextNProgress from 'nextjs-progressbar' +import { appWithTranslation } from 'next-i18next' // import all brand icons with tree-shaking so all icons can be referenced in the app const iconList = Object.keys(Icons) @@ -117,4 +118,4 @@ function MyApp({ Component, pageProps }: AppProps) { ) } -export default MyApp +export default appWithTranslation(MyApp) diff --git a/pages/index.tsx b/pages/index.tsx index 23789d8..7d6f35f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,4 +1,5 @@ import Head from 'next/head' +import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import siteConfig from '../config/site.config' import Navbar from '../components/Navbar' @@ -29,3 +30,11 @@ export default function Home() { ) } + +export async function getStaticProps({ locale }) { + return { + props: { + ...(await serverSideTranslations(locale, ['common'])) + } + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 514d019..e899cca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,9 +26,11 @@ specifiers: eslint: 8.8.0 eslint-config-next: 12.0.10 eslint-config-prettier: ^8.3.0 + i18next-scanner: ^3.1.0 ioredis: ^4.28.2 jszip: ^3.7.1 next: ^12.0.10 + next-i18next: ^10.2.0 nextjs-progressbar: ^0.0.13 postcss: ^8.4.5 prettier: ^2.5.1 @@ -71,6 +73,7 @@ dependencies: ioredis: 4.28.3 jszip: 3.7.1 next: 12.0.10_react-dom@17.0.2+react@17.0.2 + next-i18next: 10.2.0_61390be992b634a688f7c2555547b55b nextjs-progressbar: 0.0.13_next@12.0.10+react@17.0.2 preview-office-docs: 1.0.2_react@17.0.2 prismjs: 1.26.0 @@ -106,6 +109,7 @@ devDependencies: eslint: 8.8.0 eslint-config-next: 12.0.10_9534215cc73b6f260bf33f1b86e3ae0e eslint-config-prettier: 8.3.0_eslint@8.8.0 + i18next-scanner: 3.1.0 postcss: 8.4.6 prettier: 2.5.1 prettier-plugin-tailwindcss: 0.1.4_prettier@2.5.1 @@ -148,7 +152,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 - dev: true /@eslint/eslintrc/1.0.5: resolution: {integrity: sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==} @@ -412,6 +415,13 @@ packages: '@types/unist': 2.0.6 dev: false + /@types/hoist-non-react-statics/3.3.1: + resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} + dependencies: + '@types/react': 17.0.38 + hoist-non-react-statics: 3.3.2 + dev: false + /@types/ioredis/4.28.7: resolution: {integrity: sha512-jnSGCD2/TPk02j6v6CGqaCEl0LbmLgK6jUuk/AFaSNUBV+SCHiG7E7fnwJreN6hw9GqtLAFkJs4zFbkJrz11mQ==} dependencies: @@ -465,7 +475,6 @@ packages: /@types/prop-types/15.7.4: resolution: {integrity: sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==} - dev: true /@types/react-copy-to-clipboard/5.0.2: resolution: {integrity: sha512-O29AThfxrkUFRsZXjfSWR2yaWo0ppB1yLEnHA+Oh24oNetjBAwTDu1PmolIqdJKzsZiO4J1jn6R6TmO96uBvGg==} @@ -500,11 +509,9 @@ packages: '@types/prop-types': 15.7.4 '@types/scheduler': 0.16.2 csstype: 3.0.10 - dev: true /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} - dev: true /@types/unist/2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} @@ -577,6 +584,24 @@ packages: engines: {node: '>=10.0.0'} dev: false + /acorn-class-fields/0.3.7_acorn@8.7.0: + resolution: {integrity: sha512-jdUWSFce0fuADUljmExz4TWpPkxmRW/ZCPRqeeUzbGf0vFUcpQYbyq52l75qGd0oSwwtAepeL6hgb/naRgvcKQ==} + engines: {node: '>=4.8.2'} + peerDependencies: + acorn: ^6 || ^7 || ^8 + dependencies: + acorn: 8.7.0 + acorn-private-class-elements: 0.2.7_acorn@8.7.0 + dev: true + + /acorn-dynamic-import/4.0.0_acorn@8.7.0: + resolution: {integrity: sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==} + peerDependencies: + acorn: ^6.0.0 + dependencies: + acorn: 8.7.0 + dev: true + /acorn-jsx/5.3.2_acorn@8.7.0: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -593,11 +618,57 @@ packages: xtend: 4.0.2 dev: true + /acorn-private-class-elements/0.2.7_acorn@8.7.0: + resolution: {integrity: sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==} + engines: {node: '>=4.8.2'} + peerDependencies: + acorn: ^6.1.0 || ^7 || ^8 + dependencies: + acorn: 8.7.0 + dev: true + + /acorn-private-methods/0.3.3_acorn@8.7.0: + resolution: {integrity: sha512-46oeEol3YFvLSah5m9hGMlNpxDBCEkdceJgf01AjqKYTK9r6HexKs2rgSbLK81pYjZZMonhftuUReGMlbbv05w==} + engines: {node: '>=4.8.2'} + peerDependencies: + acorn: ^6 || ^7 || ^8 + dependencies: + acorn: 8.7.0 + acorn-private-class-elements: 0.2.7_acorn@8.7.0 + dev: true + + /acorn-stage3/4.0.0_acorn@8.7.0: + resolution: {integrity: sha512-BR+LaADtA6GTB5prkNqWmlmCLYmkyW0whvSxdHhbupTaro2qBJ95fJDEiRLPUmiACGHPaYyeH9xmNJWdGfXRQw==} + engines: {node: '>=4.8.2'} + peerDependencies: + acorn: ^7.4 || ^8 + dependencies: + acorn: 8.7.0 + acorn-class-fields: 0.3.7_acorn@8.7.0 + acorn-private-methods: 0.3.3_acorn@8.7.0 + acorn-static-class-features: 0.2.4_acorn@8.7.0 + dev: true + + /acorn-static-class-features/0.2.4_acorn@8.7.0: + resolution: {integrity: sha512-5X4mpYq5J3pdndLmIB0+WtFd/mKWnNYpuTlTzj32wUu/PMmEGOiayQ5UrqgwdBNiaZBtDDh5kddpP7Yg2QaQYA==} + engines: {node: '>=4.8.2'} + peerDependencies: + acorn: ^6.1.0 || ^7 || ^8 + dependencies: + acorn: 8.7.0 + acorn-private-class-elements: 0.2.7_acorn@8.7.0 + dev: true + /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} dev: true + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -646,6 +717,13 @@ packages: picomatch: 2.3.1 dev: true + /append-buffer/1.0.2: + resolution: {integrity: sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=} + engines: {node: '>=0.10.0'} + dependencies: + buffer-equal: 1.0.0 + dev: true + /arg/5.0.1: resolution: {integrity: sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==} dev: true @@ -805,6 +883,11 @@ packages: picocolors: 1.0.0 dev: true + /buffer-equal/1.0.0: + resolution: {integrity: sha1-WWFrSYME1Var1GaWayLu2j7KX74=} + engines: {node: '>=0.4.0'} + dev: true + /call-bind/1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -869,6 +952,37 @@ packages: resolution: {integrity: sha512-vooFaGFL6ulEP1liiaWFBmmfuPm3cY3y7T9eB83ZTnYc/oFeAKsq3NcDrOkBC8XaauEE8zHQwI7k0+JSYiVQSQ==} dev: false + /clone-buffer/1.0.0: + resolution: {integrity: sha1-4+JbIHrE5wGvch4staFnksrD3Fg=} + engines: {node: '>= 0.10'} + dev: true + + /clone-deep/4.0.1: + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} + dependencies: + is-plain-object: 2.0.4 + kind-of: 6.0.3 + shallow-clone: 3.0.1 + dev: true + + /clone-stats/1.0.0: + resolution: {integrity: sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=} + dev: true + + /clone/2.1.2: + resolution: {integrity: sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=} + engines: {node: '>=0.8'} + dev: true + + /cloneable-readable/1.1.3: + resolution: {integrity: sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==} + dependencies: + inherits: 2.0.4 + process-nextick-args: 2.0.1 + readable-stream: 2.3.7 + dev: true + /clsx/1.1.1: resolution: {integrity: sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==} engines: {node: '>=6'} @@ -904,6 +1018,11 @@ packages: resolution: {integrity: sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg==} dev: false + /commander/6.2.1: + resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} + engines: {node: '>= 6'} + dev: true + /commander/8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} @@ -913,6 +1032,12 @@ packages: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true + /convert-source-map/1.8.0: + resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} + dependencies: + safe-buffer: 5.1.2 + dev: true + /copy-to-clipboard/3.3.1: resolution: {integrity: sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==} dependencies: @@ -931,7 +1056,6 @@ packages: /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: false /cors/2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} @@ -973,7 +1097,6 @@ packages: /csstype/3.0.10: resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} - dev: true /d/1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} @@ -1029,6 +1152,11 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /deepmerge/4.2.2: + resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + engines: {node: '>=0.10.0'} + dev: true + /define-properties/1.1.3: resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==} engines: {node: '>= 0.4'} @@ -1102,6 +1230,15 @@ packages: promise-polyfill: 8.1.3 dev: false + /duplexify/3.7.1: + resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} + dependencies: + end-of-stream: 1.4.4 + inherits: 2.0.4 + readable-stream: 2.3.7 + stream-shift: 1.0.1 + dev: true + /electron-to-chromium/1.4.61: resolution: {integrity: sha512-kpzCOOFlx63C9qKRyIDEsKIUgzoe98ump7T4gU+/OLzj8gYkkWf2SIyBjhTSE0keAjMAp3i7C262YtkQOMYrGw==} dev: true @@ -1114,6 +1251,20 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /end-of-stream/1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: true + + /ensure-array/1.0.0: + resolution: {integrity: sha512-A+3Ntl5WS+GjDnHtC67dKIjw+IoGoeFdNvjn3ZfKEmZgWUz0nxBPE4W52QMCbGZsat0VwWskD5T6AEpe3T2d1g==} + dev: true + + /eol/0.9.1: + resolution: {integrity: sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==} + dev: true + /epubjs/0.3.92: resolution: {integrity: sha512-+uo6Up+tieZm9TthPAWMzTzUl2KKArmGdD7UthMRivWs8o2IWDrKmVJ9P3R8f31/03bgnveTkzCQ17Qvg/6+Fw==} dependencies: @@ -1436,6 +1587,12 @@ packages: eslint-visitor-keys: 3.2.0 dev: true + /esprima-next/5.8.1: + resolution: {integrity: sha512-jPuleZ9j065A9xGKreFh9YSgPlbL9/miG/l4KslkwEb7Ilwl5Ct7BmDkSTHA0rW0qnqLx+hsZWIB66s1XaMAyA==} + engines: {node: '>=12'} + hasBin: true + dev: true + /esquery/1.4.0: resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} engines: {node: '>=0.10'} @@ -1475,7 +1632,6 @@ packages: /extend/3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - dev: false /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1539,6 +1695,13 @@ packages: resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} dev: true + /flush-write-stream/1.1.1: + resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.7 + dev: true + /follow-redirects/1.14.7: resolution: {integrity: sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==} engines: {node: '>=4.0'} @@ -1560,6 +1723,14 @@ packages: resolution: {integrity: sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA==} dev: true + /fs-mkdirp-stream/1.0.0: + resolution: {integrity: sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=} + engines: {node: '>= 0.10'} + dependencies: + graceful-fs: 4.2.9 + through2: 2.0.5 + dev: true + /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} dev: true @@ -1596,6 +1767,13 @@ packages: get-intrinsic: 1.1.1 dev: true + /glob-parent/3.1.0: + resolution: {integrity: sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=} + dependencies: + is-glob: 3.1.0 + path-dirname: 1.0.2 + dev: true + /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1610,6 +1788,22 @@ packages: is-glob: 4.0.3 dev: true + /glob-stream/6.1.0: + resolution: {integrity: sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=} + engines: {node: '>= 0.10'} + dependencies: + extend: 3.0.2 + glob: 7.2.0 + glob-parent: 3.1.0 + is-negated-glob: 1.0.0 + ordered-read-streams: 1.0.1 + pumpify: 1.5.1 + readable-stream: 2.3.7 + remove-trailing-separator: 1.1.0 + to-absolute-glob: 2.0.2 + unique-stream: 2.3.1 + dev: true + /glob/7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} dependencies: @@ -1657,6 +1851,16 @@ packages: csstype: ^2.6.2 dev: false + /graceful-fs/4.2.9: + resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} + dev: true + + /gulp-sort/2.0.0: + resolution: {integrity: sha1-xnYqLx8N4KP8WVohWZ0/rI26Gso=} + dependencies: + through2: 2.0.5 + dev: true + /has-bigints/1.0.1: resolution: {integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==} dev: true @@ -1777,14 +1981,66 @@ packages: space-separated-tokens: 2.0.1 dev: false + /hoist-non-react-statics/3.3.2: + resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + dependencies: + react-is: 16.13.1 + dev: false + /hotkeys-js/3.8.7: resolution: {integrity: sha512-ckAx3EkUr5XjDwjEHDorHxRO2Kb7z6Z2Sxul4MbBkN8Nho7XDslQsgMJT+CiJ5Z4TgRxxvKHEpuLE3imzqy4Lg==} dev: false + /html-escaper/2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + dev: false + + /html-parse-stringify/3.0.1: + resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==} + dependencies: + void-elements: 3.1.0 + dev: false + /html-void-elements/2.0.1: resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} dev: false + /i18next-fs-backend/1.1.4: + resolution: {integrity: sha512-/MfAGMP0jHonV966uFf9PkWWuDjPYLIcsipnSO3NxpNtAgRUKLTwvm85fEmsF6hGeu0zbZiCQ3W74jwO6K9uXA==} + dev: false + + /i18next-scanner/3.1.0: + resolution: {integrity: sha512-dHLXUJIiF1CYJNslCkJFDYJySk5fg+dzdg9O73XXqHcdZwJ2947SWusqq8HdNFB7LpkBi8oTG6TWLZPmqbAh8Q==} + engines: {node: '>=12'} + hasBin: true + dependencies: + acorn: 8.7.0 + acorn-dynamic-import: 4.0.0_acorn@8.7.0 + acorn-jsx: 5.3.2_acorn@8.7.0 + acorn-stage3: 4.0.0_acorn@8.7.0 + acorn-walk: 8.2.0 + chalk: 4.1.2 + clone-deep: 4.0.1 + commander: 6.2.1 + deepmerge: 4.2.2 + ensure-array: 1.0.0 + eol: 0.9.1 + esprima-next: 5.8.1 + gulp-sort: 2.0.0 + i18next: 21.6.10 + lodash: 4.17.21 + parse5: 6.0.1 + sortobject: 4.16.0 + through2: 4.0.2 + vinyl: 2.2.1 + vinyl-fs: 3.0.3 + dev: true + + /i18next/21.6.10: + resolution: {integrity: sha512-Xw+tEGQ61BF6SXtBlFffhM/YhJKHZf2cyDrcNK/l2dE6yVbkPkSasC3VhkAsHXX30vUJ0yG04WIUtf7UvwjOxg==} + dependencies: + '@babel/runtime': 7.16.7 + /ignore/4.0.6: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} engines: {node: '>= 4'} @@ -1854,6 +2110,14 @@ packages: - supports-color dev: false + /is-absolute/1.0.0: + resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==} + engines: {node: '>=0.10.0'} + dependencies: + is-relative: 1.0.0 + is-windows: 1.0.2 + dev: true + /is-arrayish/0.2.1: resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} dev: true @@ -1879,6 +2143,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-buffer/1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + dev: true + /is-buffer/2.0.5: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} @@ -1907,6 +2175,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-glob/3.1.0: + resolution: {integrity: sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1914,6 +2189,11 @@ packages: is-extglob: 2.1.1 dev: true + /is-negated-glob/1.0.0: + resolution: {integrity: sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=} + engines: {node: '>=0.10.0'} + dev: true + /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -1936,6 +2216,13 @@ packages: engines: {node: '>=12'} dev: false + /is-plain-object/2.0.4: + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} + dependencies: + isobject: 3.0.1 + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -1944,6 +2231,13 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-relative/1.0.0: + resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==} + engines: {node: '>=0.10.0'} + dependencies: + is-unc-path: 1.0.0 + dev: true + /is-shared-array-buffer/1.0.1: resolution: {integrity: sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==} dev: true @@ -1962,20 +2256,45 @@ packages: has-symbols: 1.0.2 dev: true + /is-unc-path/1.0.0: + resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} + engines: {node: '>=0.10.0'} + dependencies: + unc-path-regex: 0.1.2 + dev: true + + /is-utf8/0.2.1: + resolution: {integrity: sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=} + dev: true + + /is-valid-glob/1.0.0: + resolution: {integrity: sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=} + engines: {node: '>=0.10.0'} + dev: true + /is-weakref/1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true + /is-windows/1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + /isarray/1.0.0: resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=} - dev: false /isexe/2.0.0: resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} dev: true + /isobject/3.0.1: + resolution: {integrity: sha1-TkMekrEalzFjaqH5yNHMvP2reN8=} + engines: {node: '>=0.10.0'} + dev: true + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2036,6 +2355,11 @@ packages: commander: 8.3.0 dev: false + /kind-of/6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + /kleur/4.1.4: resolution: {integrity: sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==} engines: {node: '>=6'} @@ -2051,6 +2375,20 @@ packages: language-subtag-registry: 0.3.21 dev: true + /lazystream/1.0.1: + resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} + engines: {node: '>= 0.6.3'} + dependencies: + readable-stream: 2.3.7 + dev: true + + /lead/1.0.0: + resolution: {integrity: sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=} + engines: {node: '>= 0.10'} + dependencies: + flush-write-stream: 1.1.1 + dev: true + /levn/0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2112,7 +2450,6 @@ packages: /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: false /longest-streak/3.0.1: resolution: {integrity: sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==} @@ -2572,6 +2909,27 @@ packages: resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} dev: true + /next-i18next/10.2.0_61390be992b634a688f7c2555547b55b: + resolution: {integrity: sha512-HTdXy8U8Ko8oxs+VAog0CQC7Ap/XyvRzwm/g5tF/CzqJ4dSCyWuLmvPjA9BpQ3VEIkxzCA43w1W75CnARRn1lw==} + engines: {node: '>=12'} + peerDependencies: + next: '>= 10.0.0' + react: '>= 16.8.0' + dependencies: + '@babel/runtime': 7.16.7 + '@types/hoist-non-react-statics': 3.3.1 + core-js: 3.21.0 + hoist-non-react-statics: 3.3.2 + i18next: 21.6.10 + i18next-fs-backend: 1.1.4 + next: 12.0.10_react-dom@17.0.2+react@17.0.2 + react: 17.0.2 + react-i18next: 11.15.3_f9635d5d32d7f130f7fe8a33cbdb7283 + transitivePeerDependencies: + - react-dom + - react-native + dev: false + /next-tick/1.0.0: resolution: {integrity: sha1-yobR/ogoFpsBICCOPchCS524NCw=} dev: false @@ -2634,6 +2992,13 @@ packages: resolution: {integrity: sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==} dev: true + /normalize-path/2.1.1: + resolution: {integrity: sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=} + engines: {node: '>=0.10.0'} + dependencies: + remove-trailing-separator: 1.1.0 + dev: true + /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -2644,6 +3009,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /now-and-later/2.0.1: + resolution: {integrity: sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==} + engines: {node: '>= 0.10'} + dependencies: + once: 1.4.0 + dev: true + /nprogress/0.2.0: resolution: {integrity: sha1-y480xTIT2JVyP8urkH6UIq28r7E=} dev: false @@ -2732,6 +3104,12 @@ packages: word-wrap: 1.2.3 dev: true + /ordered-read-streams/1.0.1: + resolution: {integrity: sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=} + dependencies: + readable-stream: 2.3.7 + dev: true + /p-limit/1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} @@ -2779,7 +3157,10 @@ packages: /parse5/6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - dev: false + + /path-dirname/1.0.2: + resolution: {integrity: sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=} + dev: true /path-exists/3.0.0: resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} @@ -2924,7 +3305,6 @@ packages: /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: false /promise-polyfill/8.1.3: resolution: {integrity: sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==} @@ -2941,6 +3321,21 @@ packages: resolution: {integrity: sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w==} dev: false + /pump/2.0.1: + resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + + /pumpify/1.5.1: + resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} + dependencies: + duplexify: 3.7.1 + inherits: 2.0.4 + pump: 2.0.1 + dev: true + /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} @@ -3033,6 +3428,27 @@ packages: react-dom: 17.0.2_react@17.0.2 dev: false + /react-i18next/11.15.3_f9635d5d32d7f130f7fe8a33cbdb7283: + resolution: {integrity: sha512-RSUEM4So3Tu2JHV0JsZ5Yje+4nz66YViMfPZoywxOy0xyn3L7tE2CHvJ7Y9LUsrTU7vGmZ5bwb8PpjnkatdIxg==} + peerDependencies: + i18next: '>= 19.0.0' + react: '>= 16.8.0' + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + '@babel/runtime': 7.16.7 + html-escaper: 2.0.2 + html-parse-stringify: 3.0.1 + i18next: 21.6.10 + react: 17.0.2 + react-dom: 17.0.2_react@17.0.2 + dev: false + /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -3103,7 +3519,15 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 - dev: false + + /readable-stream/3.6.0: + resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -3130,7 +3554,6 @@ packages: /regenerator-runtime/0.13.9: resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} - dev: true /regexp.prototype.flags/1.4.1: resolution: {integrity: sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==} @@ -3212,11 +3635,44 @@ packages: unified: 10.1.1 dev: false + /remove-bom-buffer/3.0.0: + resolution: {integrity: sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==} + engines: {node: '>=0.10.0'} + dependencies: + is-buffer: 1.1.6 + is-utf8: 0.2.1 + dev: true + + /remove-bom-stream/1.2.0: + resolution: {integrity: sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=} + engines: {node: '>= 0.10'} + dependencies: + remove-bom-buffer: 3.0.0 + safe-buffer: 5.1.2 + through2: 2.0.5 + dev: true + + /remove-trailing-separator/1.1.0: + resolution: {integrity: sha1-wkvOKig62tW8P1jg1IJJuSN52O8=} + dev: true + + /replace-ext/1.0.1: + resolution: {integrity: sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==} + engines: {node: '>= 0.10'} + dev: true + /resolve-from/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true + /resolve-options/1.1.0: + resolution: {integrity: sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=} + engines: {node: '>= 0.10'} + dependencies: + value-or-function: 3.0.0 + dev: true + /resolve/1.22.0: resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} hasBin: true @@ -3260,7 +3716,6 @@ packages: /safe-buffer/5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false /scheduler/0.20.2: resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} @@ -3287,6 +3742,13 @@ packages: engines: {node: '>=0.10.0'} dev: false + /shallow-clone/3.0.1: + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} + dependencies: + kind-of: 6.0.3 + dev: true + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3312,6 +3774,11 @@ packages: engines: {node: '>=8'} dev: true + /sortobject/4.16.0: + resolution: {integrity: sha512-jdcWhqJjxyYxRcXa30qImF3PZea1GpNwdKxUac28T28+GodptH4XihPuRlgCY0hITIEQVnw8DtQ81Fb6fomBaw==} + engines: {node: '>=10'} + dev: true + /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -3324,6 +3791,10 @@ packages: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} dev: false + /stream-shift/1.0.1: + resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} + dev: true + /string.prototype.matchall/4.0.6: resolution: {integrity: sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg==} dependencies: @@ -3355,7 +3826,6 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 - dev: false /strip-ansi/6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -3461,6 +3931,34 @@ packages: resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} dev: true + /through2-filter/3.0.0: + resolution: {integrity: sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==} + dependencies: + through2: 2.0.5 + xtend: 4.0.2 + dev: true + + /through2/2.0.5: + resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} + dependencies: + readable-stream: 2.3.7 + xtend: 4.0.2 + dev: true + + /through2/4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + dependencies: + readable-stream: 3.6.0 + dev: true + + /to-absolute-glob/2.0.2: + resolution: {integrity: sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=} + engines: {node: '>=0.10.0'} + dependencies: + is-absolute: 1.0.0 + is-negated-glob: 1.0.0 + dev: true + /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3468,6 +3966,13 @@ packages: is-number: 7.0.0 dev: true + /to-through/2.0.0: + resolution: {integrity: sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=} + engines: {node: '>= 0.10'} + dependencies: + through2: 2.0.5 + dev: true + /toggle-selection/1.0.6: resolution: {integrity: sha1-bkWxJj8gF/oKzH2J14sVuL932jI=} dev: false @@ -3534,6 +4039,11 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /unc-path-regex/0.1.2: + resolution: {integrity: sha1-5z3T17DXxe2G+6xrCufYxqadUPo=} + engines: {node: '>=0.10.0'} + dev: true + /unified/10.1.1: resolution: {integrity: sha512-v4ky1+6BN9X3pQrOdkFIPWAaeDsHPE1svRDxq7YpTc2plkIqFMwukfqM+l0ewpP9EfwARlt9pPFAeWYhHm8X9w==} dependencies: @@ -3546,6 +4056,13 @@ packages: vfile: 5.3.0 dev: false + /unique-stream/2.3.1: + resolution: {integrity: sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==} + dependencies: + json-stable-stringify-without-jsonify: 1.0.1 + through2-filter: 3.0.0 + dev: true + /unist-builder/3.0.0: resolution: {integrity: sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ==} dependencies: @@ -3664,6 +4181,11 @@ packages: resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} dev: true + /value-or-function/3.0.0: + resolution: {integrity: sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=} + engines: {node: '>= 0.10'} + dev: true + /vary/1.1.2: resolution: {integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=} engines: {node: '>= 0.8'} @@ -3692,6 +4214,59 @@ packages: vfile-message: 3.1.0 dev: false + /vinyl-fs/3.0.3: + resolution: {integrity: sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==} + engines: {node: '>= 0.10'} + dependencies: + fs-mkdirp-stream: 1.0.0 + glob-stream: 6.1.0 + graceful-fs: 4.2.9 + is-valid-glob: 1.0.0 + lazystream: 1.0.1 + lead: 1.0.0 + object.assign: 4.1.2 + pumpify: 1.5.1 + readable-stream: 2.3.7 + remove-bom-buffer: 3.0.0 + remove-bom-stream: 1.2.0 + resolve-options: 1.1.0 + through2: 2.0.5 + to-through: 2.0.0 + value-or-function: 3.0.0 + vinyl: 2.2.1 + vinyl-sourcemap: 1.1.0 + dev: true + + /vinyl-sourcemap/1.1.0: + resolution: {integrity: sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=} + engines: {node: '>= 0.10'} + dependencies: + append-buffer: 1.0.2 + convert-source-map: 1.8.0 + graceful-fs: 4.2.9 + normalize-path: 2.1.1 + now-and-later: 2.0.1 + remove-bom-buffer: 3.0.0 + vinyl: 2.2.1 + dev: true + + /vinyl/2.2.1: + resolution: {integrity: sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==} + engines: {node: '>= 0.10'} + dependencies: + clone: 2.1.2 + clone-buffer: 1.0.0 + clone-stats: 1.0.0 + cloneable-readable: 1.1.3 + remove-trailing-separator: 1.1.0 + replace-ext: 1.0.1 + dev: true + + /void-elements/3.1.0: + resolution: {integrity: sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=} + engines: {node: '>=0.10.0'} + dev: false + /web-namespaces/2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} dev: false diff --git a/public/locales/en/common.json b/public/locales/en/common.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/public/locales/en/common.json @@ -0,0 +1 @@ +{} diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/public/locales/zh-CN/common.json @@ -0,0 +1 @@ +{} From 5bd04045b1cb92411554093b455c56b76003b84d Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 06:54:52 +0800 Subject: [PATCH 02/19] fix pages get props --- pages/[...path].tsx | 2 +- pages/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/[...path].tsx b/pages/[...path].tsx index 4eb6771..f79b095 100644 --- a/pages/[...path].tsx +++ b/pages/[...path].tsx @@ -34,7 +34,7 @@ export default function Folders() { ) } -export async function getStaticProps({ locale }) { +export async function getServerSideProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ['common'])) diff --git a/pages/index.tsx b/pages/index.tsx index 7d6f35f..b506ccc 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -31,7 +31,7 @@ export default function Home() { ) } -export async function getStaticProps({ locale }) { +export async function getServerSideProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ['common'])) From 85b51fe5c143e68ae49eca0b2dce36bd88d1b36d Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 06:55:38 +0800 Subject: [PATCH 03/19] add some zh-CN translations --- components/Breadcrumb.tsx | 5 ++++- components/FileListing.tsx | 27 ++++++++++++++++-------- components/FolderListLayout.tsx | 33 ++++++++++++++++-------------- components/MultiFileDownloader.tsx | 7 +++++-- components/Navbar.tsx | 5 ++++- components/SwitchLayout.tsx | 17 +++++++++++++-- public/locales/en/common.json | 33 +++++++++++++++++++++++++++++- public/locales/zh-CN/common.json | 33 +++++++++++++++++++++++++++++- 8 files changed, 128 insertions(+), 32 deletions(-) diff --git a/components/Breadcrumb.tsx b/components/Breadcrumb.tsx index 726ccf1..f452eb1 100644 --- a/components/Breadcrumb.tsx +++ b/components/Breadcrumb.tsx @@ -2,13 +2,16 @@ import type { ParsedUrlQuery } from 'querystring' import Link from 'next/link' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { useTranslation } from 'next-i18next' const HomeCrumb = () => { + const { t } = useTranslation() + return ( - Home + {t('Home')} ) diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 6dbfa07..1178741 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -7,6 +7,7 @@ import { FC, MouseEventHandler, SetStateAction, useEffect, useRef, useState } fr import dynamic from 'next/dynamic' import { useRouter } from 'next/router' +import { useTranslation } from 'next-i18next' import useLocalStorage from '../utils/useLocalStorage' import { getPreviewType, preview } from '../utils/getPreviewType' @@ -146,6 +147,8 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { const router = useRouter() const [layout, _] = useLocalStorage('preferredLayout', layouts[0]) + const { t } = useTranslation() + const path = queryToPath(query) const { data, error, size, setSize } = useProtectedSWRInfinite(path) @@ -166,7 +169,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { if (!data) { return ( - + ) } @@ -240,13 +243,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { downloadMultipleFiles({ toastId, router, files, folder }) .then(() => { setTotalGenerating(false) - toast.success('Finished downloading selected files.', { + toast.success(t('Finished downloading selected files.'), { id: toastId, }) }) .catch(() => { setTotalGenerating(false) - toast.error('Failed to download selected files.', { id: toastId }) + toast.error(t('Failed to download selected files.'), { id: toastId }) }) } } @@ -256,7 +259,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { const files = (async function* () { for await (const { meta: c, path: p, isFolder, error } of traverseFolder(path)) { if (error) { - toast.error(`Failed to download folder ${p}: ${error.status} ${error.message} Skipped it to continue.`) + toast.error( + t('Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.', { + path: p, + status: error.status, + message: error.message + }) + ) continue } yield { @@ -280,11 +289,11 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { }) .then(() => { setFolderGenerating({ ...folderGenerating, [id]: false }) - toast.success('Finished downloading folder.', { id: toastId }) + toast.success(t('Finished downloading folder.'), { id: toastId }) }) .catch(() => { setFolderGenerating({ ...folderGenerating, [id]: false }) - toast.error('Failed to download folder.', { id: toastId }) + toast.error(t('Failed to download folder.'), { id: toastId }) }) } @@ -324,13 +333,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { {isLoadingMore ? ( <> - Loading ...{' '} + {t('Loading ...')}{' '} ) : isReachingEnd ? ( - No more files + {t('No more files')} ) : ( <> - Load more + {t('Load more')} )} diff --git a/components/FolderListLayout.tsx b/components/FolderListLayout.tsx index 897cd70..2c3d7de 100644 --- a/components/FolderListLayout.tsx +++ b/components/FolderListLayout.tsx @@ -4,6 +4,7 @@ import Link from 'next/link' import { FC } from 'react' import { useClipboard } from 'use-clipboard-copy' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { useTranslation } from 'next-i18next' import { getBaseUrl } from '../utils/getBaseUrl' import { humanFileSize, formatModifiedDateTime } from '../utils/fileDetails' @@ -44,20 +45,22 @@ const FolderListLayout = ({ }) => { const clipboard = useClipboard() + const { t } = useTranslation() + return (
- Name + {t('Name')}
- Last Modified + {t('Last Modified')}
- Size + {t('Size')}
- Actions + {t('Actions')}
@@ -65,13 +68,13 @@ const FolderListLayout = ({ checked={totalSelected} onChange={toggleTotalSelected} indeterminate={true} - title={'Select files'} + title={t('Select files')} /> {totalGenerating ? ( - + ) : (
) diff --git a/components/Navbar.tsx b/components/Navbar.tsx index a2d6236..2ea78a6 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -8,6 +8,7 @@ import Link from 'next/link' import Image from 'next/image' import { useRouter } from 'next/router' import { Fragment, useEffect, useState } from 'react' +import { useTranslation } from 'next-i18next' import siteConfig from '../config/site.config' import SearchModal from './SearchModal' @@ -37,6 +38,8 @@ const Navbar = () => { setTokenPresent(storedToken()) }, []) + const { t } = useTranslation() + const clearTokens = () => { setIsOpen(false) @@ -71,7 +74,7 @@ const Navbar = () => { >
- Search ... + {t('Search ...')}
diff --git a/components/SwitchLayout.tsx b/components/SwitchLayout.tsx index ebf31b6..af76888 100644 --- a/components/SwitchLayout.tsx +++ b/components/SwitchLayout.tsx @@ -2,6 +2,7 @@ import { Fragment } from 'react' import { IconProp } from '@fortawesome/fontawesome-svg-core' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { Listbox, Transition } from '@headlessui/react' +import { useTranslation } from 'next-i18next' import useLocalStorage from '../utils/useLocalStorage' @@ -13,13 +14,21 @@ export const layouts: Array<{ id: number; name: 'Grid' | 'List'; icon: IconProp export const SwitchLayout = () => { const [preferredLayout, setPreferredLayout] = useLocalStorage('preferredLayout', layouts[0]) + const { t } = useTranslation() + return (
- {preferredLayout.name} + + { + // t('Grid') + // t('List') + t(preferredLayout.name) + } + @@ -39,7 +48,11 @@ export const SwitchLayout = () => { > - {layout.name} + { + // t('Grid') + // t('List') + t(layout.name) + } {layout.name === preferredLayout.name && ( diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 0967ef4..c23ed78 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -1 +1,32 @@ -{} +{ + "Actions": "Actions", + "Cancel": "Cancel", + "Copied folder permalink.": "Copied folder permalink.", + "Copied raw file permalink.": "Copied raw file permalink.", + "Copy folder permalink": "Copy folder permalink", + "Copy raw file permalink": "Copy raw file permalink", + "Download file": "Download file", + "Download folder": "Download folder", + "Download selected files": "Download selected files", + "Downloading folder, refresh page to cancel": "Downloading folder, refresh page to cancel", + "Downloading selected files, refresh page to cancel": "Downloading selected files, refresh page to cancel", + "Downloading selected files...": "Downloading selected files...", + "Downloading {{progress}}%": "Downloading {{progress}}%", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.", + "Failed to download folder.": "Failed to download folder.", + "Failed to download selected files.": "Failed to download selected files.", + "Finished downloading folder.": "Finished downloading folder.", + "Finished downloading selected files.": "Finished downloading selected files.", + "Grid": "Grid", + "Home": "Home", + "Last Modified": "Last Modified", + "List": "List", + "Load more": "Load more", + "Loading ...": "Loading ...", + "Name": "Name", + "No more files": "No more files", + "Search ...": "Search ...", + "Select file": "Select file", + "Select files": "Select files", + "Size": "Size" +} diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index 0967ef4..c5afe04 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -1 +1,32 @@ -{} +{ + "Actions": "操作", + "Cancel": "取消", + "Copied folder permalink.": "已复制文件夹永久链接。", + "Copied raw file permalink.": "已复制文件永久链接。", + "Copy folder permalink": "复制文件夹永久链接", + "Copy raw file permalink": "复制文件永久链接", + "Download file": "下载此文件", + "Download folder": "下载此文件夹", + "Download selected files": "下载选定文件", + "Downloading folder, refresh page to cancel": "下载文件夹中,刷新页面以取消", + "Downloading selected files, refresh page to cancel": "下载选定文件中,刷新页面以取消", + "Downloading selected files...": "下载选定文件中...", + "Downloading {{progress}}%": "已下载 {{progress}}%", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "下载文件夹 {{path}} 失败:{{status}} {{message}} 已忽略此错误并继续下载。", + "Failed to download folder.": "下载文件夹失败。", + "Failed to download selected files.": "下载选定文件失败。", + "Finished downloading folder.": "下载文件夹成功。", + "Finished downloading selected files.": "下载选定文件成功。", + "Grid": "图格", + "Home": "首页", + "Last Modified": "最后修改时间", + "List": "列表", + "Load more": "加载更多", + "Loading ...": "加载中……", + "Name": "文件名", + "No more files": "加载完毕", + "Search ...": "搜索……", + "Select file": "选择此文件", + "Select files": "选择以下文件", + "Size": "文件大小" +} From aa848c92f81ac97b4d1de7317e7bef9a96262081 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 17:26:46 +0800 Subject: [PATCH 04/19] add trailing slash config to fix i18n with api routes --- next.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index f296f91..fa13553 100644 --- a/next.config.js +++ b/next.config.js @@ -2,5 +2,7 @@ const { i18n } = require('./next-i18next.config') module.exports = { i18n, - reactStrictMode: true + reactStrictMode: true, + // Required by Next i18n with API routes, otherwise API routes 404 when fetching without trailing slash + trailingSlash: true } From 2df258f7917d6c0dc15243d401a4201f75c14ea8 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 18:35:03 +0800 Subject: [PATCH 05/19] add trans support and hook all compnents excluding preview dir --- components/Auth.tsx | 9 ++++++--- components/DownloadBtnGtoup.tsx | 17 ++++++++++------- components/FileListing.tsx | 7 +++++-- components/FolderGridLayout.tsx | 25 ++++++++++++++----------- components/FourOhFour.tsx | 33 ++++++++++++++++++++------------- components/Navbar.tsx | 24 +++++++++++++++--------- components/SearchModal.tsx | 24 ++++++++++++++++++------ i18next-scanner.config.js | 10 +++++++--- package.json | 1 + pnpm-lock.yaml | 14 ++++++++++++++ 10 files changed, 110 insertions(+), 54 deletions(-) diff --git a/components/Auth.tsx b/components/Auth.tsx index af67829..16ab760 100644 --- a/components/Auth.tsx +++ b/components/Auth.tsx @@ -3,6 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Image from 'next/image' import { useRouter } from 'next/router' import { FC, useState } from 'react' +import { useTranslation } from 'next-i18next' import { matchProtectedRoute } from '../utils/protectedRouteHandler' import useLocalStorage from '../utils/useLocalStorage' @@ -14,16 +15,18 @@ const Auth: FC<{ redirect: string }> = ({ redirect }) => { const [token, setToken] = useState('') const [_, setPersistedToken] = useLocalStorage(authTokenPath, '') + const { t } = useTranslation() + return (
authenticate
-
Enter Password
+
{t('Enter Password')}

- This route (the folder itself and the files inside) is password protected. If you know the password, please - enter it below. + {t('This route (the folder itself and the files inside) is password protected. ') + + t('If you know the password, please enter it below.')}

diff --git a/components/DownloadBtnGtoup.tsx b/components/DownloadBtnGtoup.tsx index 7f0eabc..f86ffc7 100644 --- a/components/DownloadBtnGtoup.tsx +++ b/components/DownloadBtnGtoup.tsx @@ -3,6 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { IconProp } from '@fortawesome/fontawesome-svg-core' import toast from 'react-hot-toast' import { useClipboard } from 'use-clipboard-copy' +import { useTranslation } from 'next-i18next' import Image from 'next/image' import { useRouter } from 'next/router' @@ -63,31 +64,33 @@ const DownloadButtonGroup: React.FC<{ downloadUrl: string }> = ({ downloadUrl }) const { asPath } = useRouter() const clipboard = useClipboard() + const { t } = useTranslation() + return (
window.open(downloadUrl)} btnColor="blue" - btnText="Download" + btnText={t('Download')} btnIcon="file-download" - btnTitle="Download the file directly through OneDrive" + btnTitle={t('Download the file directly through OneDrive')} /> {/* window.open(`/api/proxy?url=${encodeURIComponent(downloadUrl)}`)} btnColor="teal" - btnText="Proxy download" + btnText={t('Proxy download')} btnIcon="download" - btnTitle="Download the file with the stream proxied through Vercel Serverless" + btnTitle={t('Download the file with the stream proxied through Vercel Serverless')} /> */} { clipboard.copy(`${getBaseUrl()}/api?path=${asPath}&raw=true`) - toast.success('Copied direct link to clipboard.') + toast.success(t('Copied direct link to clipboard.')) }} btnColor="pink" - btnText="Copy direct link" + btnText={t('Copy direct link')} btnIcon="copy" - btnTitle="Copy the permalink to the file to the clipboard" + btnTitle={t('Copy the permalink to the file to the clipboard')} />
) diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 1178741..499f330 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -321,7 +321,10 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { {!onlyOnePage && (
- - showing {size} page{size > 1 ? 's' : ''} of {isLoadingMore ? '...' : folderChildren.length} files - + {t('- showing {{count}} page(s) of {{totalFileNum}} files -', { + count: size, + totalFileNum: isLoadingMore ? '...' : folderChildren.length + })}
diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 2ea78a6..c74d034 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -47,7 +47,7 @@ const Navbar = () => { localStorage.removeItem(r) }) - toast.success('Cleared all tokens') + toast.success(t('Cleared all tokens')) setTimeout(() => { router.reload() }, 1000) @@ -95,14 +95,20 @@ const Navbar = () => { className="flex items-center space-x-2 hover:opacity-80 dark:text-white" > - {l.name} + + { + // Append link name comments here to add translations + // t('Weibo') + t(l.name) + } + ))} {siteConfig.email && ( - Email + {t('Email')} )} @@ -111,7 +117,7 @@ const Navbar = () => { className="flex items-center space-x-2 p-2 hover:opacity-80 dark:text-white" onClick={() => setIsOpen(true)} > - Logout + {t('Logout')} )} @@ -148,12 +154,12 @@ const Navbar = () => { >
- Clear all tokens? + {t('Clear all tokens?')}

- These tokens are used to authenticate yourself into password protected folders, clearing them means - that you will need to re-enter the passwords again. + {t('These tokens are used to authenticate yourself into password protected folders, ') + + t('clearing them means that you will need to re-enter the passwords again.')}

@@ -171,14 +177,14 @@ const Navbar = () => { className="mr-3 inline-flex items-center justify-center space-x-2 rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300" onClick={() => setIsOpen(false)} > - Cancel + {t('Cancel')}
diff --git a/components/SearchModal.tsx b/components/SearchModal.tsx index f416426..ae0016d 100644 --- a/components/SearchModal.tsx +++ b/components/SearchModal.tsx @@ -4,6 +4,7 @@ import { Dispatch, Fragment, SetStateAction, useState } from 'react' import AwesomeDebouncePromise from 'awesome-debounce-promise' import { useAsync } from 'react-async-hook' import useConstant from 'use-constant' +import { useTranslation } from 'next-i18next' import Link from 'next/link' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' @@ -112,12 +113,19 @@ function SearchResultItemTemplate({ function SearchResultItemLoadRemote({ result }: { result: OdSearchResult[number] }) { const { data, error }: SWRResponse = useSWR(`/api/item?id=${result.id}`, fetcher) + const { t } = useTranslation() + if (error) { return } if (!data) { return ( - + ) } @@ -159,6 +167,8 @@ export default function SearchModal({ }) { const { query, setQuery, results } = useDriveItemSearch() + const { t } = useTranslation() + const closeSearchBox = () => { setSearchOpen(false) setQuery('') @@ -199,13 +209,13 @@ export default function SearchModal({ type="text" id="search-box" className="w-full bg-transparent focus:outline-none focus-visible:outline-none" - placeholder="Search ..." + placeholder={t('Search ...')} value={query} onChange={e => setQuery(e.target.value)} />
ESC
- +
{t('Nothing here.')}
- Loading ... + {t('Loading ...')}
)} {results.error && ( -
Error: {results.error.message}
+
+ {t('Error: {{message}}', { message: results.error.message })} +
)} {results.result && ( <> {results.result.length === 0 ? ( -
Nothing here.
+
{t('Nothing here.')}
) : ( results.result.map(result => ) )} diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js index aab3e37..ec12847 100644 --- a/i18next-scanner.config.js +++ b/i18next-scanner.config.js @@ -1,4 +1,5 @@ const path = require('path') +const tsTransform = require('i18next-scanner-typescript') const { i18n, localePath } = require('./next-i18next.config') @@ -8,8 +9,10 @@ module.exports = { sort: true, removeUnusedKeys: true, func: { - list: ['t'], - extensions: ['.ts', '.tsx'] + list: ['t'] + }, + trans: { + fallbackKey: (_ns, val) => val }, lngs: i18n.locales, ns: ['common'], @@ -22,5 +25,6 @@ module.exports = { }, nsSeparator: false, keySeparator: false - } + }, + transform: tsTransform() } diff --git a/package.json b/package.json index d7417ac..1a7e39a 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "eslint-config-next": "12.0.10", "eslint-config-prettier": "^8.3.0", "i18next-scanner": "^3.1.0", + "i18next-scanner-typescript": "^1.0.6", "postcss": "^8.4.5", "prettier": "^2.5.1", "prettier-plugin-tailwindcss": "^0.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e899cca..c6ca845 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,7 @@ specifiers: eslint-config-next: 12.0.10 eslint-config-prettier: ^8.3.0 i18next-scanner: ^3.1.0 + i18next-scanner-typescript: ^1.0.6 ioredis: ^4.28.2 jszip: ^3.7.1 next: ^12.0.10 @@ -110,6 +111,7 @@ devDependencies: eslint-config-next: 12.0.10_9534215cc73b6f260bf33f1b86e3ae0e eslint-config-prettier: 8.3.0_eslint@8.8.0 i18next-scanner: 3.1.0 + i18next-scanner-typescript: 1.0.6 postcss: 8.4.6 prettier: 2.5.1 prettier-plugin-tailwindcss: 0.1.4_prettier@2.5.1 @@ -2009,6 +2011,12 @@ packages: resolution: {integrity: sha512-/MfAGMP0jHonV966uFf9PkWWuDjPYLIcsipnSO3NxpNtAgRUKLTwvm85fEmsF6hGeu0zbZiCQ3W74jwO6K9uXA==} dev: false + /i18next-scanner-typescript/1.0.6: + resolution: {integrity: sha512-v6kULnsv32OlFM9pnWTH+wNtRXf5owmFUNBYcX78jbZxQBFnTCUo3w99JjnxuzuXA9ch4UKNQBnt2P/o94eyeQ==} + dependencies: + typescript: 3.9.10 + dev: true + /i18next-scanner/3.1.0: resolution: {integrity: sha512-dHLXUJIiF1CYJNslCkJFDYJySk5fg+dzdg9O73XXqHcdZwJ2947SWusqq8HdNFB7LpkBi8oTG6TWLZPmqbAh8Q==} engines: {node: '>=12'} @@ -4024,6 +4032,12 @@ packages: resolution: {integrity: sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==} dev: false + /typescript/3.9.10: + resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typescript/4.5.5: resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} engines: {node: '>=4.2.0'} From 24507cbbb92c2d867b3ee33d2fd19e4bf64a41d0 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 19:26:11 +0800 Subject: [PATCH 06/19] add translation json and fix some missed hooks --- components/FolderGridLayout.tsx | 2 +- public/locales/en/common.json | 28 +++++++++++++++++++++++++++- public/locales/zh-CN/common.json | 26 +++++++++++++++++++++++++- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/components/FolderGridLayout.tsx b/components/FolderGridLayout.tsx index 53e98ac..b0d0149 100644 --- a/components/FolderGridLayout.tsx +++ b/components/FolderGridLayout.tsx @@ -71,7 +71,7 @@ const FolderGridLayout = ({ return (
-
{folderChildren.length} items
+
{t('{{count}} item(s)', { count: folderChildren.length })}
four-oh-four.": "Oops, that's a <1>four-oh-four.", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.", "Search ...": "Search ...", + "Select all files": "Select all files", "Select file": "Select file", "Select files": "Select files", - "Size": "Size" + "Size": "Size", + "These tokens are used to authenticate yourself into password protected folders, ": "These tokens are used to authenticate yourself into password protected folders, ", + "This route (the folder itself and the files inside) is password protected. ": "This route (the folder itself and the files inside) is password protected. ", + "Weibo": "Weibo", + "clearing them means that you will need to re-enter the passwords again.": "clearing them means that you will need to re-enter the passwords again.", + "{{count}} item(s)": "{{count}} item", + "{{count}} item(s)_plural": "{{count}} items" } diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index c5afe04..980ae07 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -1,17 +1,30 @@ { + "- showing {{count}} page(s) of {{totalFileNum}} files -": "已显示 {{count}} 页,共 {{totalFileNum}} 个文件", "Actions": "操作", "Cancel": "取消", + "Cannot preview {{path}}": "无法预览 {{path}}", + "Clear all": "清楚所有密钥", + "Clear all tokens?": "清楚所有密钥?", + "Cleared all tokens": "已清楚所有密钥", + "Copied direct link to clipboard.": "已复制直链到剪贴板。", "Copied folder permalink.": "已复制文件夹永久链接。", "Copied raw file permalink.": "已复制文件永久链接。", + "Copy direct link": "复制直链", "Copy folder permalink": "复制文件夹永久链接", "Copy raw file permalink": "复制文件永久链接", + "Copy the permalink to the file to the clipboard": "复制文件永久链接到剪贴板", + "Download": "下载", "Download file": "下载此文件", "Download folder": "下载此文件夹", "Download selected files": "下载选定文件", + "Download the file directly through OneDrive": "直接从 OneDrive 下载文件", "Downloading folder, refresh page to cancel": "下载文件夹中,刷新页面以取消", "Downloading selected files, refresh page to cancel": "下载选定文件中,刷新页面以取消", "Downloading selected files...": "下载选定文件中...", "Downloading {{progress}}%": "已下载 {{progress}}%", + "Email": "电子邮件", + "Enter Password": "输入密码", + "Error: {{message}}": "错误:{{message}}", "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "下载文件夹 {{path}} 失败:{{status}} {{message}} 已忽略此错误并继续下载。", "Failed to download folder.": "下载文件夹失败。", "Failed to download selected files.": "下载选定文件失败。", @@ -19,14 +32,25 @@ "Finished downloading selected files.": "下载选定文件成功。", "Grid": "图格", "Home": "首页", + "If you know the password, please enter it below.": "如果您知晓密码,请在下面输入。", "Last Modified": "最后修改时间", "List": "列表", "Load more": "加载更多", "Loading ...": "加载中……", + "Logout": "注销", "Name": "文件名", "No more files": "加载完毕", + "Nothing here.": "无内容。", + "Oops, that's a <1>four-oh-four.": "Oops,这里是 <1>404 页面。", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "请按下 <2>F12 来打开开发者工具窗口以获取详细信息,或是到 <6>onedrive-vercel-index 社区讨论 处寻求帮助。", "Search ...": "搜索……", + "Select all files": "选择所有文件", "Select file": "选择此文件", "Select files": "选择以下文件", - "Size": "文件大小" + "Size": "文件大小", + "These tokens are used to authenticate yourself into password protected folders, ": "这些密钥是用来验证您的身份以访问密钥保护下的文件夹的,", + "This route (the folder itself and the files inside) is password protected. ": "此路由(此文件夹和其中的文件)是受密钥保护的。", + "Weibo": "微博", + "clearing them means that you will need to re-enter the passwords again.": "清除它们意味着下次访问时您需要重新输入密钥。", + "{{count}} item(s)": "{{count}} 个项目" } From c0353b5455e2be617bf5cbcd30e53b8862b97331 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 19:47:36 +0800 Subject: [PATCH 07/19] migrate from i18next-scanner to i18next-parser i18next-scanner does not support i18next JSON v4 format --- i18next-parser.config.js | 17 ++ i18next-scanner.config.js | 30 -- package.json | 5 +- pnpm-lock.yaml | 501 ++++++++++++++++++++++--------- public/locales/en/common.json | 16 +- public/locales/zh-CN/common.json | 12 +- 6 files changed, 384 insertions(+), 197 deletions(-) create mode 100644 i18next-parser.config.js delete mode 100644 i18next-scanner.config.js diff --git a/i18next-parser.config.js b/i18next-parser.config.js new file mode 100644 index 0000000..177b2c3 --- /dev/null +++ b/i18next-parser.config.js @@ -0,0 +1,17 @@ +const path = require('path') + +const { i18n, localePath } = require('./next-i18next.config') + +module.exports = { + createOldCatalogs: false, + defaultNamespace: 'common', + defaultValue: (lng, _ns, key) => (lng === i18n.defaultLocale ? key : ''), + keySeparator: false, + namespaceSeparator: false, + pluralSeparator: '——', + lineEnding: 'lf', + locales: i18n.locales, + output: path.join(localePath, '$LOCALE/$NAMESPACE.json'), + input: ['**/*.{ts,tsx}', '!**/node_modules/**'], + sort: true +} diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js deleted file mode 100644 index ec12847..0000000 --- a/i18next-scanner.config.js +++ /dev/null @@ -1,30 +0,0 @@ -const path = require('path') -const tsTransform = require('i18next-scanner-typescript') - -const { i18n, localePath } = require('./next-i18next.config') - -module.exports = { - input: ['**/*.{ts,tsx}', '!**/node_modules/**'], - options: { - sort: true, - removeUnusedKeys: true, - func: { - list: ['t'] - }, - trans: { - fallbackKey: (_ns, val) => val - }, - lngs: i18n.locales, - ns: ['common'], - defaultLng: i18n.defaultLocale, - defaultNs: 'common', - defaultValue: (lng, _ns, key) => (lng === i18n.defaultLocale ? key : ''), - resource: { - loadPath: path.join(localePath, '{{lng}}/{{ns}}.json'), - savePath: path.join(localePath, '{{lng}}/{{ns}}.json') - }, - nsSeparator: false, - keySeparator: false - }, - transform: tsTransform() -} diff --git a/package.json b/package.json index 1a7e39a..12daaac 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "start": "next start", "lint": "next lint", "format": "prettier components/**/*.tsx config/*.js pages/**/*.tsx {types,utils}/**/*.ts --write", - "extract": "i18next-scanner" + "extract": "i18next" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", @@ -62,8 +62,7 @@ "eslint": "8.8.0", "eslint-config-next": "12.0.10", "eslint-config-prettier": "^8.3.0", - "i18next-scanner": "^3.1.0", - "i18next-scanner-typescript": "^1.0.6", + "i18next-parser": "^5.4.0", "postcss": "^8.4.5", "prettier": "^2.5.1", "prettier-plugin-tailwindcss": "^0.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6ca845..8959309 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,8 +26,7 @@ specifiers: eslint: 8.8.0 eslint-config-next: 12.0.10 eslint-config-prettier: ^8.3.0 - i18next-scanner: ^3.1.0 - i18next-scanner-typescript: ^1.0.6 + i18next-parser: ^5.4.0 ioredis: ^4.28.2 jszip: ^3.7.1 next: ^12.0.10 @@ -110,8 +109,7 @@ devDependencies: eslint: 8.8.0 eslint-config-next: 12.0.10_9534215cc73b6f260bf33f1b86e3ae0e eslint-config-prettier: 8.3.0_eslint@8.8.0 - i18next-scanner: 3.1.0 - i18next-scanner-typescript: 1.0.6 + i18next-parser: 5.4.0 postcss: 8.4.6 prettier: 2.5.1 prettier-plugin-tailwindcss: 0.1.4_prettier@2.5.1 @@ -455,6 +453,10 @@ packages: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: false + /@types/minimatch/3.0.5: + resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} + dev: true + /@types/ms/0.7.31: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: false @@ -515,6 +517,10 @@ packages: /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} + /@types/symlink-or-copy/1.2.0: + resolution: {integrity: sha512-Lja2xYuuf2B3knEsga8ShbOdsfNOtzT73GyJmZyY7eGl2+ajOqrs8yM5ze0fsSoYwvA6bw7/Qr7OZ7PEEmYwWg==} + dev: true + /@types/unist/2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: false @@ -586,24 +592,6 @@ packages: engines: {node: '>=10.0.0'} dev: false - /acorn-class-fields/0.3.7_acorn@8.7.0: - resolution: {integrity: sha512-jdUWSFce0fuADUljmExz4TWpPkxmRW/ZCPRqeeUzbGf0vFUcpQYbyq52l75qGd0oSwwtAepeL6hgb/naRgvcKQ==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6 || ^7 || ^8 - dependencies: - acorn: 8.7.0 - acorn-private-class-elements: 0.2.7_acorn@8.7.0 - dev: true - - /acorn-dynamic-import/4.0.0_acorn@8.7.0: - resolution: {integrity: sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==} - peerDependencies: - acorn: ^6.0.0 - dependencies: - acorn: 8.7.0 - dev: true - /acorn-jsx/5.3.2_acorn@8.7.0: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -620,57 +608,11 @@ packages: xtend: 4.0.2 dev: true - /acorn-private-class-elements/0.2.7_acorn@8.7.0: - resolution: {integrity: sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6.1.0 || ^7 || ^8 - dependencies: - acorn: 8.7.0 - dev: true - - /acorn-private-methods/0.3.3_acorn@8.7.0: - resolution: {integrity: sha512-46oeEol3YFvLSah5m9hGMlNpxDBCEkdceJgf01AjqKYTK9r6HexKs2rgSbLK81pYjZZMonhftuUReGMlbbv05w==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6 || ^7 || ^8 - dependencies: - acorn: 8.7.0 - acorn-private-class-elements: 0.2.7_acorn@8.7.0 - dev: true - - /acorn-stage3/4.0.0_acorn@8.7.0: - resolution: {integrity: sha512-BR+LaADtA6GTB5prkNqWmlmCLYmkyW0whvSxdHhbupTaro2qBJ95fJDEiRLPUmiACGHPaYyeH9xmNJWdGfXRQw==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^7.4 || ^8 - dependencies: - acorn: 8.7.0 - acorn-class-fields: 0.3.7_acorn@8.7.0 - acorn-private-methods: 0.3.3_acorn@8.7.0 - acorn-static-class-features: 0.2.4_acorn@8.7.0 - dev: true - - /acorn-static-class-features/0.2.4_acorn@8.7.0: - resolution: {integrity: sha512-5X4mpYq5J3pdndLmIB0+WtFd/mKWnNYpuTlTzj32wUu/PMmEGOiayQ5UrqgwdBNiaZBtDDh5kddpP7Yg2QaQYA==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6.1.0 || ^7 || ^8 - dependencies: - acorn: 8.7.0 - acorn-private-class-elements: 0.2.7_acorn@8.7.0 - dev: true - /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} dev: true - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -859,6 +801,10 @@ packages: engines: {node: '>=8'} dev: true + /boolbase/1.0.0: + resolution: {integrity: sha1-aN/1++YMUes3cl6p4+0xDcwed24=} + dev: true + /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -873,6 +819,37 @@ packages: fill-range: 7.0.1 dev: true + /broccoli-node-api/1.7.0: + resolution: {integrity: sha512-QIqLSVJWJUVOhclmkmypJJH9u9s/aWH4+FH6Q6Ju5l+Io4dtwqdPUNmDfw40o6sxhbZHhqGujDJuHTML1wG8Yw==} + dev: true + + /broccoli-node-info/2.2.0: + resolution: {integrity: sha512-VabSGRpKIzpmC+r+tJueCE5h8k6vON7EIMMWu6d/FyPdtijwLQ7QvzShEw+m3mHoDzUaj/kiZsDYrS8X2adsBg==} + engines: {node: 8.* || >= 10.*} + dev: true + + /broccoli-output-wrapper/3.2.5: + resolution: {integrity: sha512-bQAtwjSrF4Nu0CK0JOy5OZqw9t5U0zzv2555EA/cF8/a8SLDTIetk9UgrtMVw7qKLKdSpOZ2liZNeZZDaKgayw==} + engines: {node: 10.* || >= 12.*} + dependencies: + fs-extra: 8.1.0 + heimdalljs-logger: 0.1.10 + symlink-or-copy: 1.3.1 + dev: true + + /broccoli-plugin/4.0.7: + resolution: {integrity: sha512-a4zUsWtA1uns1K7p9rExYVYG99rdKeGRymW0qOCNkvDPHQxVi3yVyJHhQbM3EZwdt2E0mnhr5e0c/bPpJ7p3Wg==} + engines: {node: 10.* || >= 12.*} + dependencies: + broccoli-node-api: 1.7.0 + broccoli-output-wrapper: 3.2.5 + fs-merger: 3.2.1 + promise-map-series: 0.3.0 + quick-temp: 0.1.8 + rimraf: 3.0.2 + symlink-or-copy: 1.3.1 + dev: true + /browserslist/4.19.1: resolution: {integrity: sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -890,6 +867,10 @@ packages: engines: {node: '>=0.4.0'} dev: true + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /call-bind/1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -935,6 +916,29 @@ packages: resolution: {integrity: sha512-OzmutCf2Kmc+6DrFrrPS8/tDh2+DpnrfzdICHWhcVC9eOd0N1PXmQEE1a8iM4IziIAG+8tmTq3K+oo0ubH6RRQ==} dev: false + /cheerio-select/1.5.0: + resolution: {integrity: sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==} + dependencies: + css-select: 4.2.1 + css-what: 5.1.0 + domelementtype: 2.2.0 + domhandler: 4.3.0 + domutils: 2.8.0 + dev: true + + /cheerio/1.0.0-rc.10: + resolution: {integrity: sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==} + engines: {node: '>= 6'} + dependencies: + cheerio-select: 1.5.0 + dom-serializer: 1.3.2 + domhandler: 4.3.0 + htmlparser2: 6.1.0 + parse5: 6.0.1 + parse5-htmlparser2-tree-adapter: 6.0.1 + tslib: 2.3.1 + dev: true + /chokidar/3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -959,15 +963,6 @@ packages: engines: {node: '>= 0.10'} dev: true - /clone-deep/4.0.1: - resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} - engines: {node: '>=6'} - dependencies: - is-plain-object: 2.0.4 - kind-of: 6.0.3 - shallow-clone: 3.0.1 - dev: true - /clone-stats/1.0.0: resolution: {integrity: sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=} dev: true @@ -1016,24 +1011,33 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /colors/1.4.0: + resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} + engines: {node: '>=0.1.90'} + dev: true + /comma-separated-tokens/2.0.2: resolution: {integrity: sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg==} dev: false - /commander/6.2.1: - resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} - engines: {node: '>= 6'} - dev: true - /commander/8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} - dev: false /concat-map/0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true + /concat-stream/2.0.0: + resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} + engines: {'0': node >= 6.0} + dependencies: + buffer-from: 1.1.2 + inherits: 2.0.4 + readable-stream: 3.6.0 + typedarray: 0.0.6 + dev: true + /convert-source-map/1.8.0: resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: @@ -1091,6 +1095,21 @@ packages: resolution: {integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==} dev: false + /css-select/4.2.1: + resolution: {integrity: sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==} + dependencies: + boolbase: 1.0.0 + css-what: 5.1.0 + domhandler: 4.3.0 + domutils: 2.8.0 + nth-check: 2.0.1 + dev: true + + /css-what/5.1.0: + resolution: {integrity: sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==} + engines: {node: '>= 6'} + dev: true + /cssesc/3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -1111,6 +1130,10 @@ packages: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true + /de-indent/1.0.2: + resolution: {integrity: sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=} + dev: true + /debounce-promise/3.1.2: resolution: {integrity: sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg==} dev: false @@ -1154,11 +1177,6 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: true - /define-properties/1.1.3: resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==} engines: {node: '>= 0.4'} @@ -1224,6 +1242,33 @@ packages: esutils: 2.0.3 dev: true + /dom-serializer/1.3.2: + resolution: {integrity: sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==} + dependencies: + domelementtype: 2.2.0 + domhandler: 4.3.0 + entities: 2.2.0 + dev: true + + /domelementtype/2.2.0: + resolution: {integrity: sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==} + dev: true + + /domhandler/4.3.0: + resolution: {integrity: sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.2.0 + dev: true + + /domutils/2.8.0: + resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} + dependencies: + dom-serializer: 1.3.2 + domelementtype: 2.2.0 + domhandler: 4.3.0 + dev: true + /dplayer/1.26.0: resolution: {integrity: sha512-uOE0w/WdlX7N9d0ppIEcAYrcnUjY52TMX+MBL4lj9Mj+JMljVuaEc5w88HkZp5Q11VqvN/jxnM8ktx2Dr7/MgA==} dependencies: @@ -1259,8 +1304,12 @@ packages: once: 1.4.0 dev: true - /ensure-array/1.0.0: - resolution: {integrity: sha512-A+3Ntl5WS+GjDnHtC67dKIjw+IoGoeFdNvjn3ZfKEmZgWUz0nxBPE4W52QMCbGZsat0VwWskD5T6AEpe3T2d1g==} + /ensure-posix-path/1.1.1: + resolution: {integrity: sha512-VWU0/zXzVbeJNXvME/5EmLuEj2TauvoaTz6aFYK1Z92JCBlDlZ3Gu0tuGR42kpW1754ywTs+QB0g5TP0oj9Zaw==} + dev: true + + /entities/2.2.0: + resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} dev: true /eol/0.9.1: @@ -1589,12 +1638,6 @@ packages: eslint-visitor-keys: 3.2.0 dev: true - /esprima-next/5.8.1: - resolution: {integrity: sha512-jPuleZ9j065A9xGKreFh9YSgPlbL9/miG/l4KslkwEb7Ilwl5Ct7BmDkSTHA0rW0qnqLx+hsZWIB66s1XaMAyA==} - engines: {node: '>=12'} - hasBin: true - dev: true - /esquery/1.4.0: resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} engines: {node: '>=0.10'} @@ -1725,6 +1768,34 @@ packages: resolution: {integrity: sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA==} dev: true + /fs-extra/10.0.0: + resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.9 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + + /fs-extra/8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.9 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /fs-merger/3.2.1: + resolution: {integrity: sha512-AN6sX12liy0JE7C2evclwoo0aCG3PFulLjrTLsJpWh/2mM+DinhpSGqYLbHBBbIW1PLRNcFhJG8Axtz8mQW3ug==} + dependencies: + broccoli-node-api: 1.7.0 + broccoli-node-info: 2.2.0 + fs-extra: 8.1.0 + fs-tree-diff: 2.0.1 + walk-sync: 2.2.0 + dev: true + /fs-mkdirp-stream/1.0.0: resolution: {integrity: sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=} engines: {node: '>= 0.10'} @@ -1733,6 +1804,17 @@ packages: through2: 2.0.5 dev: true + /fs-tree-diff/2.0.1: + resolution: {integrity: sha512-x+CfAZ/lJHQqwlD64pYM5QxWjzWhSjroaVsr8PW831zOApL55qPibed0c+xebaLWVr2BnHFoHdrwOv8pzt8R5A==} + engines: {node: 6.* || 8.* || >= 10.*} + dependencies: + '@types/symlink-or-copy': 1.2.0 + heimdalljs-logger: 0.1.10 + object-assign: 4.1.1 + path-posix: 1.0.0 + symlink-or-copy: 1.3.1 + dev: true + /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} dev: true @@ -1983,6 +2065,24 @@ packages: space-separated-tokens: 2.0.1 dev: false + /he/1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: true + + /heimdalljs-logger/0.1.10: + resolution: {integrity: sha512-pO++cJbhIufVI/fmB/u2Yty3KJD0TqNPecehFae0/eps0hkZ3b4Zc/PezUMOpYuHFQbA7FxHZxa305EhmjLj4g==} + dependencies: + debug: 2.6.9 + heimdalljs: 0.2.6 + dev: true + + /heimdalljs/0.2.6: + resolution: {integrity: sha512-o9bd30+5vLBvBtzCPwwGqpry2+n0Hi6H1+qwt6y+0kwRHGGF8TFIhJPmnuM0xO97zaKrDZMwO/V56fAnn8m/tA==} + dependencies: + rsvp: 3.2.1 + dev: true + /hoist-non-react-statics/3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} dependencies: @@ -2007,41 +2107,42 @@ packages: resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} dev: false + /htmlparser2/6.1.0: + resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} + dependencies: + domelementtype: 2.2.0 + domhandler: 4.3.0 + domutils: 2.8.0 + entities: 2.2.0 + dev: true + /i18next-fs-backend/1.1.4: resolution: {integrity: sha512-/MfAGMP0jHonV966uFf9PkWWuDjPYLIcsipnSO3NxpNtAgRUKLTwvm85fEmsF6hGeu0zbZiCQ3W74jwO6K9uXA==} dev: false - /i18next-scanner-typescript/1.0.6: - resolution: {integrity: sha512-v6kULnsv32OlFM9pnWTH+wNtRXf5owmFUNBYcX78jbZxQBFnTCUo3w99JjnxuzuXA9ch4UKNQBnt2P/o94eyeQ==} - dependencies: - typescript: 3.9.10 - dev: true - - /i18next-scanner/3.1.0: - resolution: {integrity: sha512-dHLXUJIiF1CYJNslCkJFDYJySk5fg+dzdg9O73XXqHcdZwJ2947SWusqq8HdNFB7LpkBi8oTG6TWLZPmqbAh8Q==} - engines: {node: '>=12'} + /i18next-parser/5.4.0: + resolution: {integrity: sha512-AkMOy3NW09tnB+4CAVzHVWxhoab8q1L6E3aIugWeTZqbUVYTjb6dtW1AhiiUd4nLMOj29LaaVCkyqOhrTezp7Q==} + engines: {node: '>=12', npm: '>=6', yarn: '>=1'} hasBin: true dependencies: - acorn: 8.7.0 - acorn-dynamic-import: 4.0.0_acorn@8.7.0 - acorn-jsx: 5.3.2_acorn@8.7.0 - acorn-stage3: 4.0.0_acorn@8.7.0 - acorn-walk: 8.2.0 - chalk: 4.1.2 - clone-deep: 4.0.1 - commander: 6.2.1 - deepmerge: 4.2.2 - ensure-array: 1.0.0 + '@babel/runtime': 7.16.7 + broccoli-plugin: 4.0.7 + cheerio: 1.0.0-rc.10 + colors: 1.4.0 + commander: 8.3.0 + concat-stream: 2.0.0 eol: 0.9.1 - esprima-next: 5.8.1 + fs-extra: 10.0.0 gulp-sort: 2.0.0 i18next: 21.6.10 - lodash: 4.17.21 - parse5: 6.0.1 - sortobject: 4.16.0 + js-yaml: 4.1.0 + rsvp: 4.8.5 + sort-keys: 4.2.0 through2: 4.0.2 + typescript: 4.5.5 vinyl: 2.2.1 vinyl-fs: 3.0.3 + vue-template-compiler: 2.6.14 dev: true /i18next/21.6.10: @@ -2219,18 +2320,16 @@ packages: engines: {node: '>=0.12.0'} dev: true + /is-plain-obj/2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: true + /is-plain-obj/4.0.0: resolution: {integrity: sha512-NXRbBtUdBioI73y/HmOhogw/U5msYPC9DAtGkJXeFcFWSFZw0mCUsPxk/snTuJHzNKA8kLBK4rH97RMB1BfCXw==} engines: {node: '>=12'} dev: false - /is-plain-object/2.0.4: - resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} - engines: {node: '>=0.10.0'} - dependencies: - isobject: 3.0.1 - dev: true - /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -2298,11 +2397,6 @@ packages: resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} dev: true - /isobject/3.0.1: - resolution: {integrity: sha1-TkMekrEalzFjaqH5yNHMvP2reN8=} - engines: {node: '>=0.10.0'} - dev: true - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2332,6 +2426,20 @@ packages: minimist: 1.2.5 dev: true + /jsonfile/4.0.0: + resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=} + optionalDependencies: + graceful-fs: 4.2.9 + dev: true + + /jsonfile/6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.9 + dev: true + /jsx-ast-utils/3.2.1: resolution: {integrity: sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA==} engines: {node: '>=4.0'} @@ -2363,11 +2471,6 @@ packages: commander: 8.3.0 dev: false - /kind-of/6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - /kleur/4.1.4: resolution: {integrity: sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==} engines: {node: '>=6'} @@ -2458,6 +2561,7 @@ packages: /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: false /longest-streak/3.0.1: resolution: {integrity: sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==} @@ -2484,6 +2588,14 @@ packages: resolution: {integrity: sha512-Ahs4oeG90tbdPWwAJkAAoHg2lRR8lAs9mZXETNPO9hYg3AkjUJBKi1NQ4aaIQZVGrig7c/3NUV1jANl8rFTeMg==} dev: false + /matcher-collection/2.0.1: + resolution: {integrity: sha512-daE62nS2ZQsDg9raM0IlZzLmI2u+7ZapXBwdoeBUKAYERPDDIc0qNqA8E0Rp2D+gspKR7BgIFP52GeujaGXWeQ==} + engines: {node: 6.* || 8.* || >= 10.*} + dependencies: + '@types/minimatch': 3.0.5 + minimatch: 3.0.4 + dev: true + /mdast-util-definitions/5.1.0: resolution: {integrity: sha512-5hcR7FL2EuZ4q6lLMUK5w4lHT2H3vqL9quPvYZ/Ku5iifrirfMHiGdhxdXMUbUkDmz5I+TYMd7nbaxUhbQkfpQ==} dependencies: @@ -2893,6 +3005,11 @@ packages: resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} dev: true + /mktemp/0.4.0: + resolution: {integrity: sha1-bQUVYRyKjITkhKogABKbmOmB/ws=} + engines: {node: '>0.9'} + dev: true + /mri/1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -3028,6 +3145,12 @@ packages: resolution: {integrity: sha1-y480xTIT2JVyP8urkH6UIq28r7E=} dev: false + /nth-check/2.0.1: + resolution: {integrity: sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==} + dependencies: + boolbase: 1.0.0 + dev: true + /object-assign/4.1.1: resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} engines: {node: '>=0.10.0'} @@ -3163,6 +3286,12 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse5-htmlparser2-tree-adapter/6.0.1: + resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + dependencies: + parse5: 6.0.1 + dev: true + /parse5/6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} @@ -3189,6 +3318,10 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true + /path-posix/1.0.0: + resolution: {integrity: sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8=} + dev: true + /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3314,6 +3447,11 @@ packages: /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + /promise-map-series/0.3.0: + resolution: {integrity: sha512-3npG2NGhTc8BWBolLLf8l/92OxMGaRLbqvIh9wjCHhDXNvk4zsxaTaCpiCunW09qWPrN2zeNSNwRLVBrQQtutA==} + engines: {node: 10.* || >= 12.*} + dev: true + /promise-polyfill/8.1.3: resolution: {integrity: sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==} dev: false @@ -3358,6 +3496,14 @@ packages: engines: {node: '>=10'} dev: true + /quick-temp/0.1.8: + resolution: {integrity: sha1-urAqJCq4+w3XWKPJd2sy+aXZRAg=} + dependencies: + mktemp: 0.4.0 + rimraf: 2.7.1 + underscore.string: 3.3.6 + dev: true + /react-async-hook/4.0.0_react@17.0.2: resolution: {integrity: sha512-97lgjFkOcHCTYSrsKBpsXg3iVWM0LnzedB749iP76sb3/8Ouu4nHIkCLEOrQWHVYqrYxjF05NN6GHoXWFkB3Kw==} engines: {node: '>=8', npm: '>=5'} @@ -3702,6 +3848,13 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rimraf/2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.0 + dev: true + /rimraf/3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -3709,6 +3862,15 @@ packages: glob: 7.2.0 dev: true + /rsvp/3.2.1: + resolution: {integrity: sha1-B8tKXfJa3Z6Cbrxn3Mn9idsn2Eo=} + dev: true + + /rsvp/4.8.5: + resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} + engines: {node: 6.* || >= 7.*} + dev: true + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -3750,13 +3912,6 @@ packages: engines: {node: '>=0.10.0'} dev: false - /shallow-clone/3.0.1: - resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} - engines: {node: '>=8'} - dependencies: - kind-of: 6.0.3 - dev: true - /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3782,9 +3937,11 @@ packages: engines: {node: '>=8'} dev: true - /sortobject/4.16.0: - resolution: {integrity: sha512-jdcWhqJjxyYxRcXa30qImF3PZea1GpNwdKxUac28T28+GodptH4XihPuRlgCY0hITIEQVnw8DtQ81Fb6fomBaw==} - engines: {node: '>=10'} + /sort-keys/4.2.0: + resolution: {integrity: sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==} + engines: {node: '>=8'} + dependencies: + is-plain-obj: 2.1.0 dev: true /source-map-js/1.0.2: @@ -3795,6 +3952,10 @@ packages: resolution: {integrity: sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw==} dev: false + /sprintf-js/1.1.2: + resolution: {integrity: sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==} + dev: true + /standard-as-callback/2.1.0: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} dev: false @@ -3901,6 +4062,10 @@ packages: react: 17.0.2 dev: false + /symlink-or-copy/1.3.1: + resolution: {integrity: sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA==} + dev: true + /tailwindcss/3.0.18_833e1018ad0d7954aa80c53675939269: resolution: {integrity: sha512-ihPTpEyA5ANgZbwKlgrbfnzOp9R5vDHFWmqxB1PT8NwOGCOFVVMl+Ps1cQQ369acaqqf1BEF77roCwK0lvNmTw==} engines: {node: '>=12.13.0'} @@ -4002,6 +4167,10 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true + /tslib/2.3.1: + resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + dev: true + /tsutils/3.21.0_typescript@4.5.5: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -4032,10 +4201,8 @@ packages: resolution: {integrity: sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==} dev: false - /typescript/3.9.10: - resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} - engines: {node: '>=4.2.0'} - hasBin: true + /typedarray/0.0.6: + resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} dev: true /typescript/4.5.5: @@ -4058,6 +4225,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /underscore.string/3.3.6: + resolution: {integrity: sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==} + dependencies: + sprintf-js: 1.1.2 + util-deprecate: 1.0.2 + dev: true + /unified/10.1.1: resolution: {integrity: sha512-v4ky1+6BN9X3pQrOdkFIPWAaeDsHPE1svRDxq7YpTc2plkIqFMwukfqM+l0ewpP9EfwARlt9pPFAeWYhHm8X9w==} dependencies: @@ -4145,6 +4319,16 @@ packages: unist-util-visit-parents: 5.1.0 dev: false + /universalify/0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + dev: true + + /universalify/2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -4281,6 +4465,23 @@ packages: engines: {node: '>=0.10.0'} dev: false + /vue-template-compiler/2.6.14: + resolution: {integrity: sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==} + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + dev: true + + /walk-sync/2.2.0: + resolution: {integrity: sha512-IC8sL7aB4/ZgFcGI2T1LczZeFWZ06b3zoHH7jBPyHxOtIIz1jppWHjjEXkOFvFojBVAK9pV7g47xOZ4LW3QLfg==} + engines: {node: 8.* || >= 10.*} + dependencies: + '@types/minimatch': 3.0.5 + ensure-posix-path: 1.1.1 + matcher-collection: 2.0.1 + minimatch: 3.0.4 + dev: true + /web-namespaces/2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} dev: false diff --git a/public/locales/en/common.json b/public/locales/en/common.json index d9ac75f..5791f46 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -1,12 +1,15 @@ { - "- showing {{count}} page(s) of {{totalFileNum}} files -": "- showing {{count}} page of {{totalFileNum}} files -", - "- showing {{count}} page(s) of {{totalFileNum}} files -_plural": "- showing {{count}} pages of {{totalFileNum}} files -", + "- showing {{count}} page(s) of {{totalFileNum}} files -——one": "- showing {{count}} page of {{totalFileNum}} files -", + "- showing {{count}} page(s) of {{totalFileNum}} files -——other": "- showing {{count}} pages of {{totalFileNum}} files -", + "{{count}} item(s)——one": "{{count}} item", + "{{count}} item(s)——other": "{{count}} items", "Actions": "Actions", "Cancel": "Cancel", "Cannot preview {{path}}": "Cannot preview {{path}}", "Clear all": "Clear all", "Clear all tokens?": "Clear all tokens?", "Cleared all tokens": "Cleared all tokens", + "clearing them means that you will need to re-enter the passwords again.": "clearing them means that you will need to re-enter the passwords again.", "Copied direct link to clipboard.": "Copied direct link to clipboard.", "Copied folder permalink.": "Copied folder permalink.", "Copied raw file permalink.": "Copied raw file permalink.", @@ -19,10 +22,10 @@ "Download folder": "Download folder", "Download selected files": "Download selected files", "Download the file directly through OneDrive": "Download the file directly through OneDrive", + "Downloading {{progress}}%": "Downloading {{progress}}%", "Downloading folder, refresh page to cancel": "Downloading folder, refresh page to cancel", "Downloading selected files, refresh page to cancel": "Downloading selected files, refresh page to cancel", "Downloading selected files...": "Downloading selected files...", - "Downloading {{progress}}%": "Downloading {{progress}}%", "Email": "Email", "Enter Password": "Enter Password", "Error: {{message}}": "Error: {{message}}", @@ -42,7 +45,7 @@ "Name": "Name", "No more files": "No more files", "Nothing here.": "Nothing here.", - "Oops, that's a <1>four-oh-four.": "Oops, that's a <1>four-oh-four.", + "Oops, that's a <1>four-oh-four.": "Oops, that's a <1>four-oh-four.", "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.", "Search ...": "Search ...", "Select all files": "Select all files", @@ -51,8 +54,5 @@ "Size": "Size", "These tokens are used to authenticate yourself into password protected folders, ": "These tokens are used to authenticate yourself into password protected folders, ", "This route (the folder itself and the files inside) is password protected. ": "This route (the folder itself and the files inside) is password protected. ", - "Weibo": "Weibo", - "clearing them means that you will need to re-enter the passwords again.": "clearing them means that you will need to re-enter the passwords again.", - "{{count}} item(s)": "{{count}} item", - "{{count}} item(s)_plural": "{{count}} items" + "Weibo": "Weibo" } diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index 980ae07..cec15b6 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -1,11 +1,13 @@ { - "- showing {{count}} page(s) of {{totalFileNum}} files -": "已显示 {{count}} 页,共 {{totalFileNum}} 个文件", + "- showing {{count}} page(s) of {{totalFileNum}} files -——other": "已显示 {{count}} 页,共 {{totalFileNum}} 个文件", + "{{count}} item(s)——other": "{{count}} 个项目", "Actions": "操作", "Cancel": "取消", "Cannot preview {{path}}": "无法预览 {{path}}", "Clear all": "清楚所有密钥", "Clear all tokens?": "清楚所有密钥?", "Cleared all tokens": "已清楚所有密钥", + "clearing them means that you will need to re-enter the passwords again.": "清除它们意味着下次访问时您需要重新输入密钥。", "Copied direct link to clipboard.": "已复制直链到剪贴板。", "Copied folder permalink.": "已复制文件夹永久链接。", "Copied raw file permalink.": "已复制文件永久链接。", @@ -18,10 +20,10 @@ "Download folder": "下载此文件夹", "Download selected files": "下载选定文件", "Download the file directly through OneDrive": "直接从 OneDrive 下载文件", + "Downloading {{progress}}%": "已下载 {{progress}}%", "Downloading folder, refresh page to cancel": "下载文件夹中,刷新页面以取消", "Downloading selected files, refresh page to cancel": "下载选定文件中,刷新页面以取消", "Downloading selected files...": "下载选定文件中...", - "Downloading {{progress}}%": "已下载 {{progress}}%", "Email": "电子邮件", "Enter Password": "输入密码", "Error: {{message}}": "错误:{{message}}", @@ -41,7 +43,7 @@ "Name": "文件名", "No more files": "加载完毕", "Nothing here.": "无内容。", - "Oops, that's a <1>four-oh-four.": "Oops,这里是 <1>404 页面。", + "Oops, that's a <1>four-oh-four.": "Oops,这里是 <1>404 页面。", "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "请按下 <2>F12 来打开开发者工具窗口以获取详细信息,或是到 <6>onedrive-vercel-index 社区讨论 处寻求帮助。", "Search ...": "搜索……", "Select all files": "选择所有文件", @@ -50,7 +52,5 @@ "Size": "文件大小", "These tokens are used to authenticate yourself into password protected folders, ": "这些密钥是用来验证您的身份以访问密钥保护下的文件夹的,", "This route (the folder itself and the files inside) is password protected. ": "此路由(此文件夹和其中的文件)是受密钥保护的。", - "Weibo": "微博", - "clearing them means that you will need to re-enter the passwords again.": "清除它们意味着下次访问时您需要重新输入密钥。", - "{{count}} item(s)": "{{count}} 个项目" + "Weibo": "微博" } From 04e333aa36600ca3106eddeea714af31cc9f9db9 Mon Sep 17 00:00:00 2001 From: myl7 Date: Sun, 6 Feb 2022 20:09:59 +0800 Subject: [PATCH 08/19] fix double plurals with context --- components/FileListing.tsx | 7 +++++-- i18next-parser.config.js | 1 + next-i18next.config.js | 7 ++++++- public/locales/en/common.json | 8 ++++++-- public/locales/zh-CN/common.json | 4 +++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 499f330..2df9202 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -321,10 +321,13 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { {!onlyOnePage && (
- {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' }))}