From 047537101c66c835e8da2cf2e0efd7a7a08c8266 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Mon, 9 Jan 2023 14:55:38 +0800 Subject: [PATCH] feat: extract i18n into a package --- packages/app/package.json | 3 +- packages/app/src/libs/i18n/resources/bn.json | 22 ------- packages/app/src/libs/i18n/resources/fr.json | 29 --------- packages/app/src/libs/i18n/resources/sr.json | 27 -------- .../app/src/libs/i18n/resources/zh-Hans.json | 29 --------- .../app/src/libs/i18n/resources/zh-Hant.json | 29 --------- packages/i18n/package.json | 27 ++++++++ .../{app/src/libs/i18n => i18n/src}/index.ts | 12 ++-- packages/i18n/src/resources/bn.json | 1 + .../libs/i18n => i18n/src}/resources/en.json | 20 +++++- packages/i18n/src/resources/fr.json | 1 + .../libs/i18n => i18n/src}/resources/index.ts | 0 packages/i18n/src/resources/sr.json | 1 + packages/i18n/src/resources/zh-Hans.json | 65 +++++++++++++++++++ packages/i18n/src/resources/zh-Hant.json | 1 + .../i18n => packages/i18n/src/script}/api.ts | 0 .../i18n/src/script}/download.ts | 0 .../i18n/src/script}/request.ts | 0 .../i18n => packages/i18n/src/script}/sync.ts | 0 .../i18n/src/script}/utils.ts | 0 packages/i18n/tsconfig.json | 25 +++++++ pnpm-lock.yaml | 50 ++++++++------ 22 files changed, 172 insertions(+), 170 deletions(-) delete mode 100644 packages/app/src/libs/i18n/resources/bn.json delete mode 100644 packages/app/src/libs/i18n/resources/fr.json delete mode 100644 packages/app/src/libs/i18n/resources/sr.json delete mode 100644 packages/app/src/libs/i18n/resources/zh-Hans.json delete mode 100644 packages/app/src/libs/i18n/resources/zh-Hant.json create mode 100644 packages/i18n/package.json rename packages/{app/src/libs/i18n => i18n/src}/index.ts (86%) create mode 100644 packages/i18n/src/resources/bn.json rename packages/{app/src/libs/i18n => i18n/src}/resources/en.json (72%) create mode 100644 packages/i18n/src/resources/fr.json rename packages/{app/src/libs/i18n => i18n/src}/resources/index.ts (100%) create mode 100644 packages/i18n/src/resources/sr.json create mode 100644 packages/i18n/src/resources/zh-Hans.json create mode 100644 packages/i18n/src/resources/zh-Hant.json rename {scripts/i18n => packages/i18n/src/script}/api.ts (100%) rename {scripts/i18n => packages/i18n/src/script}/download.ts (100%) rename {scripts/i18n => packages/i18n/src/script}/request.ts (100%) rename {scripts/i18n => packages/i18n/src/script}/sync.ts (100%) rename {scripts/i18n => packages/i18n/src/script}/utils.ts (100%) create mode 100644 packages/i18n/tsconfig.json diff --git a/packages/app/package.json b/packages/app/package.json index 16fd889fd7..aece2897f9 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@affine/datacenter": "workspace:*", + "@affine/i18n": "workspace:*", "@blocksuite/blocks": "0.3.1-20230109032243-37ad3ba", "@blocksuite/editor": "0.3.1-20230109032243-37ad3ba", "@blocksuite/icons": "^2.0.2", @@ -27,7 +28,6 @@ "cmdk": "^0.1.20", "css-spring": "^4.1.0", "dayjs": "^1.11.7", - "i18next": "^21.9.1", "lit": "^2.3.1", "next": "13.1.0", "next-debug-local": "^0.1.5", @@ -36,7 +36,6 @@ "quill-cursors": "^4.0.0", "react": "18.2.0", "react-dom": "18.2.0", - "react-i18next": "^11.18.4", "yjs": "^13.5.44" }, "devDependencies": { diff --git a/packages/app/src/libs/i18n/resources/bn.json b/packages/app/src/libs/i18n/resources/bn.json deleted file mode 100644 index 5eb50f8cdf..0000000000 --- a/packages/app/src/libs/i18n/resources/bn.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "Add A Below Block": "নীচে একটি ব্লক যোগ করুন", - "WarningTips": { - "IsNotfsApiSupported": "অ্যাফাইন ডেমোতে স্বাগতম। পরিবর্তনগুলি সংরক্ষণ করা শুরু করতে আপনি Chrome/Edge এর মতো ক্রোমিয়াম ভিত্তিক ব্রাউজারের সর্বশেষ সংস্করণের মাধ্যমে ডিস্কে ডেটা সিঙ্ক করতে পারেন", - "DoNotStore": "অ্যাফাইন সক্রিয় ডেভেলপমেন্ট এর অধীনে এবং বর্তমান সংস্করণটি অস্থিতিশীল। দয়া করে কোন তথ্য বা ডেটা সঞ্চয় করবেন না" - }, - "Language": "ভাষা", - "Settings": "সেটিংস", - "Share": "শেয়ার করুন", - "Comment": "মন্তব্য", - "Delete": "মুছে ফেলুন", - "Copy Page Link": "পেজ লিংক কপি করুন", - "Duplicate Page": "সদৃশ পৃষ্ঠা তৈরি করুন", - "Logout": "লগআউট", - "Divide Here As A New Group": "একটি নতুন গ্রুপ হিসেবে বিভক্ত করুন", - "ComingSoon": "লেআউট সেটিংস শীঘ্রই আসছে...", - "Clear Workspace": "ওয়ার্কস্পেস পরিষ্কার করুন", - "Layout": "লেআউট", - "Turn into": "রূপান্তর করুন", - "Sync to Disk": "ডিস্ক এ সিঙ্ক করুন" -} diff --git a/packages/app/src/libs/i18n/resources/fr.json b/packages/app/src/libs/i18n/resources/fr.json deleted file mode 100644 index d30fdcb133..0000000000 --- a/packages/app/src/libs/i18n/resources/fr.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "ComingSoon": "Bientôt disponible", - "Duplicate Page": "Dupliquer la page", - "Copy Page Link": "Copier le lien de la page", - "Delete": "Supprimer", - "Comment": "Commentaire", - "Export As HTML": "Exporter en HTML", - "Export As Markdown": "Exporter en Markdown", - "Export As PDF (Unsupported)": "exporter en PDF (non supporté)", - "Logout": "Déconnexion", - "Export Workspace": "Exporter l'espace de travail", - "Import Workspace": "Importer l'espace de travail", - "Language": "Langue", - "Last edited by": "Dernière édition par {{name}}", - "Layout": "Mise en forme", - "Settings": "Réglages", - "Share": "Partager", - "Sync to Disk": "Synchroniser sur le disque", - "Turn into": "Transformer en", - "WarningTips": { - "DoNotStore": "Affine est en développement actif ; la version actuelle est INSTABLE. Veuillez NE PAS stocker d'informations ou de données", - "IsNotLocalWorkspace": "Bienvenue sur la démo d'AFFiNE. Pour commencer à sauvegarder vos modifications, vous pouvez SYNCHRONISER SUR LE DISQUE", - "IsNotfsApiSupported": "Bienvenue sur la démo d'AFFiNE. Pour commencer à sauvegarder vos modifications, vous pouvez SYNCHRONISER SUR LE DISQUE\navec la dernière version d'un navigateur basé sur Chromium tel que Chrome ou Edge." - }, - "Add A Below Block": "Ajouter un bloc en-dessous", - "Divide Here As A New Group": "Séparer ici en un nouveau groupe", - "Clear Workspace": "Vider l'espace de travail" -} diff --git a/packages/app/src/libs/i18n/resources/sr.json b/packages/app/src/libs/i18n/resources/sr.json deleted file mode 100644 index edc6c32f2c..0000000000 --- a/packages/app/src/libs/i18n/resources/sr.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "Clear Workspace": "Očisti radni prostor", - "ComingSoon": "Podešavanja za izgled dolaze", - "Comment": "Komentar", - "Copy Page Link": "Kopiraj link stranice", - "Delete": "Obriši", - "Duplicate Page": "Dupliraj stranicu", - "Export As HTML": "Izvezi kao HTML", - "Export As Markdown": "Izvezi kao Markdown", - "Export As PDF (Unsupported)": "Izvezi kao PDF (nepodržano)", - "Export Workspace": "Izvezi radnu površinu", - "Import Workspace": "Poboljšaj radnu površinu", - "Language": "Jezik", - "Last edited by": "Zadnju promenu uradio {{ime}}", - "Layout": "Izgled", - "Logout": "Odjava", - "Settings": "Podešavanja", - "Share": "Podeli", - "Sync to Disk": "Sinhroniziraj sa diskom", - "Turn into": "Promeni u", - "WarningTips": { - "DoNotStore": "AFFiNE je u stanju aktivnog razvoja i trenutna verzija je NESTABILNA. Molimo vas, NEMOJTE čuvati informacije ili podatke.", - "IsNotLocalWorkspace": "Dobrodošli u AFFiNE demo. Da bi započeli proces čuvanja promena možete kliknuti SINHRONIZUJ SA DISKOM.", - "IsNotfsApiSupported": "Dobrodošli u AFFiNE demo. Da bi započeli proces čuvanja promena možete SINHRONIZOVATI NA DISK sa poslednjom verzijom pretraživača tipa Chromium, kao što su Chrome/Edge." - } -} diff --git a/packages/app/src/libs/i18n/resources/zh-Hans.json b/packages/app/src/libs/i18n/resources/zh-Hans.json deleted file mode 100644 index 14786dcb7e..0000000000 --- a/packages/app/src/libs/i18n/resources/zh-Hans.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "Sync to Disk": "同步到磁盘", - "Share": "分享", - "WarningTips": { - "IsNotfsApiSupported": "欢迎来到AFFiNE 的演示界面。您可以使用最新版本的基于Chrome的浏览器(如Chrome/Edge)将数据同步到磁盘来进行保存", - "IsNotLocalWorkspace": "欢迎来到AFFiNE 的演示界面,您可以同步到磁盘来进行保存操作。", - "DoNotStore": "AFFiNE 正在积极开发中,当前版本不稳定。请不要存储信息或数据。" - }, - "ComingSoon": "布局设置即将到来", - "Layout": "布局", - "Comment": "评论", - "Settings": "设置", - "Duplicate Page": "复制页面", - "Copy Page Link": "复制页面链接", - "Language": "当前语言", - "Clear Workspace": "清空工作区域", - "Export As Markdown": "导出 markdown", - "Export As HTML": "导出 HTML", - "Export As PDF (Unsupported)": "导出 PDF (暂不支持)", - "Import Workspace": "导入 Workspace", - "Export Workspace": "导出 Workspace", - "Last edited by": "最后编辑者为 {{name}}", - "Logout": "退出登录", - "Delete": "删除", - "Turn into": "转换为", - "Add A Below Block": "在下方添加一个新块", - "Divide Here As A New Group": "从这里划分一个新组" -} diff --git a/packages/app/src/libs/i18n/resources/zh-Hant.json b/packages/app/src/libs/i18n/resources/zh-Hant.json deleted file mode 100644 index 4d0f28c9cd..0000000000 --- a/packages/app/src/libs/i18n/resources/zh-Hant.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.": "", - "Add A Below Block": "在下方新添塊", - "Clear Workspace": "清空工作區", - "ComingSoon": "自定義佈局功能即將與您見面", - "Comment": "評論", - "Copy Page Link": "拷貝頁面鏈接", - "Delete": "刪除", - "Divide Here As A New Group": "從此地劃分成新組", - "Duplicate Page": "複製界面", - "Export As HTML": "導出 HTML", - "Export As Markdown": "以 Markdown 導出", - "Export As PDF (Unsupported)": "導出為 PDF(即將可用)", - "Export Workspace": "導出 Workspace", - "Import Workspace": "導入 Workspace", - "Language": "語言", - "Last edited by": "最後編輯者為 {{name}}", - "Layout": "佈局", - "Logout": "退出登錄", - "Settings": "設置", - "Share": "分享", - "Sync to Disk": "同步到磁盤", - "Turn into": "轉換為", - "WarningTips": { - "DoNotStore": "我們正在積極開發 AFFiNE,目前版本尚不穩定,請避免存儲信息或數據。", - "IsNotLocalWorkspace": "歡迎來到 AFFiNE 演示界面。您可以通過「同步到磁盤」來保存更改。", - "IsNotfsApiSupported": "歡迎進入AFFiNE演示!使用最新版本的基於 Chromium 內核的瀏覽器如Chrome/Edge,您可以通過「同步到磁盤」來保存更改" - } -} diff --git a/packages/i18n/package.json b/packages/i18n/package.json new file mode 100644 index 0000000000..168dee9549 --- /dev/null +++ b/packages/i18n/package.json @@ -0,0 +1,27 @@ +{ + "name": "@affine/i18n", + "version": "0.1.0", + "description": "", + "main": "dist/src/index.js", + "type": "module", + "types": "dist/src/index.d.ts", + "exports": { + "./src/*": "./dist/src/*.js", + ".": "./dist/src/index.js" + }, + "scripts": { + "build": "tsc --project ./tsconfig.json" + }, + "keywords": [], + "repository": { + "type": "git", + "url": "git+https://github.com/toeverything/AFFiNE.git" + }, + "dependencies": { + "i18next": "^21.9.1", + "react-i18next": "^11.18.4" + }, + "devDependencies": { + "typescript": "^4.8.4" + } +} diff --git a/packages/app/src/libs/i18n/index.ts b/packages/i18n/src/index.ts similarity index 86% rename from packages/app/src/libs/i18n/index.ts rename to packages/i18n/src/index.ts index fe6d76ab41..a3fd46a1d2 100644 --- a/packages/app/src/libs/i18n/index.ts +++ b/packages/i18n/src/index.ts @@ -1,10 +1,6 @@ import i18next, { Resource } from 'i18next'; -import { - I18nextProvider, - initReactI18next, - useTranslation, -} from 'react-i18next'; -import { LOCALES } from './resources'; +import { initReactI18next, useTranslation } from 'react-i18next'; +import { LOCALES } from './resources/index.js'; import type en_US from './resources/en.json'; // const localStorage = { @@ -27,7 +23,7 @@ declare module 'react-i18next' { // const STORAGE_KEY = 'i18n_lng'; -export { i18n, useTranslation, I18nProvider, LOCALES }; +export { i18n, useTranslation, LOCALES }; const resources = LOCALES.reduce( (acc, { tag, res }) => ({ ...acc, [tag]: { translation: res } }), @@ -63,4 +59,4 @@ i18n.on('languageChanged', () => { // localStorage.setItem(STORAGE_KEY, lng); }); -const I18nProvider = I18nextProvider; +// const I18nProvider = I18nextProvider; diff --git a/packages/i18n/src/resources/bn.json b/packages/i18n/src/resources/bn.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/packages/i18n/src/resources/bn.json @@ -0,0 +1 @@ +{} diff --git a/packages/app/src/libs/i18n/resources/en.json b/packages/i18n/src/resources/en.json similarity index 72% rename from packages/app/src/libs/i18n/resources/en.json rename to packages/i18n/src/resources/en.json index af7d5c03d4..a4be5ecf05 100644 --- a/packages/app/src/libs/i18n/resources/en.json +++ b/packages/i18n/src/resources/en.json @@ -34,7 +34,7 @@ "Delete page?": "Delete page?", "Delete permanently?": "Delete permanently?", "will be moved to Trash": "{{title}} will be moved to Trash", - "Once deleted, you can't undo this action.": "Once deleted,you can't undo this action.", + "Once deleted, you can't undo this action.": "Once deleted, you can't undo this action.", "Moved to Trash": "Moved to Trash", "Permanently deleted": "Permanently deleted", "restored": "{{title}} restored", @@ -54,12 +54,26 @@ "Strikethrough": "Strikethrough", "Inline code": "Inline code", "Code block": "Code block", - "Hyperlink(with selected text)": "Hyperlink(with selected text)", + "Link": "Link", "Body text": "Body text", "Heading": "Heading {{number}}", "Increase indent": "Increase indent", "Reduce indent": "Reduce indent", "Markdown Syntax": "Markdown Syntax", "Divider": "Divider", - "404 - Page Not Found": "404 - Page Not Found" + "404 - Page Not Found": "404 - Page Not Found", + "New Workspace": "New Workspace", + "Workspace description": "Workspace is your virtual space to capture, create and plan as just one person or together as a team.", + "Create": "Create", + "Select": "Select", + "Text": "Text (coming soon)", + "Shape": "Shape", + "Sticky": "Sticky (coming soon)", + "Pen": "Pen (coming soon)", + "Connector": "Connector (coming soon)", + "Upload": "Upload", + "Restore it": "Restore it", + "TrashButtonGroupTitle": "Permanently delete", + "TrashButtonGroupDescription": "Once deleted, you can't undo this action. Do you confirm?", + "Delete permanently": "Delete permanently" } diff --git a/packages/i18n/src/resources/fr.json b/packages/i18n/src/resources/fr.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/packages/i18n/src/resources/fr.json @@ -0,0 +1 @@ +{} diff --git a/packages/app/src/libs/i18n/resources/index.ts b/packages/i18n/src/resources/index.ts similarity index 100% rename from packages/app/src/libs/i18n/resources/index.ts rename to packages/i18n/src/resources/index.ts diff --git a/packages/i18n/src/resources/sr.json b/packages/i18n/src/resources/sr.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/packages/i18n/src/resources/sr.json @@ -0,0 +1 @@ +{} diff --git a/packages/i18n/src/resources/zh-Hans.json b/packages/i18n/src/resources/zh-Hans.json new file mode 100644 index 0000000000..47095233d9 --- /dev/null +++ b/packages/i18n/src/resources/zh-Hans.json @@ -0,0 +1,65 @@ +{ + "Quick search": "快速搜索", + "All pages": "全部页面", + "Favourites": "收藏夹", + "No item": "没有项目", + "Import": "导入", + "Trash": "回收站", + "New Page": "新建文章", + "New Keyword Page": "新建 '{{query}}' 为标题的文章", + "Find 0 result": "找到 0 个结果", + "Find results": "找到 {{number}} 个结果", + "Collapse sidebar": "关闭侧边栏", + "Expand sidebar": "展开侧边栏", + "Removed from Favourites": "已从收藏中移除", + "Remove from favourites": "从收藏中移除", + "Added to Favourites": "已添加到收藏", + "Add to favourites": "添加到收藏", + "Paper": "文章", + "Edgeless": "无边模式", + "Switch to": "跳转到", + "Convert to ": "转换成 ", + "Page": "文章", + "Export": "导出", + "Export to HTML": "导出到 HTML", + "Export to Markdown": "导出到 Markdown", + "Delete": "删除", + "Title": "标题", + "Untitled": "无标题", + "Created": "创建时间", + "Updated": "更新时间", + "Open in new tab": "在新页面打开", + "Favourite": "收藏", + "Favourited": "已收藏", + "Delete page?": "删除文章?", + "Delete permanently?": "永久删除?", + "will be moved to Trash": "{{title}} 将被移动到回收站", + "Once deleted, you can't undo this action.": "一次性删除,无法恢复。", + "Moved to Trash": "已移动到回收站", + "Permanently deleted": "已永久删除", + "restored": "{{title}} 已恢复", + "Cancel": "取消", + "Keyboard Shortcuts": "快捷键", + "Contact Us": "联系我们", + "Official Website": "官网", + "Get in touch!": "Get in touch!", + "AFFiNE Community": "AFFiNE Community", + "How is AFFiNE Alpha different?": "How is AFFiNE Alpha different?", + "Shortcuts": "Shortcuts", + "Undo": "Undo", + "Redo": "Redo", + "Bold": "Bold", + "Italic": "Italic", + "Underline": "Underline", + "Strikethrough": "Strikethrough", + "Inline code": "Inline code", + "Code block": "Code block", + "Link": "Link", + "Body text": "Body text", + "Heading": "Heading {{number}}", + "Increase indent": "Increase indent", + "Reduce indent": "Reduce indent", + "Markdown Syntax": "Markdown Syntax", + "Divider": "Divider", + "404 - Page Not Found": "404 - Page Not Found" +} diff --git a/packages/i18n/src/resources/zh-Hant.json b/packages/i18n/src/resources/zh-Hant.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/packages/i18n/src/resources/zh-Hant.json @@ -0,0 +1 @@ +{} diff --git a/scripts/i18n/api.ts b/packages/i18n/src/script/api.ts similarity index 100% rename from scripts/i18n/api.ts rename to packages/i18n/src/script/api.ts diff --git a/scripts/i18n/download.ts b/packages/i18n/src/script/download.ts similarity index 100% rename from scripts/i18n/download.ts rename to packages/i18n/src/script/download.ts diff --git a/scripts/i18n/request.ts b/packages/i18n/src/script/request.ts similarity index 100% rename from scripts/i18n/request.ts rename to packages/i18n/src/script/request.ts diff --git a/scripts/i18n/sync.ts b/packages/i18n/src/script/sync.ts similarity index 100% rename from scripts/i18n/sync.ts rename to packages/i18n/src/script/sync.ts diff --git a/scripts/i18n/utils.ts b/packages/i18n/src/script/utils.ts similarity index 100% rename from scripts/i18n/utils.ts rename to packages/i18n/src/script/utils.ts diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json new file mode 100644 index 0000000000..e13f7340ab --- /dev/null +++ b/packages/i18n/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ESNext", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": false, + "esModuleInterop": true, + "module": "ESNext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "react-jsx", + "incremental": true, + "experimentalDecorators": true, + "declaration": true, + "baseUrl": ".", + "rootDir": ".", + "outDir": "./dist" + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f12779edb4..4332ae861c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,7 @@ importers: packages/app: specifiers: '@affine/datacenter': workspace:* + '@affine/i18n': workspace:* '@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba '@blocksuite/editor': 0.3.1-20230109032243-37ad3ba '@blocksuite/icons': ^2.0.2 @@ -65,7 +66,6 @@ importers: eslint-config-next: 12.3.1 eslint-config-prettier: ^8.5.0 eslint-plugin-prettier: ^4.2.1 - i18next: ^21.9.1 lit: ^2.3.1 next: 13.1.0 next-debug-local: ^0.1.5 @@ -76,11 +76,11 @@ importers: raw-loader: ^4.0.2 react: 18.2.0 react-dom: 18.2.0 - react-i18next: ^11.18.4 typescript: 4.8.3 yjs: ^13.5.44 dependencies: '@affine/datacenter': link:../data-center + '@affine/i18n': link:../i18n '@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 '@blocksuite/editor': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 '@blocksuite/icons': 2.0.4_w5j4k42lgipnm43s3brx6h3c34 @@ -98,7 +98,6 @@ importers: cmdk: 0.1.21_7ey2zzynotv32rpkwno45fsx4e css-spring: 4.1.0 dayjs: 1.11.7 - i18next: 21.10.0 lit: 2.4.0 next: 13.1.0_biqbaboplfbrettd7655fr4n2y next-debug-local: 0.1.5 @@ -107,7 +106,6 @@ importers: quill-cursors: 4.0.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-i18next: 11.18.6_vfm63zmruocgezzfl2v26zlzpy yjs: 13.5.44 devDependencies: '@types/node': 18.7.18 @@ -160,6 +158,17 @@ importers: fake-indexeddb: 4.0.1 typescript: 4.9.3 + packages/i18n: + specifiers: + i18next: ^21.9.1 + react-i18next: ^11.18.4 + typescript: ^4.8.4 + dependencies: + i18next: 21.10.0 + react-i18next: 11.18.6_i18next@21.10.0 + devDependencies: + typescript: 4.9.3 + packages/logger: specifiers: '@types/react': ^18.0.21 @@ -1361,6 +1370,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 + dev: false /@babel/runtime/7.20.7: resolution: {integrity: sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==} @@ -1704,7 +1714,7 @@ packages: dependencies: '@babel/helper-module-imports': 7.18.6 '@babel/plugin-syntax-jsx': 7.18.6 - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@emotion/hash': 0.9.0 '@emotion/memoize': 0.8.0 '@emotion/serialize': 1.1.0 @@ -2586,7 +2596,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@mui/utils': 5.10.9_react@18.2.0 '@types/react': 18.0.20 prop-types: 15.8.1 @@ -2606,7 +2616,7 @@ packages: '@emotion/styled': optional: true dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@emotion/cache': 11.10.3 '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 '@emotion/styled': 11.10.4_yiaqs725o7pcd7rteavrnhgj4y @@ -2631,7 +2641,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 '@emotion/styled': 11.10.4_yiaqs725o7pcd7rteavrnhgj4y '@mui/private-theming': 5.10.9_w5j4k42lgipnm43s3brx6h3c34 @@ -2662,7 +2672,7 @@ packages: peerDependencies: react: ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@types/prop-types': 15.7.5 '@types/react-is': 17.0.3 prop-types: 15.8.1 @@ -3704,7 +3714,7 @@ packages: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} engines: {node: '>=6.0'} dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@babel/runtime-corejs3': 7.19.1 dev: true @@ -3809,7 +3819,7 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 cosmiconfig: 7.0.1 resolve: 1.22.1 dev: false @@ -4374,7 +4384,7 @@ packages: /dom-helpers/5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 csstype: 3.1.1 dev: false @@ -4741,7 +4751,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 aria-query: 4.2.2 array-includes: 3.1.5 ast-types-flow: 0.0.7 @@ -4763,7 +4773,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 aria-query: 4.2.2 array-includes: 3.1.5 ast-types-flow: 0.0.7 @@ -5595,7 +5605,7 @@ packages: /i18next/21.10.0: resolution: {integrity: sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==} dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 dev: false /iconv-lite/0.4.24: @@ -7011,7 +7021,7 @@ packages: react: 18.2.0 scheduler: 0.23.0 - /react-i18next/11.18.6_vfm63zmruocgezzfl2v26zlzpy: + /react-i18next/11.18.6_i18next@21.10.0: resolution: {integrity: sha512-yHb2F9BiT0lqoQDt8loZ5gWP331GwctHz9tYQ8A2EIEUu+CcEdjBLQWli1USG3RdWQt3W+jqQLg/d4rrQR96LA==} peerDependencies: i18next: '>= 19.0.0' @@ -7024,11 +7034,9 @@ packages: react-native: optional: true dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 html-parse-stringify: 3.0.1 i18next: 21.10.0 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 dev: false /react-is/16.13.1: @@ -7096,7 +7104,7 @@ packages: react: '>=16.6.0' react-dom: '>=16.6.0' dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -8280,7 +8288,7 @@ packages: '@apideck/better-ajv-errors': 0.3.6_ajv@8.11.2 '@babel/core': 7.20.5 '@babel/preset-env': 7.20.2_@babel+core@7.20.5 - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.20.7 '@rollup/plugin-babel': 5.3.1_opjstonlpkhafnz76jsxdwq25a '@rollup/plugin-node-resolve': 11.2.1_rollup@2.79.1 '@rollup/plugin-replace': 2.4.2_rollup@2.79.1