Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: sunseting legacy i18n

lawvs373d39c2d001
diff --git a/libs/components/layout/package.json b/libs/components/layout/package.json
index d7a0a26481..a36a746d84 100644
--- a/libs/components/layout/package.json
+++ b/libs/components/layout/package.json
@@ -11,9 +11,7 @@
"@mui/icons-material": "^5.8.4",
"clsx": "^1.2.1",
"date-fns": "^2.29.2",
- "i18next": "^21.9.1",
"jotai": "^1.8.1",
- "react-i18next": "^11.18.4",
"tinycolor2": "^1.4.2",
"turndown": "7.1.1"
},
diff --git a/libs/components/layout/src/i18n/index.ts b/libs/components/layout/src/i18n/index.ts
deleted file mode 100644
index 20f4e2a3ce..0000000000
--- a/libs/components/layout/src/i18n/index.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import i18next from 'i18next';
-import { initReactI18next } from 'react-i18next';
-import en_US from './resources/en.json';
-import zh_CN from './resources/zh.json';
-
-// See https://react.i18next.com/latest/typescript
-declare module 'react-i18next' {
- // and extend them!
- interface CustomTypeOptions {
- // custom namespace type if you changed it
- defaultNS: 'ns1';
- // custom resources type
- resources: {
- en: typeof en_US.translation;
- zh: typeof zh_CN.translation;
- };
- }
-}
-
-const resources = {
- en: en_US,
- zh: zh_CN,
-} as const;
-
-i18next.use(initReactI18next).init({
- lng: 'en',
- fallbackLng: 'en',
-
- resources,
- interpolation: {
- escapeValue: false, // not needed for react as it escapes by default
- },
-});
-
-export const options = [
- { value: 'en', text: 'English' },
- { value: 'zh', text: '简体中文' },
-] as const;
-
-export { i18next };
diff --git a/libs/components/layout/src/i18n/resources/en.json b/libs/components/layout/src/i18n/resources/en.json
deleted file mode 100644
index 4c6a714e9b..0000000000
--- a/libs/components/layout/src/i18n/resources/en.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "translation": {
- "Sync to Disk": "Sync to Disk",
- "Share": "Share",
- "WarningTips": {
- "IsNotfsApiSupported": "Welcome to the AFFiNE demo. To begin saving changes you can SYNC DATA TO DISK with the latest version of Chromium based browser like Chrome/Edge",
- "IsNotLocalWorkspace": "Welcome to the AFFiNE demo. To begin saving changes you can SYNC TO DISK.",
- "DoNotStore": "AFFiNE is under active development and the current version is UNSTABLE. Please DO NOT store information or data"
- },
- "Layout": "Layout",
- "Comment": "Comment",
- "Settings": "Settings",
- "ComingSoon": "Layout Settings Coming Soon...",
- "Duplicate Page": "Duplicate Page",
- "Copy Page Link": "Copy Page Link",
- "Language": "Language",
- "Clear Workspace": "Clear Workspace",
- "Export As Markdown": "Export As Markdown",
- "Export As HTML": "Export As HTML",
- "Export As PDF (Unsupported)": "Export As PDF (Unsupported)",
- "Import Workspace": "Import Workspace",
- "Export Workspace": "Export Workspace",
- "Last edited by": "Last edited by {{name}}",
- "Logout": "Logout"
- }
-}
diff --git a/libs/components/layout/src/i18n/resources/zh.json b/libs/components/layout/src/i18n/resources/zh.json
deleted file mode 100644
index da86cef6b2..0000000000
--- a/libs/components/layout/src/i18n/resources/zh.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "translation": {
- "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": "退出登录"
- }
-}
diff --git a/libs/components/layout/src/index.ts b/libs/components/layout/src/index.ts
index 1aee5a687f..69a6d3ff72 100644
--- a/libs/components/layout/src/index.ts
+++ b/libs/components/layout/src/index.ts
@@ -1,4 +1,3 @@
export * from './header';
-export * from './i18n';
export * from './settings-sidebar';
export * from './workspace-sidebar';