From 24b333bee15a2e0f1d77096db161b8e923a725e7 Mon Sep 17 00:00:00 2001 From: YunShu Date: Sun, 11 Jun 2023 00:06:48 +0800 Subject: [PATCH] chore: move translations from crowdin to repo (#91) * chore: move translations from crowdin to repo 1. move translations to i18n folder. 2. modify the `editUrl` in `docusaurus.config.js`. 3. modify GitHub Action. 4. modify the netlify preview build configuration to build all langs. * fix: wrong editUrl in docusaurus config --- .github/workflows/master.yml | 2 +- .github/workflows/pr_ci.yml | 8 +- .gitignore | 1 - docusaurus.config.js | 12 +- i18n/de/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/de/docusaurus-theme-classic/footer.json | 54 ++ i18n/de/docusaurus-theme-classic/navbar.json | 42 ++ i18n/en/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../current.json | 22 + i18n/en/docusaurus-theme-classic/footer.json | 54 ++ i18n/en/docusaurus-theme-classic/navbar.json | 42 ++ i18n/fr/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/fr/docusaurus-theme-classic/footer.json | 54 ++ i18n/fr/docusaurus-theme-classic/navbar.json | 42 ++ i18n/ja/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/ja/docusaurus-theme-classic/footer.json | 54 ++ i18n/ja/docusaurus-theme-classic/navbar.json | 42 ++ i18n/ko/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/ko/docusaurus-theme-classic/footer.json | 54 ++ i18n/ko/docusaurus-theme-classic/navbar.json | 42 ++ i18n/ru/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/ru/docusaurus-theme-classic/footer.json | 54 ++ i18n/ru/docusaurus-theme-classic/navbar.json | 42 ++ i18n/zh/code.json | 512 ++++++++++++++++++ .../options.json | 14 + .../docusaurus-plugin-content-blog/welcome.md | 15 + .../current.json | 22 + .../current/api-overview.md | 10 + .../current/architecture-overview.md | 23 + .../current/bt-panel.md | 116 ++++ .../current/controllers.md | 26 + .../current/docker.md | 70 +++ .../current/installation.mdx | 249 +++++++++ .../current/internationalization.md | 12 + .../current/intro.md | 16 + .../current/main-features.md | 46 ++ .../current/main-package.md | 28 + .../current/migration.md | 112 ++++ .../current/overview.md | 22 + .../current/routers.md | 25 + .../current/server-side-rendering.md | 18 + i18n/zh/docusaurus-theme-classic/footer.json | 54 ++ i18n/zh/docusaurus-theme-classic/navbar.json | 42 ++ netlify.toml | 2 +- 130 files changed, 9247 insertions(+), 14 deletions(-) create mode 100644 i18n/de/code.json create mode 100644 i18n/de/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/de/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/de/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/de/docusaurus-theme-classic/footer.json create mode 100644 i18n/de/docusaurus-theme-classic/navbar.json create mode 100644 i18n/en/code.json create mode 100644 i18n/en/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/en/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/en/docusaurus-theme-classic/footer.json create mode 100644 i18n/en/docusaurus-theme-classic/navbar.json create mode 100644 i18n/fr/code.json create mode 100644 i18n/fr/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/fr/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/fr/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/fr/docusaurus-theme-classic/footer.json create mode 100644 i18n/fr/docusaurus-theme-classic/navbar.json create mode 100644 i18n/ja/code.json create mode 100644 i18n/ja/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/ja/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/ja/docusaurus-theme-classic/footer.json create mode 100644 i18n/ja/docusaurus-theme-classic/navbar.json create mode 100644 i18n/ko/code.json create mode 100644 i18n/ko/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/ko/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/ko/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/ko/docusaurus-theme-classic/footer.json create mode 100644 i18n/ko/docusaurus-theme-classic/navbar.json create mode 100644 i18n/ru/code.json create mode 100644 i18n/ru/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/ru/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/ru/docusaurus-theme-classic/footer.json create mode 100644 i18n/ru/docusaurus-theme-classic/navbar.json create mode 100644 i18n/zh/code.json create mode 100644 i18n/zh/docusaurus-plugin-content-blog/options.json create mode 100644 i18n/zh/docusaurus-plugin-content-blog/welcome.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current.json create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/api-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/architecture-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/bt-panel.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/controllers.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/docker.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/installation.mdx create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/internationalization.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/intro.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/main-features.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/main-package.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/migration.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/routers.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/server-side-rendering.md create mode 100644 i18n/zh/docusaurus-theme-classic/footer.json create mode 100644 i18n/zh/docusaurus-theme-classic/navbar.json diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 81bcb11..17668c3 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -15,7 +15,7 @@ jobs: - name: Install and Build 🔧 run: | yarn install - yarn crowdin:sync + # yarn crowdin:sync yarn build - name: Build PDF prerequisites 🔨 diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 9c2e5b8..ee94e23 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -19,6 +19,8 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Init Website - run: | - yarn install && yarn build --locale en \ No newline at end of file + - name: Install dependencies + run: yarn install + + - name: Build Website + run: yarn install diff --git a/.gitignore b/.gitignore index 809df75..ed26e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ # Production /build -/i18n # Generated files .docusaurus diff --git a/docusaurus.config.js b/docusaurus.config.js index 14ee71e..2d01127 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -216,11 +216,9 @@ var _hmt = _hmt || []; editUrl: ({locale, docPath}) => { if (locale === "en") { return `https://github.com/casnode/casnode-website/edit/master/docs/${docPath}`; + } else { + return `https://github.com/casnode/casnode-website/edit/master/i18n/${locale}/docusaurus-plugin-content-docs/current/${docPath}`; } - if (locale === "zh") { - return "https://crowdin.com/project/casnode-website/zh-CN"; - } - return `https://crowdin.com/project/casnode-website/${locale}`; }, }, blog: { @@ -229,11 +227,9 @@ var _hmt = _hmt || []; editUrl: ({locale, blogDirPath, blogPath}) => { if (locale === "en") { return `https://github.com/casnode/casnode-website/edit/master/${blogDirPath}/${blogPath}`; + } else { + return `https://github.com/casnode/casnode-website/edit/master/i18n/${locale}/docusaurus-plugin-content-blog/${blogPath}`; } - if (locale === "zh") { - return "https://crowdin.com/project/casnode-website/zh-CN"; - } - return `https://crowdin.com/project/casnode-website/${locale}`; }, }, theme: { diff --git a/i18n/de/code.json b/i18n/de/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/de/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/de/docusaurus-plugin-content-blog/options.json b/i18n/de/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/de/docusaurus-plugin-content-blog/welcome.md b/i18n/de/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..0a6fe33 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: Begrüßung +author: Kininaru +author_title: Casbin-Mitglied +author_url: https://de.github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - willkommen +--- + +Willkommen auf der Casnode Webseite! + +Hier finden Sie technische Dokumente und Casnode API! \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current.json b/i18n/de/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..ac7afcc --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: API-Übersicht +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +Wir verwenden den [Swagger](https://swagger.io/) um alle unsere API aufzuzeichnen. Sie können hier die api Dokumentation [sehen](https://forum.casbin.com/swagger/). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/de/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..792022d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: Übersicht +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnode ist ein Open-Source-Projekt. Eine aktive Gemeinschaft ist ihre Vitalität. + +Dieses Kapitel ist für Entwickler, die zu Casnode beitragen wollen. Hier erfahren Sie die Architektur von Casnode und wie es funktioniert. + +## Architektur + +Casnode hat 2 Teile: das Frontend und das Backend. + +| Name | Beschreibung | Werkzeuge | Quellcode | +| -------- | ------------------------------- | ----------------------------------- | ------------------------------------------------- | +| Frontend | Web-Frontend UI für Casnode | JavaScript + Reagieren + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API Backend für Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +Wie bereits erwähnt, wird das Frontend von Casnode in der Produktumgebung gebaut und von der Backend bedient. In Entwicklungsumgebungen wird das Frontend von Nodejs bedient. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/de/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..dc732a3 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## Casnode unter dem Linux BT Panel installieren + +### Arbeit vorbereiten +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### Install Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +exportiere GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +gehe env -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### Casdoor konfigurieren + +#### Casdoor ausführen + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +cd web +npm install +npm run build +cd .. +sudo nohup ./main & +``` +#### Kasnode in Casdoor konfigurieren + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Kasnode konfigurieren + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/de/docusaurus-plugin-content-docs/current/controllers.md b/i18n/de/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..ac8f645 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: Controller +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +In `routers/router.go`findest du viele Linien wie z.B. + +```go +beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +Bitte beachten Sie den dritten Parameter `"GET:GetTopics"`. Dieser String ist eine Kombination aus HTTP-Request-Methode und dem Funktionsnamen des Request-Handlers. Sie finden eine Funktion namens `GetTopics` im Paket `Controller`, und es ist der Handler der Anfrage `/api/get-topics`. + +Auf diese Weise finden Sie die entsprechende Funktion der Anfrage. + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/docker.md b/i18n/de/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..8d0fb36 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## Kasnode über Docker installieren +### Arbeit vorbereiten +#### Docker und Docker-Compose installieren +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### Casnode & casdoor klonen +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### Casdoor konfigurieren + +#### Gehäuse ausführen +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### Casnode in der Kasse konfigurieren +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Casnode konfigurieren +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +docker-compose hoch +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/de/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/de/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..261bd3c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: Installation +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +Diese Absätze werden Ihnen helfen, Casnode auf Ihrem Server zu installieren. Wenn Sie Casnode über BT Panel oder Docker installieren möchten, lesen Sie bitte die Details unter: [BT Panel](./bt-panel.md) und [Docker](./docker.md). + +Bitte klonen Sie Casnode zuerst: +```bash +git clone https://github.com/casbin/casnode +``` +und folgen Sie diesen Schritten, um ganz einfach Ihr eigenes Forum einzurichten! + +## Produktionsumgebung + +### 1. Casdoor einrichten + +Kasnode verwendet [Casdoor](https://github.com/casbin/casdoor) um Mitglieder zu verwalten. Daher müssen Sie eine Organisation und eine Bewerbung für Casnode in einer Casdoer-Instanz erstellen. + +Folge diesen Schritten, um Casdoor für Casnode einzurichten: +- Navigiere zur Kasse (Klicke [hier](https://casdoor.org/docs/overview) für Details zu Casdoor) +- Bei der Organisation "eingebaut" anmelden +- Klicke **Organisationen** in der oberen Leiste +- **Hinzufügen Schaltfläche** +- Denken Sie an den Namen der Organisation, hier verwende ich **Casbin-forum** als Name meiner Organisation: ![organisation](/img/installation/organization.png) + +- **Anwendungen** in der oberen Leiste anklicken +- **Hinzufügen Schaltfläche** +- Name der Anwendung merken - hier benutze ich das Forum als Name meiner Anwendung: +- **Bearbeiten** + +![anwendung](/img/installation/application.png) + +- Wählen Sie die Organisation aus, die Sie gerade erstellt haben + +![wählen](/img/installation/chooseorganization.png) +- Ändern Sie die Umleitungs-URLs zur Forum-URL. Wenn Sie sich in einer sich entwickelnden Umgebung befinden, lautet Ihre Umleitungs-URL **http://localhost:3000/callback**. Wenn Sie sich in einer Produktionsumgebung befinden, lautet Ihre Umleitungs-URL **http://yourip:7000/callback** + +![umleitungen](/img/installation/redirecturls.png) +- Klicken Sie auf **Speichern** und merken Sie sich die `Client ID` und `Client Secret` + +![klient](/img/installation/client.png) + +### 2. `conf/app.conf ändern` + +Hier ist eine Erklärung für die Konfigurations-Elemente: + +#### Database connection: + +#### Casnode database + +```ini {2} +driverName = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. `web/src/Conf.js ändern` + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. Frontend erstellen + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. Backend erstellen +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## Entwickler-Umgebung + +### 1. Schritt 1-3 oben machen + +### 4. Backend ausführen + +```go +go run main.go +``` +### 5. Frontend ausführen + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/de/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/de/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..3135fb7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: Internationalisierung +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Casnode unterstützt mehrere Sprachen, indem wir die Übersetzungen nach Crowdin einsetzen, unterstützen wir Chinesisch, Französisch, Deutsch, Russisch, Japanisch und Koreanisch. + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/intro.md b/i18n/de/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..2597129 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: Übersicht +--- + +Casnode ist ein von [Casbin Community](https://casbin.org/) entwickeltes Forum. Die detaillierte Architektur: + +| Name | Beschreibung | Werkzeuge | Quellcode | +| -------- | ------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Web-Frontend UI für Casnode | JavaScript und reagieren | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API Backend für Casnode | Golang + Beego + MySQL + Xorm | https://de.de.de.de/ | + + Die Casbin-Community benutzt das Forum als offizielles Forum: [Casnode](https://forum.casbin.com/). + +Kasnode ist Open Source, Sie können den Code [hier erhalten](https://github.com/casbin/casnode). + +Casnode ist einfach zu bedienen. Es hat eine detaillierte Beschreibung in Benutzeroberflächen, so dass normale Benutzer leicht mit Casnode beginnen können. Dieses Dokument ist für Administratoren vorbereitet, die die volle Nutzung von Casnode wünschen. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/main-features.md b/i18n/de/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..e4499af --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: Hauptmerkmale +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +Es gibt spezielle Funktionen, die Casnode von anderen Foren unterscheiden. Hier ist eine kurze Einführung dieser Features. Lesen Sie weiter für weitere Details. + +## 📧 Mailingliste + +Casnode unterstützt Google Groups gut. Durch die Integration von [google-group-crawler](https://github.com/casbin/google-groups-crawler), nach dem Einrichten einer Google Group Konfiguration in Casnode, wird eine Zwei-Wege-Synchronisation gestartet. Im Moment kann Casnode nur Gespräche von Google Groups synchronisieren, aber Gespräche auf andere Mailinglisten übertragen. + +## ✨ Mehrere Plattformen + +Casnode unterstützt Computer und mobilen Zugriff. Frontend UI passt sich an PC und Handy an. + +## :magnifying_glass_tilted_left + +Casnode unterstützt eingebaute Suche, natürlich auch die Suche mit verschiedenen Suchmaschinen wie Google. + +## 🖼️ Bilder und Anhänge hochladen + +Casnode unterstützt Drag and Drop um Bilder und Anhänge hochzuladen. Gleichzeitig hat jedes Konto eine eigene Dateibibibliothek und ein Kontingent. Dateien in der Dateibibibliothek können auch über den Austausch von Links freigegeben werden, was es bequemer macht, Bilder und Bilder zu veröffentlichen. Unterstützt verschiedene OSS-Speicher wie Alibaba Cloud und Tencent Cloud. + +## 📢 Website-Werbung + +Unterstützung bei der Einrichtung von Site-Werbung, die unabhängig vom Hintergrund geliefert werden kann. + +## 🎯 Server-Seitenrendering + +Casnode Support Server Seite Rendering, freundlich zu Suchmaschine SEO. + +## 🗄️ Alle Arten von Datenbanken + +Kasnode verwendet [xorm](https://github.com/go-xorm/xorm) um mit Datenbanken zu verbinden. Sie können MySQL, sqlite3, mymysql und Postgres für Casnode verwenden. + +## 🌐 Mehrere Sprachen + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. Jetzt unterstützt Casnode Chinesisch, Englisch, Französisch, Deutsch, Russisch, Japanisch und Koreanisch. Willkommen beim Erstellen eines PR oder der Einreichung eines Problems zur Unterstützung Ihrer Sprache! Und jeder Übersetzungsbeitrag ist willkommen! + +## 🚪 Benutze Casdoor um Mitglieder zu verwalten + +Casnode verwaltet keine Mitgliedstabelle in der Datenbank. Kasnode verwendet [Casdoor](https://github.com/casbin/casdoor) um Benutzer zu verwalten. Casdoor ist eine SSO-Plattform basierend auf OAuth2.0. Über Casdoor unterstützt Casnode eine Vielzahl von Login/Registrierungsmethoden von Dritten. Es gibt viele Registrierungsmethoden, Handy, E-Mail, QQ, WeChat, GitHub, Facebook, Google, LinkedIn, DingTalk, Gitee, wecom und GitLab. Es unterstützt auch Grafik-Verifizierungscodes für die menschliche Maschinenüberprüfung. Wenn Sie Casdoor für Ihre Organisationsleitung verwenden, können sich Ihre Mitglieder direkt bei Casnode anmelden, ohne sich erneut bei Casnode anzumelden. Um detailliertere Funktionen zu erhalten, gehen Sie bitte zu [Casdoor](https://casdoor.org). diff --git a/i18n/de/docusaurus-plugin-content-docs/current/main-package.md b/i18n/de/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..71fcea2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: Hauptpaket +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +Es gibt mehrere Pakete im Backend von Casnode. The main function and the Beego framework call these packages when the program starts. + +## wichtigsten + +Das Hauptpaket ist der Eingang von Casnode. Wir machen einige grundlegende Installationsschritte im Hauptpaket: + +* **Richte einige globale Variablen**ein: Datenbankadapter, http Client, OSS-Adapter, Segmenter und Forum Basisinformationen (Forum-Version, Online-Nummer, Google Groups Crawlers) + +* **Filter einrichten:** API-Request-Filter, Suchmaschinen-Bot-Filter + +* **Sitzungsdaten:** Casnode verwendet Beego Session um Benutzerinformationen zu speichern. In der Hauptfunktion hat diese Zeilen geschrieben, um eine dateibasierte Sitzung zu verwenden: + +```go +beego.BConfig.WebConfig.SessionProvider = "file" +beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp" +beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 365 +``` + +Bitte wenden Sie sich an [Beego Session](https://beego.me/docs/mvc/controller/session.md) wenn Sie einen anderen Sitzungsadapter in Beego verwenden möchten. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/migration.md b/i18n/de/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..07a1ba4 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: Migration von DiscuzX +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnode hat eine Menge Go-Skripte zur Verfügung gestellt, um Benutzern zu helfen, ihre Foren von DiscuzX 3.x nach Casnode zu migrieren. Die Skripte befinden sich unter: https://github.com/casbin/casnode/tree/master/discuzx + +Eine Xorm-unterstützte Datenbank (z.B. MySQL) wird von Cansode verwendet, um Forendaten wie Themen und Antworten zu speichern. Die Objektspeicherung (als Form des Casdoor Speicheranbieters) wird von Casnode zur Speicherung von Bildern und Dateianhängen verwendet. + +## Zubereitung + +Sie müssen die folgenden Umgebungen vorbereiten, bevor Sie die Migration durchführen: + +1. Eine Cloud-VM (besser mit über 4 Kernen und 8 GB Speicher, 8 Kerne und 16 GB ist noch besser), besser bei Intranet-Verbindung mit der Datenbank für höhere Geschwindigkeit. Diese VM wird verwendet, um die Go-Migrationsskripte auszuführen. +2. Ein Casnode Git-Repository mit den Go-Migrationsskripten in der obigen VM (die Casnode-Instanz kann ausgeführt oder gestoppt werden). +3. Eine laufende Casdoor Instanz (besser in der gleichen Cloud VM für höhere Geschwindigkeit), mit mindestens einem Objektspeicher als Speicheranbieter von Casdoor konfiguriert. Dies wird zum Hochladen der Bilder und Anhänge von DiscuzX in den Objektspeicher verwendet. +4. Ihre DiscuzX-Instanz ist online. + +## Konfiguration + +Konfigurieren Sie zuerst die Casdoor und Casnode basierend auf den Installationsanleitungen, stellen Sie sicher, dass sie vor der Migration normal funktionieren. + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +casdoorDbName = casdoor +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbName: Ihr DiscuzX's DB-Name +2. discuzxDomain: DiscuzX public Domain, mit folgendem Schrägstrich +3. discuzxAttachmentBaseUrl: Die Anhang-Basis-URL Ihres DiscuzX mit folgendem Schrägstrich (Sie können es von einer URL der Anhang-Datei Ihres DiscuzX erhalten) +4. avatarPoolBaseUrl: Ändern Sie dies nicht + +```go +package discuzx + +var dbName = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## Migration + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +var SyncAvatarsConcurrency = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. Benutzermigration + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. Benutzer Avatar-Migration + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. Forum Migration + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. Thread und Post-Migration + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## Fertigstellung + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/de/docusaurus-plugin-content-docs/current/overview.md b/i18n/de/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..600c009 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: Übersicht +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). Die detaillierte Architektur: + +| Name | Beschreibung | Werkzeuge | Quellcode | +| -------- | ------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Web-Frontend UI für Casnode | JavaScript und reagieren | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API Backend für Casnode | Golang + Beego + MySQL + Xorm | https://de.de.de.de/ | + + Die Casbin-Community benutzt das Forum als offizielles Forum: [Casnode](https://forum.casbin.com/). + +Kasnode ist Open Source, Sie können den Code [hier erhalten](https://github.com/casbin/casnode). + +Casnode ist einfach zu bedienen. Es hat eine detaillierte Beschreibung in Benutzeroberflächen, so dass normale Benutzer leicht mit Casnode beginnen können. Dieses Dokument ist für Administratoren vorbereitet, die die volle Nutzung von Casnode wünschen. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/routers.md b/i18n/de/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..8de1a2d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: Router +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +Tatsächlich ist `Router` ein integriertes Paket von Beego. `routers.init()` wird beim Programmstart vom Framework ausgeführt. Allerdings haben wir dem Paket einige Filterfunktionen hinzugefügt. + +Wir werden hier nicht über die `Routers/Router.go` sprechen. Beego hatte bereits ein gutes Dokument dafür. Wir werden unsere Filter hier vorstellen. + +## routers/filter.go + +**TransparentStatic:** Dieser Filter dient zur Ausgabe statischer Dateien. Wenn ein Abfragepfad nicht mit `/api/`beginnt, wird der Filter eine statische Datei an den Browser weitergeben. Der Filter findet die angeforderte Datei in `web/build/`und liefert die Datei, falls vorhanden. + +**FreshAccountActiveStatus:** Aktualisieren Sie die Online-Status der Benutzer, wenn sie eine Anfrage senden. + +## routers/filter_ssr.go + +Wir verwenden Chromedp um Seiten für Suchmaschinen-Bots zu rendern. Wenn Chrome installiert ist, werden Funktionen in dieser Datei eine gerenderte Seite an Bots zurückgeben. + +Wir verwenden einen regulären Ausdruck `Bot|slurp|bing|crawler` um dem User Agent der Anfrage zu entsprechen. Wenn dies der Fall ist, denken wir, dass die Anfrage von einem Bot gesendet wird. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/de/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a3c6bfd --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: Server Side Rendering +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode support SSR. SSR(Server-side rendering) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a fully rendered page to the client. + +This allows for dynamic components to be served as static HTML markup.This approach can be useful for search engine optimization (SEO) when indexing does not handle JavaScript properly. It may also be beneficial in situations where downloading a large JavaScript bundle is impaired by a slow network. + +## Implementation + +You can see the implementation of server side rendering in `routers/filter_ssr.go`.We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. diff --git a/i18n/de/docusaurus-theme-classic/footer.json b/i18n/de/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/de/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/de/docusaurus-theme-classic/navbar.json b/i18n/de/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/de/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/en/code.json b/i18n/en/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/en/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/en/docusaurus-plugin-content-blog/options.json b/i18n/en/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/en/docusaurus-theme-classic/footer.json b/i18n/en/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/en/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/fr/code.json b/i18n/fr/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/fr/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/fr/docusaurus-plugin-content-blog/options.json b/i18n/fr/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/fr/docusaurus-plugin-content-blog/welcome.md b/i18n/fr/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..4ff4a56 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: Bienvenue +author: Kininaru +author_title: Membre de Casbin +author_url: https://github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - bienvenu +--- + +Bienvenue sur le site de Casnode! + +Vous pouvez trouver des documents techniques et des API Casnode ici ! \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current.json b/i18n/fr/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/fr/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..1aa55ab --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: Aperçu de l'API +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +Nous utilisons le [swagger](https://swagger.io/) pour enregistrer toute notre API, vous pouvez voir les docs d'api [ici](https://forum.casbin.com/swagger/). \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/fr/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..2a501d5 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: Aperçu +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnode est un projet open source. Une communauté active est sa vitalité. + +Ce chapitre est destiné aux développeurs qui veulent contribuer à Casnode. Ici, vous apprendrez l'architecture de Casnode, et comment cela fonctionne. + +## Architecture + +Casnode a 2 parties : le frontend et le backend. + +| Nom | Libellé | Outils | Code source | +| -------- | -------------------------------------------- | ------------------------------- | ------------------------------------------------- | +| Frontend | Interface web pour Casnode | JavaScript + React + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| Backend | Administration de l'API RESTful pour Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +Comme nous l'avons mentionné précédemment, dans les environnements de produits, le frontend de Casnode est construit et servi par le backend. Dans les environnements de développement, le frontend est servi par Nodejs. \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/fr/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..414f91b --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## Installer Casnode sous le panneau BT Linux + +### Préparation du travail +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### Install Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +export GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +go env -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### Configurer Casdoor + +#### Lancer Casdoor + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +web cd +npm install +npm run build +cd .. +sudo nohup ./main & +``` +#### Configurer Casnode dans Casdoor + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Configurer Casnode + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/controllers.md b/i18n/fr/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..0c05f2b --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: Contrôleurs +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +Dans `routers/router.go`, vous pouvez trouver beaucoup de lignes comme + +```go +Beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +Veuillez prêter attention au troisième paramètre `"GET:GetTopics"`. Cette chaîne de caractères est une combinaison de la méthode de requête HTTP et du nom de la fonction du gestionnaire de requêtes. Vous pouvez trouver une fonction appelée `GetTopics` dans le paquet `contrôleurs`, et c'est le gestionnaire de la requête `/api/get-topics`. + +Vous pouvez trouver la fonction correspondante de la requête de cette façon. + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/docker.md b/i18n/fr/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..a3285b4 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## Installer casnode via docker +### Préparation du travail +#### Installer docker et docker-compose +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### Cloner la casnode & casdoor +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### Configurer la casdoor + +#### Courir la cassette +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### Configurer casnode dans casdoor +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Configurer la casnode +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +docker-compose vers le haut +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..7fbd188 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: Installation +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +Ces paragraphes vous aideront à déployer Casnode sur votre serveur. Si vous voulez installer Casnode par BT Panel ou Docker, veuillez consulter les détails sur: [BT Panel](./bt-panel.md) et [Docker](./docker.md). + +Veuillez d'abord cloner Casnode : +```bash +clone git https://github.com/casbin/casnode +``` +et suivez ces étapes pour configurer facilement votre propre forum! + +## Environnement de Production + +### 1. Configurer Casdoor + +Casnode utilise [Casdoor](https://github.com/casbin/casdoor) pour gérer les membres. Vous devez donc créer une organisation et une application pour Casnode dans une instance Casporte. + +Suivez ces étapes pour configurer Casdoor pour Casnode: +- Naviguez vers Casdoor (Cliquez sur [ici](https://casdoor.org/docs/overview) pour plus de détails sur Casdoor) +- Connectez-vous à l'organisation "intégré" +- Cliquez sur **Organisations** dans la barre supérieure +- Cliquez sur le bouton **ajouter** +- Rappelez-vous le nom de l'organisation, ici j'utilise **casbin-forum** comme nom de mon organisation : ![organisation](/img/installation/organization.png) + +- Cliquez sur **Applications** dans la barre supérieure +- Cliquez sur le bouton **ajouter** +- Rappelez-vous le nom de l'application, ici j'utilise le forum comme nom de mon application: +- Cliquez sur **Modifier** + +![application](/img/installation/application.png) + +- Sélectionnez l'organisation que vous venez de créer en tant qu'organisation d'application + +![sélectionner](/img/installation/chooseorganization.png) +- Modifier les URL de redirection vers l'URL du forum. Si vous êtes dans un environnement en développement, votre URL de redirection est **http://localhost:3000/callback**. Si vous êtes dans un environnement de production, votre URL de redirection est **http://yourip:7000/callback** + +![redirecturls](/img/installation/redirecturls.png) +- Cliquez sur **Enregistrer** et mémorisez l' `ID du client` et `Secret du client` + +![client](/img/installation/client.png) + +### 2. Modifier `conf/app.conf` + +Voici une explication des éléments de configuration : + +#### Database connection: + +#### Casnode database + +```ini {2} +driverName = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. Modifier `web/src/Conf.js` + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. Construire le frontal + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. Fin de la compilation +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## Environnement Dev + +### 1. Faire l'étape 1-3 ci-dessus + +### 4. Exécuter en arrière plan + +```go +go run main.go +``` +### 5. Exécuter le front-end + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/fr/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..a1e37c2 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: Internationalisation +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Casnode prend en charge les langues multiples, en déployant les traductions sur Crowdin, nous prenons en charge le chinois, le français, l'allemand, le russe, le japonais et le coréen. + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/intro.md b/i18n/fr/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..40b840b --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: Aperçu +--- + +Casnode est un forum développé par [la communauté Casbin](https://casbin.org/). L'architecture détaillée : + +| Nom | Libellé | Outils | Code source | +| -------- | -------------------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Interface web pour Casnode | JavaScript et React | https://github.com/casbin/casnode/tree/master/web | +| Backend | Administration de l'API RESTful pour Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + La communauté Casbin utilise le forum comme forum officiel : [Casnode](https://forum.casbin.com/). + +Casnode est open source, vous pouvez obtenir le code [ici](https://github.com/casbin/casnode). + +Casnode est facile à utiliser. Il a une description détaillée dans les interfaces utilisateur afin que les utilisateurs normaux puissent facilement commencer avec Casnode. Ce document est préparé pour les administrateurs qui veulent profiter pleinement de Casnode. \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/main-features.md b/i18n/fr/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..2dadcc6 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: Caractéristiques principales +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +Il y a des caractéristiques spéciales qui distinguent Casnode des autres forums. Voici une courte introduction de ces fonctionnalités. Lisez ici pour plus de détails. + +## :e-mail : Liste de diffusion + +Casnode supporte bien les groupes Google. En intégrant [google-group-crawler](https://github.com/casbin/google-groups-crawler), après avoir configuré une configuration Google Group dans Casnode, une synchronisation bidirectionnelle sera lancée. Pour l'instant, Casnode ne peut que synchroniser les conversations de Google Groups, mais peut pousser des conversations vers d'autres listes de diffusion. + +## ✨ Multi-plateforme + +Casnode prend en charge l'accès aux ordinateurs et aux mobiles. L'interface utilisateur s'adapte au PC et au mobile. + +## :magnifying_glass_tilted_left : Recherche intégrée + +Casnode prend en charge la recherche intégrée, bien sûr, aussi la recherche à l'aide de différents moteurs tels que Google. + +## 🖼️ Télécharger des images et des pièces jointes + +Support casnode glisser-déposer pour télécharger des images et des pièces jointes. En même temps, chaque compte a sa propre bibliothèque de fichiers et quota. Les fichiers de la bibliothèque de fichiers peuvent également être partagés en utilisant des liens de partage, ce qui rend plus pratique la publication d'images et d'images. Supporte divers stockages OSS tels que Alibaba Cloud et Tencent Cloud. + +## :loudspeaker : Publicité du site + +Soutien à la mise en place de publicités sur le site, qui peuvent être fournies de manière indépendante à partir de l'arrière-plan. + +## 🎯 rendu latéral du serveur + +Casnode supporte le rendu côté serveur, convivial pour le référencement des moteurs de recherche. + +## 🗄️ Toutes sortes de bases de données + +Casnode utilise [xorm](https://github.com/go-xorm/xorm) pour se connecter à des bases de données. Vous pouvez utiliser MySQL, sqlite3, mymysql et Postgres pour Casnode. + +## 🌐 Multi-langues + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. Maintenant Casnode supporte le chinois, l'anglais, le français, l'allemand, le russe, le japonais et le coréen. Bienvenue pour faire une PR ou déposer un problème pour supporter votre langue! Et toute contribution à la traduction est la bienvenue! + +## 🚪 Utiliser Casdoor pour gérer les membres + +Casnode ne maintient pas de table de membre dans la base de données. Casnode utilise [Casdoor](https://github.com/casbin/casdoor) pour gérer les utilisateurs. Casdoor est une plate-forme SSO basée sur OAuth2.0. Grâce à Casdoor, Casnode prend en charge une variété de méthodes de connexion et d'enregistrement de tiers. Il existe de nombreuses méthodes d'inscription, téléphone mobile, email, QQ, WeChat, GitHub, Facebook, Google, LinkedIn, DingTalk, Gitee, wecom et GitLab. Il supporte également les codes de vérification graphique pour la vérification de la machine humaine. Si vous utilisez Casdoor pour la gestion de votre organisation, vos membres peuvent vous connecter directement à Casnode, pas besoin de vous inscrire à nouveau à Casnode. Pour obtenir des fonctionnalités plus détaillées, veuillez aller sur [Casdoor](https://casdoor.org). diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/main-package.md b/i18n/fr/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..04cff3f --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: Paquet principal +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +Il y a plusieurs paquets dans le backend de Casnode. The main function and the Beego framework call these packages when the program starts. + +## principal + +Le paquet principal est l'entrée de Casnode. Nous faisons quelques étapes de configuration de base dans le paquet principal : + +* **Configurer quelques variables globales**: adaptateur de base de données, client http, adaptateur OSS, Segmenter et informations de base du forum (version du forum, numéro en ligne, Google Groupes Crawlers) + +* **Définition des filtres :** Filtre des requêtes API, filtre des robots de recherche + +* **Données de session :** Casnode utilise la session Beego pour stocker les informations de l'utilisateur. Dans la fonction principale, a écrit ces lignes pour utiliser une session basée sur un fichier : + +```go +beego.BConfig.WebConfig.Session.SessionProvider = "file" +beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp" +beego.BConfig.WebConfig.SessionGCMaxLifetime = 3600 * 24 * 365 +``` + +Veuillez vous référer à la [session Beego](https://beego.me/docs/mvc/controller/session.md) si vous voulez utiliser un autre adaptateur de session dans Beego. \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/migration.md b/i18n/fr/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..018e51d --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: Migration depuis DiscuzX +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnode a fourni un grand nombre de scripts Go pour aider les utilisateurs à migrer leurs forums de DiscuzX 3.x vers Casnode. Les scripts se trouvent à l'adresse : https://github.com/casbin/casnode/tree/master/discuzx + +Une base de données prise en charge par Xorm (par exemple, MySQL) est utilisée par Cansode pour stocker des données de forum comme des sujets et des réponses. Le stockage d'objets (comme la forme du fournisseur de stockage Casdoor) est utilisé par Casnode pour stocker des images et des fichiers joints. + +## Préparation + +Vous devez préparer les environnements suivants avant d'effectuer la migration : + +1. Une VM nuageuse (mieux avec plus de 4 cœurs et 8 Go de mémoire, 8 cœurs et 16 Go est encore mieux), mieux avec la connexion Intranet avec la base de données pour une vitesse plus élevée. Cette machine virtuelle est utilisée pour exécuter les scripts de migration Go. +2. Un dépôt git de Casnode avec les scripts de migration Go dans la machine virtuelle ci-dessus (la instance de Casnode peut être exécutée ou arrêtée). +3. Une instance Casdoor en cours d'exécution (meilleure dans la même VM nuageuse pour une vitesse plus élevée), avec au moins un stockage d'objet est configuré en tant que fournisseur de stockage Casdoor . Ceci est utilisé pour télécharger les images et fichiers attachés de DiscuzX sur le stockage d'objet. +4. Votre instance DiscuzX est en ligne. + +## Configuration + +Tout d'abord, configurez correctement Casdoor et Casnode en fonction de leurs guides d'installation, assurez-vous qu'ils fonctionnent normalement avant la migration. + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +format@@0 casdoorDbName = casdoor +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbName: le nom de votre DB de DiscuzX +2. discuzxDomain: le domaine public de votre DiscuzX, avec slash final +3. discuzxAttachmentBaseUrl : l'URL de base de votre pièce jointe DiscuzX, avec une barre oblique finale (vous pouvez la récupérer à partir d'une URL de fichier attaché de votre DiscuzX) +4. avatarPoolBaseUrl: ne pas changer ceci + +```go +package discuzx + +var dbName = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## Migration + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +var SyncAvatarsConcurrency = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. Migration des utilisateurs + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. Migration des avatars de l'utilisateur + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. Migration du forum + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. Migration de fils et de messages + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## Finalisation + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/overview.md b/i18n/fr/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..f16e550 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: Aperçu +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). L'architecture détaillée : + +| Nom | Libellé | Outils | Code source | +| -------- | -------------------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Interface web pour Casnode | JavaScript et React | https://github.com/casbin/casnode/tree/master/web | +| Backend | Administration de l'API RESTful pour Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + La communauté Casbin utilise le forum comme forum officiel : [Casnode](https://forum.casbin.com/). + +Casnode est open source, vous pouvez obtenir le code [ici](https://github.com/casbin/casnode). + +Casnode est facile à utiliser. Il a une description détaillée dans les interfaces utilisateur afin que les utilisateurs normaux puissent facilement commencer avec Casnode. Ce document est préparé pour les administrateurs qui veulent profiter pleinement de Casnode. \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/routers.md b/i18n/fr/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..9dd3040 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: Routeurs +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +En fait, `routeurs` est un paquet intégré de Beego. `routers.init()` est exécuté par le framework lorsque le programme démarre. Cependant, nous avons ajouté quelques fonctions de filtrage au paquet. + +Nous n'allons pas parler du `routers/router.go` ici, Beego a déjà eu un bon document pour cela. Nous allons introduire nos filtres ici. + +## go + +**TransparentStatique :** Ce filtre est pour servir les fichiers statiques. Si un chemin de requête ne commence pas par `/api/`, alors le filtre servira un fichier statique au navigateur. Le filtre va trouver le fichier demandé dans `web/build/`, et servir le fichier s'il existe. + +**FreshAccountActiveStatus :** Mettez à jour les états en ligne des utilisateurs lorsqu'ils envoient une demande. + +## routeurs/filtre_ssr.go + +Nous utilisons Chromedp pour afficher les pages des robots des moteurs de recherche. Si Chrome est installé, les fonctions de ce fichier retourneront une page rendue aux bots. + +Nous utilisons une expression régulière `bot|slurp|bing|crawler` pour correspondre à l'agent utilisateur de la requête. En cas de correspondance, nous pensons que la requête est envoyée par un bot. \ No newline at end of file diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/fr/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a3c6bfd --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: Server Side Rendering +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode support SSR. SSR(Server-side rendering) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a fully rendered page to the client. + +This allows for dynamic components to be served as static HTML markup.This approach can be useful for search engine optimization (SEO) when indexing does not handle JavaScript properly. It may also be beneficial in situations where downloading a large JavaScript bundle is impaired by a slow network. + +## Implementation + +You can see the implementation of server side rendering in `routers/filter_ssr.go`.We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. diff --git a/i18n/fr/docusaurus-theme-classic/footer.json b/i18n/fr/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/fr/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/fr/docusaurus-theme-classic/navbar.json b/i18n/fr/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/fr/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/ja/code.json b/i18n/ja/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/ja/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/ja/docusaurus-plugin-content-blog/options.json b/i18n/ja/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/ja/docusaurus-plugin-content-blog/welcome.md b/i18n/ja/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..0382dd9 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: ようこそ +author: Kininaru +author_title: カスビンメンバー +author_url: https://github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - いらっしゃいませ +--- + +Casnodeウェブサイトへようこそ! + +テクニカルドキュメントやCasnodeのAPIはこちらからご覧いただけます。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current.json b/i18n/ja/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/ja/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..28d6fac --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: API の概要 +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +[swagger](https://swagger.io/) を使用してすべての API を記録します。API ドキュメント [はこちら](https://forum.casbin.com/swagger/) をご覧いただけます。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/ja/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..9856b10 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: 概要 +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnodeはオープンソースプロジェクトです。 アクティブなコミュニティは、その活力です。 + +この章はCasnodeに貢献したい開発者のためのものです。 ここでは、Casnodeのアーキテクチャとその仕組みを学びます。 + +## 建築 + +Casnodeには、フロントエンドとバックエンドの2つの部分があります。 + +| 名前 | 説明 | ツール | ソース コード | +| -------- | ------------------------- | ------------------------------- | ------------------------------------------------- | +| Frontend | Casnode用WebフロントエンドUI | JavaScript + React + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| バックエンド | CasnodeのRESTful APIバックエンド | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +前述したように、製品環境では、Casnodeのフロントエンドが構築され、バックエンドによって提供されます。 開発環境では、フロントエンドは Node.js によって提供されます。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/ja/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..9017e2e --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## LinuxBTパネルにCasnodeをインストールします + +### 作業の準備 +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### Install Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +export GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +go env -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### Casdoor の設定 + +#### カスドア + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +cd web +npm install +npm run build +cd .. +sudo nohup ./main & +``` +#### CasdoorのCasnodeを構成する + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Casnodeの設定 + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/controllers.md b/i18n/ja/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..860e35a --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: コントローラ +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +`routers/router.go`では、 + +```go +beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +3番目のパラメータ `"GET:GetTopics"` に注意してください。 この文字列は HTTP リクエストメソッドとリクエストハンドラの関数名の組み合わせです。 You can find a function called `GetTopics` in the package `controllers`, and it is the handler of the request `/api/get-topics`. + +この方法でリクエストの対応する機能を見つけることができます。 + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/docker.md b/i18n/ja/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..0ea874d --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## docker 経由で casnode をインストール +### 作業の準備 +#### docker と docker-compose のインストール +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### ケースノード & キャスドア を複製 +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### キャスドアの設定 + +#### キャスドア +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### Casdoor 内のカジノを設定 +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### ケースノードの設定 +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +docker-compose アップ +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..4a64ecb --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: インストール +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +これらの段落は、Casnodeをサーバーにデプロイするのに役立ちます。 あなたがBTパネルまたはDockerでCasnodeをインストールしたい場合は、詳細を参照してください: [BTパネル](./bt-panel.md) と [Docker](./docker.md). + +最初にCasnodeをクローンしてください: +```bash +git clone https://github.com/casbin/casnode +``` +自分のフォーラムを簡単に立ち上げるための手順に従ってください! + +## 生産環境 + +### 1. Casdoor のセットアップ + +Casnodeはメンバーを管理するために [Casdoor](https://github.com/casbin/casdoor) を使用します。 そのため、CasdoorインスタンスでCasnode用の組織とアプリケーションを作成する必要があります。 + +Casnode用にCasdoorをセットアップするには、以下の手順に従ってください: +- Casdoorに移動します(Casdoorの詳細については、ここをクリック [](https://casdoor.org/docs/overview)) +- 組織の「組み込み」にサインインします +- トップバーの **組織** をクリックします。 +- **add** ボタンをクリックします +- 組織名を覚えておいてください。ここでは、 **casbin-forum** を組織名として使用します。 ![組織](/img/installation/organization.png) + +- 上部バーの **アプリケーション** をクリックします。 +- **add** ボタンをクリックします +- アプリケーション名を覚えておいてください。フォーラムをアプリケーション名として使用します: +- **編集** をクリックしてください + +![アプリケーション](/img/installation/application.png) + +- アプリケーション組織として作成した組織を選択してください + +![select](/img/installation/chooseorganization.png) +- リダイレクトURLをフォーラムURLに変更します。 開発環境の場合、リダイレクト URL は **http://localhost:3000/callback** です。 もしあなたが本番環境の中にいるなら、あなたのリダイレクトURLは **http://yourip:7000/callback** + +![redirecturls](/img/installation/redirecturls.png) +- **保存** をクリックし、 `クライアント ID` と `クライアント シークレット` を記憶します + +![クライアント](/img/installation/client.png) + +### 2. `conf/app.conf` を変更する + +設定項目の説明は以下の通りです: + +#### Database connection: + +#### Casnode database + +```ini {2} +driverName = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. `web/src/Conf.js` を変更する + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. フロントエンドを構築 + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. バックエンドを構築 +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## 開発環境 + +### 1. 上記のステップ1-3を行う + +### 4. バックエンドで実行 + +```go +go run main.go +``` +### 5. フロントエンドを実行 + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/ja/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..0193420 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: 国際化 +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Casnodeは、Crowdinに翻訳を展開することで、多言語に対応しています。中国語、フランス語、ドイツ語、ロシア語、日本語、韓国語に対応しています。 + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/intro.md b/i18n/ja/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..f4a1cb1 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: 概要 +--- + +Casnodeは [Casbin community](https://casbin.org/) によって開発されたフォーラムです。 詳細なアーキテクチャ + +| 名前 | 説明 | ツール | ソース コード | +| -------- | ------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Casnode用WebフロントエンドUI | JavaScript と React | https://github.com/casbin/casnode/tree/master/web | +| バックエンド | CasnodeのRESTful APIバックエンド | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin コミュニティは、フォーラムを公式フォーラムとして使用します: [Casnode](https://forum.casbin.com/)。 + +Casnodeはオープンソースで、コードはこちら [](https://github.com/casbin/casnode)から取得できます。 + +Casnodeは使いやすいです。 ユーザーインターフェイスに詳細な説明があるため、通常のユーザーはCasnodeから簡単に開始できます。 このドキュメントはCasnodeを最大限に活用したい管理者向けに用意されています。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/main-features.md b/i18n/ja/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..ae67cfe --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: 主な機能 +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +Casnodeと他のフォーラムを区別する特別な機能があります。 ここでは、これらの機能の簡単な紹介です。 詳細については、お読みください。 + +## 📧 メーリングリスト + +CasnodeはGoogleグループをよくサポートしています。 [google-group-crowler](https://github.com/casbin/google-groups-crawler)を統合することにより、CasnodeでGoogleグループの設定を行った後、双方向の同期が開始されます。 現時点では、CasnodeはGoogleグループからの会話のみを同期することができますが、他のメーリングリストへの会話をプッシュすることができます。 + +## ✨ マルチプラットフォーム + +Casnodeはコンピュータとモバイルアクセスをサポートしています。 フロントエンドUIはPCとモバイルに適応します。 + +## 🔍 内蔵の検索 + +Casnodeは組み込み検索をサポートしており、もちろん、Googleなどのさまざまなエンジンを使用した検索もサポートしています。 + +## 🖼️ 写真と添付ファイルをアップロード + +Casnodeサポートのドラッグ&ドロップで写真や添付ファイルをアップロードできます。 同時に、各アカウントには独自のファイルライブラリとクォータがあります。 ファイルライブラリ内のファイルは、リンクを共有することで共有することもでき、写真や写真を投稿するのに便利です。 Alibaba CloudやTencent CloudなどのさまざまなOSSストレージをサポートしています。 + +## 📢 サイト広告 + +バックグラウンドを介して個別に配信できるサイト広告を設定するためのサポート。 + +## 🎯 サーバーサイドレンダリング + +Casnodeはサーバー側のレンダリングをサポートしており、検索エンジンSEOにフレンドリーです。 + +## :file_caviet_selector: あらゆる種類のデータベース + +Casnode は [xorm](https://github.com/go-xorm/xorm) を使用してデータベースに接続します。 MySQL、sqlite3、mymysql、Postgres for Casnodeを使用できます。 + +## 🌐 複数言語 + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. Casnodeは、中国語、英語、フランス語、ドイツ語、ロシア語、日本語、韓国語に対応しています。 あなたの言語をサポートするためのPRや問題を提起することへようこそ! そしてどんな翻訳の貢献も歓迎します! + +## 🚪 Casdoorを使用してメンバーを管理する + +Casnodeはデータベースにメンバテーブルを保持しません。 Casnodeはユーザーを管理するために [Casdoor](https://github.com/casbin/casdoor) を使用します。 Casdoor は OAuth2.0 ベースの SSO プラットフォームです。 Casdoorを通じて、Casnodeは様々なサードパーティのログイン/登録方法をサポートしています。 たくさんの登録方法、携帯電話、電子メール、QQ、WeChat、GitHub、Facebook、Google、LinkedIn、DingTalk、Gitee、wecom、GitLabがあります。 また、ヒューマンマシン検証用のグラフィック検証コードもサポートしています。 組織管理にCasdoorを使用している場合、メンバーはCasnodeに直接サインインできます。Casnodeに再度サインアップする必要はありません。 より詳細な機能を入手するには、 [Casdoor](https://casdoor.org) をご覧ください。 diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/main-package.md b/i18n/ja/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..4a6136e --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: メインパッケージ +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +Casnodeのバックエンドにはいくつかのパッケージがあります。 The main function and the Beego framework call these packages when the program starts. + +## メイン + +メインパッケージはCasnodeの入り口です。 メインパッケージでいくつかの基本的なセットアップ手順を実行します。 + +* **グローバル変数の設定**: データベースアダプタ, httpクライアント, OSSアダプタ, セグメンター, フォーラムの基本情報(フォーラムのバージョン, オンライン番号, Google Groups Crawlers) + +* **フィルタのセットアップ:** API リクエストフィルタ、検索エンジンボットフィルタ + +* **セッションデータ:** Casnodeは、ユーザー情報を保存するためにBeegoセッションを使用します。 メイン関数では、ファイルベースのセッションを使用するためにこれらの行を書きました。 + +```go +beego.BConfig.WebConfig.Session.Session.SessionProvider = "file" +beego.BConfig.WebConfig.Session.Session.Session.Session.Session.Session.SessionProviderConfig = ".tmp" +beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 365 * 24 * 365 +``` + +Beego で別のセッションアダプタを使用する場合は、 [Beego セッション](https://beego.me/docs/mvc/controller/session.md) を参照してください。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/migration.md b/i18n/ja/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..456bae3 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: DiscuzXからの移行 +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnodeは、ユーザーがDiscuzX 3.xからCasnodeにフォーラムを移行するのに役立つ多くのGoスクリプトを提供しています。 スクリプトの場所は https://github.com/casbin/casnode/tree/master/discuzx + +Xorm対応のデータベース(MySQLなど)は、トピックや返信などのフォーラムデータを保存するためにCansodeによって使用されます。 オブジェクトストレージ(Casdoorストレージプロバイダの形式として)は、Casnodeによって画像や添付ファイルを保存するために使用されます。 + +## 準備 + +移行を行う前に、以下の環境を準備する必要があります。 + +1. クラウド VM (4 つのコアと 8 GB のメモリ、8 つのコアと 16 GB の方が優れています) 高速化のためのデータベースとイントラネット接続に優れています。 この VM は、Go マイグレーションスクリプトを実行するために使用されます。 +2. 上記のVMでGo移行スクリプトを使用したCasnodeのgitリポジトリ(Casnodeインスタンスを実行または停止することができます)。 +3. 実行中のCasdoor インスタンス (同じクラウド VM で高速化) 少なくとも 1 つのオブジェクトストレージは、Casdoor ストレージプロバイダーとして構成されています。 これはDiscuzXの画像と添付ファイルをオブジェクトストレージにアップロードするために使用されます。 +4. DiscuzXインスタンスはオンラインです。 + +## 設定 + +最初に、インストールガイドに基づいてCasdoorとCasnodeを正しく設定し、移行前に正常に動作していることを確認します。 + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +casdoorDbName = casdoor +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbName: あなたのDiscuzXのDB名 +2. discuzxDomain: DiscuzXのパブリックドメイン、末尾のスラッシュ付き +3. discuzxAttachmentBaseUrl: 末尾スラッシュ付きDiscuzXの添付ベースURL(DiscuzXの添付ファイルURLから取得できます) +4. avatarPoolBaseUrl: これを変更しない + +```go +package discuzx + +var dbName = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## 移行 + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +var SyncAvatarsConcurrency = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. ユーザーの移行 + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. ユーザーアバターの移行 + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. フォーラムの移行 + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. スレッドと移行投稿 + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## 完了 + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/overview.md b/i18n/ja/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..96c7508 --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: 概要 +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). 詳細なアーキテクチャ + +| 名前 | 説明 | ツール | ソース コード | +| -------- | ------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Casnode用WebフロントエンドUI | JavaScript と React | https://github.com/casbin/casnode/tree/master/web | +| バックエンド | CasnodeのRESTful APIバックエンド | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin コミュニティは、フォーラムを公式フォーラムとして使用します: [Casnode](https://forum.casbin.com/)。 + +Casnodeはオープンソースで、コードはこちら [](https://github.com/casbin/casnode)から取得できます。 + +Casnodeは使いやすいです。 ユーザーインターフェイスに詳細な説明があるため、通常のユーザーはCasnodeから簡単に開始できます。 このドキュメントはCasnodeを最大限に活用したい管理者向けに用意されています。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/routers.md b/i18n/ja/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..0e3d4ed --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: Routers +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +実際、 `ルータ` はBeegoの組み込みパッケージです。 `routers.init()` はプログラム起動時にフレームワークによって実行されます。 しかし、いくつかのフィルタ関数をパッケージに追加しました。 + +ここでは、 `routers/router.go` について話すつもりはありません。Beego はすでに良いドキュメントを持っています。 ここではフィルターをご紹介します。 + +## ルーター/filter.go + +**TransparentStatic:** 静的なファイルを提供するフィルタです。 リクエストパスが `/api/`で始まらない場合、フィルタは静的ファイルをブラウザーに提供します。 フィルターは `web/build/`で要求されたファイルを見つけ、存在する場合はファイルを提供します。 + +**FreshAccountActiveStatus:** リクエストを送信すると、ユーザーのオンライン状態を更新します。 + +## routers/filter_ssr.go + +検索エンジンのボット用にページをレンダリングするためにChromedpを使用しています。 Chrome がインストールされている場合、このファイルの関数はレンダリングされたページを bots に返します。 + +正規表現 `bot|slurp|bing|croller` を使用して、リクエストの User Agent と一致します。 一致する場合、リクエストはボットによって送信されると考えられます。 \ No newline at end of file diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/ja/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a3c6bfd --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: Server Side Rendering +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode support SSR. SSR(Server-side rendering) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a fully rendered page to the client. + +This allows for dynamic components to be served as static HTML markup.This approach can be useful for search engine optimization (SEO) when indexing does not handle JavaScript properly. It may also be beneficial in situations where downloading a large JavaScript bundle is impaired by a slow network. + +## Implementation + +You can see the implementation of server side rendering in `routers/filter_ssr.go`.We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. diff --git a/i18n/ja/docusaurus-theme-classic/footer.json b/i18n/ja/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/ja/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/ja/docusaurus-theme-classic/navbar.json b/i18n/ja/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/ja/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/ko/code.json b/i18n/ko/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/ko/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/ko/docusaurus-plugin-content-blog/options.json b/i18n/ko/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/ko/docusaurus-plugin-content-blog/welcome.md b/i18n/ko/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..c97b4c2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: Welcome +author: Kininaru +author_title: Casbin Member +author_url: https://github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - welcome +--- + +Welcome to Casnode website! + +You can find technical documents and Casnode APIs here! \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current.json b/i18n/ko/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..1c8cc91 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: API Overview +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +We use the [swagger](https://swagger.io/) to record all of our API, you can see the api docs [here](https://forum.casbin.com/swagger/). \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..993099d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: Overview +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnode is an open source project. An active community is its vitality. + +This chapter is for developers who want to contribute to Casnode. Here you will learn the architecture of Casnode, and how it works. + +## Architecture + +Casnode has 2 parts: the frontend and the backend. + +| Name | Description | Tools | Source code | +| -------- | ------------------------------- | ------------------------------- | ------------------------------------------------- | +| Frontend | Web frontend UI for Casnode | JavaScript + React + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API backend for Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +As we mentioned before, in product environments, the frontend of Casnode is built and served by the backend. In develop environments, the frontend is served by Nodejs. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/ko/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..f9df0f2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## Install Casnode under the Linux BT panel + +### Prepare work +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### Install Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +export GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +go env -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### Configure Casdoor + +#### Run Casdoor + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +cd web +npm install +npm run build +cd .. +sudo nohup ./main & +``` +#### Configure Casnode in Casdoor + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Configure Casnode + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/controllers.md b/i18n/ko/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..c5054cd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: Controllers +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +In `routers/router.go`, you can find lots of lines like + +```go +beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +Please pay attention to the third parameter `"GET:GetTopics"`. This string is a combination of HTTP request method, and the function name of the request handler. You can find a function called `GetTopics` in the package `controllers`, and it is the handler of the request `/api/get-topics`. + +You can find the corresponding function of the request this way. + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/docker.md b/i18n/ko/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..9590b2c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## Install casnode through docker +### Prepare work +#### Install docker and docker-compose +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### Clone casnode & casdoor +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### Configure casdoor + +#### Run casdoor +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### Configure casnode in casdoor +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Configure casnode +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +docker-compose up +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..b20e2f1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: Installation +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +These paragraphs will help you deploy Casnode on your server. If you want to install Casnode by BT Panel or Docker, please see the details at: [BT Panel](./bt-panel.md) and [Docker](./docker.md). + +Please clone Casnode first: +```bash +git clone https://github.com/casbin/casnode +``` +and follow these steps to easily setup your own forum! + +## Production Environment + +### 1. Setup Casdoor + +Casnode uses [Casdoor](https://github.com/casbin/casdoor) to manage members. So you need to create an organization and an application for Casnode in a Casdoor instance. + +Follow these steps to setup Casdoor for Casnode: +- Navigate to Casdoor (Click [here](https://casdoor.org/docs/overview) for details of Casdoor) +- Sign into the organization "built-in" +- Click **Organizations** in the top bar +- Click **add** button +- Remember the Organization name, here I use **casbin-forum** as my organization name: ![organization](/img/installation/organization.png) + +- Click **Applications** in the top bar +- Click **add** button +- Remember the Application name, here I use forum as my application name: +- Click **Edit** + +![application](/img/installation/application.png) + +- Select the organization you just created as the application organization + +![select](/img/installation/chooseorganization.png) +- Modify the redirect URLs to the forum URL. If you are in a developing environment, your redirect URL is **http://localhost:3000/callback**. If you are in a production environment, your redirect URL is **http://yourip:7000/callback** + +![redirecturls](/img/installation/redirecturls.png) +- Click **Save** and remember the `Client ID` and `Client Secret` + +![client](/img/installation/client.png) + +### 2. Modify `conf/app.conf` + +Here is an explanation of the config items: + +#### Database connection: + +#### Casnode database + +```ini {2} +driverName = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. Modify `web/src/Conf.js` + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. Build front end + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. Build back end +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## Dev Environment + +### 1. Do step 1-3 above + +### 4. Run back end + +```go +go run main.go +``` +### 5. Run front end + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/ko/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..f7b7ed8 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: Internationalization +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Casnode supports multi-languages, by deploying the translations to Crowdin, we support Chinese, French, German, Russian, Japanese and Korean. + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/intro.md b/i18n/ko/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..100df23 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: Overview +--- + +Casnode is a forum developed by [Casbin community](https://casbin.org/). The detailed architecture: + +| Name | Description | Tools | Source code | +| -------- | ------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Web frontend UI for Casnode | JavaScript and React | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API backend for Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin community uses the forum as the official forum: [Casnode](https://forum.casbin.com/). + +Casnode is open source, you can get the code [here](https://github.com/casbin/casnode). + +Casnode is easy to use. It has detailed description in user interfaces so normal users can easily get start with Casnode. This document is prepared for administrators who want to get full use of Casnode. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/main-features.md b/i18n/ko/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..fb62cbe --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: Main Features +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +There special features distinguish Casnode from other forums. Here is a short introduction of these features. Read forward for more details. + +## 📧 Mailing list + +Casnode supports Google Groups well. By integrate [google-group-crawler](https://github.com/casbin/google-groups-crawler), after setting up a Google Group config in Casnode, a two-way synchronization will be started. For now, Casnode can only sync conversations from Google Groups, but can push conversations to any other mailing lists. + +## ✨ Multi-platform + +Casnode supports computer and mobile access. Frontend UI adapts to PC and mobile. + +## 🔍 Built-in search + +Casnode support built-in search, of course, also support search using various engines such as Google. + +## 🖼️ Upload pictures and attachments + +Casnode support drag and drop to upload pictures and attachments. At the same time, each account has its own file library and quota. Files in the file library can also be shared using sharing links, making it more convenient to post pictures and pictures. Supports various OSS storages such as Alibaba Cloud and Tencent Cloud. + +## 📢 Site advertisement + +Support for setting up site advertisements, which can be delivered independently through the background. + +## 🎯 Server side rendering + +Casnode support server side rendering, friendly to search engine SEO. + +## 🗄️ All kinds of databases + +Casnode uses [xorm](https://github.com/go-xorm/xorm) to connect to databases. You can use MySQL, sqlite3, mymysql and Postgres for Casnode. + +## 🌐 Multi-languages + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. Now Casnode supports Chinese, English, French, German, Russian, Japanese and Korean. Welcome to make a PR or file an issue to support your language! And any translation contribution is welcomed! + +## 🚪 Use Casdoor to manage members + +Casnode does not maintain a member table in the database. Casnode uses [Casdoor](https://github.com/casbin/casdoor) to manage users. Casdoor is an SSO platform based on OAuth2.0. Through Casdoor, Casnode supports a variety of third-party login/registration methods. There are many registration methods, mobile phone, email, QQ, WeChat, GitHub, Facebook, Google, LinkedIn, DingTalk, Gitee, wecom and GitLab. It also supports graphic verification codes for Human-machine verification. If you use Casdoor for your organization management, your members can sign into Casnode directly, no need to signing up for Casnode again. To obtain more detailed features, please go to [Casdoor](https://casdoor.org). diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/main-package.md b/i18n/ko/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..a458a83 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: Main package +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +There are several packages in the backend of Casnode. The main function and the Beego framework call these packages when the program starts. + +## main + +The main package is the entrance of Casnode. We do some basic setup steps in the main package: + +* **Setup some global variables**: Database adapter, http Client, OSS adapter, Segmenter and Forum basic info (forum version, online number, Google Groups Crawlers) + +* **Setup filters:** API requests filter, search engine bot filter + +* **Session data:** Casnode uses Beego session to store user info. In the main function, wrote these lines to use a file based session: + +```go +beego.BConfig.WebConfig.Session.SessionProvider = "file" +beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp" +beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 365 +``` + +Please refer to [Beego session](https://beego.me/docs/mvc/controller/session.md) if you want to use another session adapter in Beego. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/migration.md b/i18n/ko/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..fd308f2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: Migration from DiscuzX +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnode has provided a lot of Go scripts to help users migrate their forums from DiscuzX 3.x to Casnode. The scripts are located at: https://github.com/casbin/casnode/tree/master/discuzx + +A Xorm-supported database (e.g., MySQL) is used by Cansode to store forum data like topics and replies. Object storage (as the form of Casdoor storage provider) is used by Casnode to store images and attachment files. + +## Preparation + +You need to prepare the following environments before conducting the migration: + +1. A cloud VM (better with above 4 cores and 8GB memory, 8 cores and 16GB is even better), better with Intranet connection with the database for higher speed. This VM is used to run the Go migration scripts. +2. A Casnode git repository with the Go migration scripts in the above VM (the Casnode instance can be running or stopped). +3. A running Casdoor instance (better in the same cloud VM for higher speed), with at least one object storage is configured as a Casdoor storage provider. This is used for uploading the images and attachment files of DiscuzX to the object storage. +4. Your DiscuzX instance is online. + +## Configuration + +First configure the Casdoor and Casnode correctly based on the their installation guides, make sure they are working normally before migration. + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +casdoorDbName = casdoor +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbName: your DiscuzX's DB name +2. discuzxDomain: your DiscuzX's public domain, with trailing slash +3. discuzxAttachmentBaseUrl: your DiscuzX's attachment base URL, with trailing slash (you can get it from a attachment file URL of your DiscuzX) +4. avatarPoolBaseUrl: don't change this + +```go +package discuzx + +var dbName = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## Migration + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +var SyncAvatarsConcurrency = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. User migration + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. User avatar migration + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. Forum migration + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. Thread and post migration + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## Finalization + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..62390a7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: Overview +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). The detailed architecture: + +| Name | Description | Tools | Source code | +| -------- | ------------------------------- | ----------------------------- | ------------------------------------------------- | +| Frontend | Web frontend UI for Casnode | JavaScript and React | https://github.com/casbin/casnode/tree/master/web | +| Backend | RESTful API backend for Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin community uses the forum as the official forum: [Casnode](https://forum.casbin.com/). + +Casnode is open source, you can get the code [here](https://github.com/casbin/casnode). + +Casnode is easy to use. It has detailed description in user interfaces so normal users can easily get start with Casnode. This document is prepared for administrators who want to get full use of Casnode. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/routers.md b/i18n/ko/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..ac5e67e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: Routers +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +Actually, `routers` is a built-in package of Beego. `routers.init()` is run by the framework when program starts. However, we added some filter functions to the package. + +We are not going to talk about the `routers/router.go` here, Beego has already had a good document for it. We are going to introduce our filters here. + +## routers/filter.go + +**TransparentStatic:** This filter is to serve static files. If a request path is not starts with `/api/`, then the filter will serve a static file to the browser. The filter will find the requested file in `web/build/`, and serve the file if exist. + +**FreshAccountActiveStatus:** Update users' online states when they send a request. + +## routers/filter_ssr.go + +We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/ko/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a3c6bfd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: Server Side Rendering +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode support SSR. SSR(Server-side rendering) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a fully rendered page to the client. + +This allows for dynamic components to be served as static HTML markup.This approach can be useful for search engine optimization (SEO) when indexing does not handle JavaScript properly. It may also be beneficial in situations where downloading a large JavaScript bundle is impaired by a slow network. + +## Implementation + +You can see the implementation of server side rendering in `routers/filter_ssr.go`.We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. diff --git a/i18n/ko/docusaurus-theme-classic/footer.json b/i18n/ko/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/ko/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/ko/docusaurus-theme-classic/navbar.json b/i18n/ko/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/ko/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/ru/code.json b/i18n/ru/code.json new file mode 100644 index 0000000..8c2dbcf --- /dev/null +++ b/i18n/ru/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "Need help?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "If you need help with Casnode, you can try one of the mechanisms below." + }, + "Forum": { + "message": "Forum" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "Discuss with maintainers or share your experience about Casnode on" + }, + "Casnode Forum": { + "message": "Casnode Forum" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "You can join the conversation on" + }, + "for contributing help.": { + "message": "for contributing help." + }, + "Tencent QQ": { + "message": "Tencent QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "You can contact us by joining the QQ group:" + }, + "At our": { + "message": "At our" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ", browse and submit" + }, + "or": { + "message": "or" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "for bugs you find or any new features you may want implemented." + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "Get Started" + }, + "Online Demo": { + "message": "Online Demo" + }, + "Casnode is a forum developed by": { + "message": "Casnode is a forum developed by" + }, + "Casbin community": { + "message": "Casbin community" + }, + "with a modern interface.": { + "message": "with a modern interface." + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "With supporting many third-party application login, you can choose your favorite social network to login." + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "With supporting for many languages, you can choose your language to access Casnode without barrier" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "Easy to Use" + }, + "Only few steps to setup Casnode!": { + "message": "Only few steps to setup Casnode!" + }, + "All kinds of DB and OSS": { + "message": "All kinds of DB and OSS" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!" + }, + "Multi-Language Support": { + "message": "Multi-Language Support" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/ru/docusaurus-plugin-content-blog/options.json b/i18n/ru/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..9239ff7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/ru/docusaurus-plugin-content-blog/welcome.md b/i18n/ru/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..2e5b841 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: Добро пожаловать +author: Kininaru +author_title: Участник Касбина +author_url: https://github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - приветствие +--- + +Добро пожаловать на сайт Casnode ! + +Технические документы и Casnode API находятся здесь! \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current.json b/i18n/ru/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..d55f05d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API reference", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..3fecd2d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: Обзор API +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +Мы используем [swagger](https://swagger.io/) для записи всех наших API, вы можете увидеть api документацию [здесь](https://forum.casbin.com/swagger/). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..4291eb6 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: Общий обзор +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnode - проект с открытым исходным кодом. Активное сообщество - это его жизнеспособность. + +Эта глава предназначена для разработчиков, которые хотят внести свой вклад в Casnode. Здесь вы узнаете архитектуру Casnode, и как это работает. + +## Архитектура + +Casnode состоит из 2 частей: фронтенд и бэкэнд. + +| Наименование | Описание | Инструменты | Исходный код | +| ------------ | ------------------------------------ | ------------------------------- | ------------------------------------------------- | +| Интерфейс | Интерфейс веб-интерфейса для Casnode | JavaScript + React + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| Бэкенд | Бэкенд ReSTful API для Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +Как мы уже отмечали ранее, в среде продуктов, фронтенд Casnode построен и обслуживается бэкэндом. В разработке сред интерфейс обслуживает Nodejs. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/ru/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..91cae2f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## Установите Casnode под панель Linux BT + +### Подготовка к работе +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### Install Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +экспорт GOROOT=/usr/local/go +экспорт PATH=$PATH:$GOROOT/bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +go ruv -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### Настроить Casdoor + +#### Запустить кастрюль + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +cd web +npm install +npm запустить build +cd .. +sudo nohup ./main & +``` +#### Настроить Casnode в Casdoor + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Настроить Casnode + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/controllers.md b/i18n/ru/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..daf7ba7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: Контроллеры +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +В `маршрутизатора/маршрутизатора`, вы можете найти много строк, как + +```go +beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +Обратите внимание на третий параметр `"GET:GetTopics"`. Эта строка представляет собой комбинацию метода HTTP-запроса и имени функции обработчика запроса. Вы можете найти функцию под названием `GetTopics` в пакете `контроллеров`, и это обработчик запроса `/api/get-topics`. + +Вы можете найти соответствующую функцию запроса таким образом. + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/docker.md b/i18n/ru/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..7c6cbf7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## Установка через докер +### Подготовка к работе +#### Установить docker и docker-compose +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### Клонировать & кастрюль +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoor.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### Настройка кастрюли + +#### Запустить шасси +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### Настроить канон в корпусе +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### Настроить casnode +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +создать докер вверх +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/ru/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..f305319 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: Установка +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +Эти параграфы помогут вам развернуть Casnode на вашем сервере. Если вы хотите установить Casnode с помощью панели BT или Docker, пожалуйста, ознакомьтесь с подробностями на сайте: [BT Panel](./bt-panel.md) и [Docker](./docker.md). + +Сначала клонируйте кастронд: +```bash +git clone https://github.com/casbin/casnode +``` +и выполните эти шаги, чтобы легко настроить свой собственный форум! + +## Производственная среда + +### 1. Настроить корпус + +Кашузел использует [Casdoor](https://github.com/casbin/casdoor) для управления членами. Поэтому вам нужно создать организацию и приложение для Casnode в экземпляре Касдвери. + +Выполните следующие шаги для настройки кассена для Casnode: +- Перейдите в Касдорф (нажмите [здесь](https://casdoor.org/docs/overview) для деталей Касдор) +- Войдите в организацию "Встроенная" +- Нажмите **организаций** в верхней панели +- Нажмите кнопку **добавить** +- Запомнить название организации, здесь я использую **casbin-forum** в качестве имени моей организации: ![организация](/img/installation/organization.png) + +- Нажмите **Приложения** в верхней панели +- Нажмите кнопку **добавить** +- Запомнить имя приложения, здесь я использую форум в качестве моего имени приложения: +- Нажмите **Изменить** + +![приложение](/img/installation/application.png) + +- Выберите организацию, которую вы только что создали в качестве организации приложения + +![выбрать](/img/installation/chooseorganization.png) +- Изменить URL перенаправления по URL форума. Если вы находитесь в развивающейся среде, ваш URL перенаправления - **http://localhost:3000/callback**. Если вы находитесь в рабочей среде, то URL-адрес перенаправления будет **http://yourip:7000/callback** + +![редиректы](/img/installation/redirecturls.png) +- Нажмите **Сохранить** и запомните `ID клиента` и `ключ клиента` + +![клиент](/img/installation/client.png) + +### 2. Изменить `conf/app.conf` + +Вот объяснение элементов конфигурации: + +#### Database connection: + +#### Casnode database + +```ini {2} +Имя водителя = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. Изменить `web/src/Conf.js` + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. Построить фронт + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. Собрать конец +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## Окружение Dev + +### 1. Сделайте шаг 1-3 выше + +### 4. Вернуться к концу + +```go +go run main.go +``` +### 5. Запустить конец фронта + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/ru/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..a988b1c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: Интернационализация +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Кастоун поддерживает многоязычные переводы путем развертывания переводов в Crowdin, мы поддерживаем китайский, французский, немецкий, русский, японский и корейский. + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/intro.md b/i18n/ru/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..1cd4862 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: Общий обзор +--- + +Casnode - это форум разработанный [сообществом Casbin](https://casbin.org/). Подробная архитектура: + +| Наименование | Описание | Инструменты | Исходный код | +| ------------ | ------------------------------------ | ----------------------------- | ------------------------------------------------- | +| Интерфейс | Интерфейс веб-интерфейса для Casnode | JavaScript и React | https://github.com/casbin/casnode/tree/master/web | +| Бэкенд | Бэкенд ReSTful API для Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Сообщество Casbin использует форум в качестве официального форума: [Casnode](https://forum.casbin.com/). + +Casnode является открытым исходным кодом, вы можете получить код [здесь](https://github.com/casbin/casnode). + +Кастрол прост в использовании. Он имеет подробное описание в пользовательских интерфейсах, так что обычные пользователи могут легко начать с Casnode. Этот документ подготовлен для администраторов, которые хотят в полной мере использовать Casnode. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/main-features.md b/i18n/ru/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..e557f60 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: Основные функции +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +Существуют особые возможности, отличающие Casnode от других форумов. Вот краткое описание этих функций. Читайте дальше для более подробной информации. + +## 📧 список рассылки + +Кашузел хорошо поддерживает Google Groups После интеграции [google-group-crawler](https://github.com/casbin/google-groups-crawler), после настройки Google Group конфигурации в Casnode, будет запущена двусторонняя синхронизация. Пока что Casnode может синхронизировать разговоры только из групп Google, но может отправлять разговоры в любой другой список рассылки. + +## ✨ Мультиплатформенная + +Кастрон поддерживает компьютер и мобильный доступ. Интерфейс пользовательского интерфейса адаптируется к ПК и мобильным. + +## 🔍 Встроенный поиск + +Поддержка Casnode встроенного поиска, конечно, также поддерживает поиск, используя различные системы, такие как Google. + +## 🖼️ Загрузка изображений и вложений + +Поддержка Casnode перетаскивание для загрузки фотографий и вложений. В то же время каждый аккаунт имеет свою собственную библиотеку файлов и квоты. Также можно обмениваться файлами в библиотеке файлов по ссылкам, что делает их более удобными для размещения фотографий и изображений. Поддерживает различные хранилища OSS, такие как облако Alibaba и Облако Tencent. + +## 📢 Реклама сайта + +Поддержка создания объявлений на сайте, которые могут быть доставлены независимо через задний план. + +## 🎯 рендеринг стороны сервера + +Поддержка сервера Casnode отображения, дружественный к SEO поисковой системе. + +## 🗄️ Все виды баз данных + +Каузел использует [xorm](https://github.com/go-xorm/xorm) для подключения к базам данных. Вы можете использовать MySQL, sqlite3, mymysql и Postgres для Casnode. + +## 🌐 Многоязычные + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. Теперь Кастрон поддерживает китайский, английский, французский, немецкий, русский, японский и корейский. Добро пожаловать на создание PR или файла проблемы для поддержки вашего языка! И всякий вклад в перевод приветствуется! + +## 🚪 Используйте кастрюль для управления членами + +Casnode не поддерживает таблицу членов в базе данных. Кашузел использует [Casdoor](https://github.com/casbin/casdoor) для управления пользователями. Casdoor это SSO платформа на основе OAuth2.0. Через Casdoor, Casnode поддерживает различные методы авторизации/регистрации третьих лиц. Существует множество методов регистрации, мобильный телефон, электронная почта, QQ, WeChat, GitHub, Facebook, Google, LinkedIn, DingTalk, Gitee, wecom и GitLab. Он также поддерживает графические проверочные коды для проверки Человеческой машины. Если вы используете Casdoor для управления вашей организацией, ваши члены могут войти в Casnode напрямую, не нужно регистрироваться в Casnode снова. Для получения более детальной информации перейдите по ссылке [Casdoor](https://casdoor.org). diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/main-package.md b/i18n/ru/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..3561446 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: Основной пакет +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +В бекенде Casnode есть несколько пакетов. The main function and the Beego framework call these packages when the program starts. + +## основная + +Основным пакетом является вход в Casnode. Мы делаем некоторые основные шаги настройки в основном пакете: + +* **Настройка глобальных переменных**: адаптер баз данных, http клиент, OSS адаптер, Segmenter и основная информация форума (версия форума, онлайновый номер, Google Groups Crawlers) + +* **Фильтры установки:** Фильтр API, фильтр ботов поисковых систем + +* **Данные сессии:** Casnode использует Beego сессию для хранения информации о пользователе. В основной функции написал эти строки, чтобы использовать сеанс на основе файла: + +```go +beego.BConfig.WebConfig.Session.SessionProvider = "file" +beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp" +beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 365 +``` + +Пожалуйста, обратитесь к [Beego session](https://beego.me/docs/mvc/controller/session.md) , если вы хотите использовать другой сессионный адаптер в Beego. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/migration.md b/i18n/ru/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..dac7245 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: Миграция с DiscuzX +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnode предоставил множество скриптов Go, чтобы помочь пользователям перенести их форумы с DiscuzX 3.x на Casnode. Скрипты находятся в: https://github.com/casbin/casnode/tree/master/discuzx + +База данных, поддерживаемая Xorm-ом (например, MySQL), используется Cansode для хранения данных форума, таких как темы и ответы. Хранилище объектов (в виде провайдера хранения кастрюля) используется Casnode для хранения изображений и вложенных файлов. + +## Подготовка + +Перед миграцией необходимо подготовить следующие окружения: + +1. Облачный VM (лучше с 4 ядрами и 8GB памяти, 8 ядрами и 16ГБ еще лучше), лучше при подключении к Intranet с базой данных для более высокой скорости. Этот ВМ используется для запуска сценариев миграции Го. +2. Репозиторий Casnode git со скриптами миграции Go в вышеприведенном VM (экземпляр Casnode может быть запущен или остановлен). +3. Заработающий экземпляр каштана (лучше в том же облаке VM для более высокой скорости), с хотя бы одним хранилищем объектов сконфигурировано как провайдер хранения кассет. Используется для загрузки изображений и вложенных файлов DiscuzX в хранилище объектов. +4. Экземпляр DiscuzX находится в сети. + +## Конфигурация + +Сначала настройте корпус и кастро правильно основываясь на руководствах по установке, убедитесь, что они работают нормально перед миграцией. + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +casdoorDbName = люк +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbName: название базы данных DiscuzX +2. discuzxDomain: публичный домен DiscuzX с конечной косой чертой +3. discuzxAttachmentBaseUrl: URL базы вложений DiscuzX с замыкающей косой чертой (вы можете получить его из URL-адреса вложенного файла DiscuzX) +4. avatarPoolBaseUrl: не изменяйте это + +```go +пакет discuzx + +var dbName = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## Миграция + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +SyncAvatarsConcurrency = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. Перенос пользователей + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. Перенос аватара пользователя + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. Перенос форума + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. Миграция темы и постов + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## Завершение + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..d37e1ed --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: Общий обзор +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). Подробная архитектура: + +| Наименование | Описание | Инструменты | Исходный код | +| ------------ | ------------------------------------ | ----------------------------- | ------------------------------------------------- | +| Интерфейс | Интерфейс веб-интерфейса для Casnode | JavaScript и React | https://github.com/casbin/casnode/tree/master/web | +| Бэкенд | Бэкенд ReSTful API для Casnode | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Сообщество Casbin использует форум в качестве официального форума: [Casnode](https://forum.casbin.com/). + +Casnode является открытым исходным кодом, вы можете получить код [здесь](https://github.com/casbin/casnode). + +Кастрол прост в использовании. Он имеет подробное описание в пользовательских интерфейсах, так что обычные пользователи могут легко начать с Casnode. Этот документ подготовлен для администраторов, которые хотят в полной мере использовать Casnode. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/routers.md b/i18n/ru/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..4522b85 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: Маршрутизаторы +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +Собственно, `маршрутизаторов` является встроенным пакетом Beego. `routers.init()` запускается фреймворком при запуске программы. Тем не менее, мы добавили в пакет функции фильтра. + +We are not going to talk about the `routers/router.go` here, Beego has already had a good document for it. Здесь мы представим наши фильтры. + +## routers/filter.go + +**TransparentStatic:** Этот фильтр предназначен для обработки статических файлов. Если путь к запросу не начинается с `/api/`, то фильтр будет служить статическим файлом браузера. Фильтр найдет запрошенный файл в `web/build/`, и покажет файл, если существует. + +**FreshAccountActiveStatus:** Обновлять состояния пользователей при отправке запроса. + +## routers/filter_ssr.go + +Мы используем Chromedp для отрисовки страниц для поисковых роботов. Если Chrome установлен, функции в этом файле возвращают отображаемую страницу ботам. + +Мы используем регулярное выражение `бота|slurp|bing|crawler` для соответствия User Agent запроса. В случае совпадения, мы считаем, что запрос отправляется ботом. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/ru/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a3c6bfd --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: Server Side Rendering +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode support SSR. SSR(Server-side rendering) is a popular technique for rendering a client-side single page application (SPA) on the server and then sending a fully rendered page to the client. + +This allows for dynamic components to be served as static HTML markup.This approach can be useful for search engine optimization (SEO) when indexing does not handle JavaScript properly. It may also be beneficial in situations where downloading a large JavaScript bundle is impaired by a slow network. + +## Implementation + +You can see the implementation of server side rendering in `routers/filter_ssr.go`.We use Chromedp to render pages for search engine bots. If Chrome is installed, functions in this file will return a rendered page to bots. + +We use a Regular expression `bot|slurp|bing|crawler` to match the User Agent of the request. If matched, we think the request is sent by a bot. diff --git a/i18n/ru/docusaurus-theme-classic/footer.json b/i18n/ru/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..38d3944 --- /dev/null +++ b/i18n/ru/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "Overview", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "Get Started", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ Group", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/ru/docusaurus-theme-classic/navbar.json b/i18n/ru/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..2355cb9 --- /dev/null +++ b/i18n/ru/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "Help", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/i18n/zh/code.json b/i18n/zh/code.json new file mode 100644 index 0000000..92f7d65 --- /dev/null +++ b/i18n/zh/code.json @@ -0,0 +1,512 @@ +{ + "Need help?": { + "message": "需要帮助吗?" + }, + "If you need help with Casnode, you can try one of the mechanisms below.": { + "message": "如果您需要Casnode帮助,您可以尝试下面的一个机制。" + }, + "Forum": { + "message": "论坛设置" + }, + "Discuss with maintainers or share your experience about Casnode on": { + "message": "与维护者讨论或分享您在 Casnode 上的经验" + }, + "Casnode Forum": { + "message": "Casnode论坛" + }, + "Discord": { + "message": "Discord" + }, + "You can join the conversation on": { + "message": "您可以加入对话于" + }, + "for contributing help.": { + "message": "提供帮助。" + }, + "Tencent QQ": { + "message": "腾讯QQ" + }, + "You can contact us by joining the QQ group:": { + "message": "您可以通过加入QQ 群联系我们:" + }, + "At our": { + "message": "在我们" + }, + "GitHub repo": { + "message": "GitHub repo" + }, + ", browse and submit": { + "message": ",浏览和提交" + }, + "or": { + "message": "或" + }, + "for bugs you find or any new features you may want implemented.": { + "message": "对于你发现的bug或你想要实现的任何新功能。" + }, + "Casnode": { + "message": "Casnode" + }, + "A beautiful and simple next-generation forum software based on Go and React": { + "message": "A beautiful and simple next-generation forum software based on Go and React" + }, + "Get Started": { + "message": "开始" + }, + "Online Demo": { + "message": "在线演示" + }, + "Casnode is a forum developed by": { + "message": "Casnode 是一个论坛由" + }, + "Casbin community": { + "message": "卡斯宾社区" + }, + "with a modern interface.": { + "message": "使用现代接口。" + }, + "With supporting many third-party application login, you can choose your favorite social network to login.": { + "message": "在支持许多第三方应用程序登录的情况下,您可以选择您最喜欢的社交网络登录。" + }, + "With supporting for many languages, you can choose your language to access Casnode without barrier": { + "message": "在支持多种语言的情况下,您可以选择您的语言来无障碍访问 Casnode" + }, + "PDF download": { + "message": "PDF download" + }, + "We provide you with pdf for offline reading": { + "message": "We provide you with pdf for offline reading" + }, + "English": { + "message": "English" + }, + "Chinese": { + "message": "Chinese" + }, + "Easy to Use": { + "message": "简单易用" + }, + "Only few steps to setup Casnode!": { + "message": "只需几步即可配置好Casnode!" + }, + "All kinds of DB and OSS": { + "message": "所有类型的数据库和开放源码软件" + }, + "Casnode supports many kinds of Databases and OSS provider. And you can add your own providers easily!": { + "message": "Casnode 支持多种数据库和开放源码软件提供商。您可以轻松地添加自己的提供商!" + }, + "Multi-Language Support": { + "message": "多语言支持" + }, + "Now, Casnode supports Chinese and English UI. We use i18n to support multi-lang, so you can make a PR or an issue to support your language!": { + "message": "现在,Casnode 支持中文和英文UI。 我们使用 i18n 支持多语言,所以你可以制作一个 PR 或一个问题来支持你的语言!" + }, + "Created by": { + "message": "Created by" + }, + "Modified by": { + "message": "Modified by" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "找不到页面", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "我们找不到你想要的东西。", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "请联系链接到原始URL的站点所有者并让他们知道他们的链接已经损坏。", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "回滚到顶部", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "存档", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "存档", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "博客列表页面导航", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "更新的条目", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "较早的条目", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "博客文章页面导航", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "更新的帖子", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "较早的帖子", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "一个帖子 |{count}", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} 已标记为 \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "查看所有标签", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "上一个", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "下一页", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "已标记一个doc |{count} 个文档已标记", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} 与 \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel} 版本的未发布文档。", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel}的文档,不再活跃。", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "关于最新文档,请参阅 {latestVersionLink} ({versionLabel})。", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "最新版本", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "编辑此页面", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " 在 {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " 由 {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "上次更新{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "版本", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "标签:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "关闭", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "博客最近帖子导航", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "已复制", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "复制代码到剪贴板", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "复制", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "在本页", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "阅读更多", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "一分钟读取|{readingTime} 分钟", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "折叠侧边栏", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "折叠侧边栏", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "format@@0 返回主菜单", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "找到一个文档 |{count} 文档", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "搜索结果 \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "搜索文档", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "在此输入您的搜索", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "搜索", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "按Algolia搜索", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "没有找到结果", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "正在获取新结果...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "搜索", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "跳转到主要内容", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/zh/docusaurus-plugin-content-blog/options.json b/i18n/zh/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000..c60995e --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "博客", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "博客", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "最近的帖子", + "description": "The label for the left sidebar" + } +} diff --git a/i18n/zh/docusaurus-plugin-content-blog/welcome.md b/i18n/zh/docusaurus-plugin-content-blog/welcome.md new file mode 100644 index 0000000..a451305 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-blog/welcome.md @@ -0,0 +1,15 @@ +--- +slug: /welcome +title: 欢迎使用 +author: Kininaru +author_title: Casbin成员 +author_url: https://github.com/Kininaru +author_image_url: https://avatars.githubusercontent.com/u/42638489?v=4 +tags: + - casnode + - 欢迎 +--- + +欢迎使用 Casnode 网站 ! + +您可以在这里找到技术文档和 Casnode API! \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..ddab26a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,22 @@ +{ + "version.label": { + "message": "下一页", + "description": "The label for version current" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "正在开始", + "description": "The label for category Getting Started in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.API reference": { + "message": "API 参考", + "description": "The label for category API reference in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Architecture": { + "message": "结构", + "description": "The label for category Architecture in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.link.PDF Download": { + "message": "PDF Download", + "description": "The label for link PDF Download in sidebar tutorialSidebar, linking to /pdf" + } +} diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api-overview.md new file mode 100644 index 0000000..8d20ded --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api-overview.md @@ -0,0 +1,10 @@ +--- +title: API 概述 +description: Casnode API +keywords: + - API +authors: + - kininaru +--- + +我们使用 [swagger](https://swagger.io/) 来记录我们所有的 API,您可以在这里看到api docs [](https://forum.casbin.com/swagger/)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/architecture-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/architecture-overview.md new file mode 100644 index 0000000..c1131c3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/architecture-overview.md @@ -0,0 +1,23 @@ +--- +title: 概览 +description: Casnode's architecture +keywords: + - architecture +authors: + - kininaru +--- + +Casnode 是一个开源项目。 一个活跃的社区就是它的活力。 + +本章针对的是想要为Casnode做出贡献的开发人员。 您将在这里学习种子节点的结构以及它如何运作。 + +## 结构 + +Casnode 有两个部分:前端和后端。 + +| 名称 | 描述 | 实用小工具 | 源代码 | +| -- | ---------------------- | ------------------------------- | ------------------------------------------------- | +| 前端 | Casnode Web 前端界面 | JavaScript + React + Ant-Design | https://github.com/casbin/casnode/tree/master/web | +| 后端 | Casnode RESTful API 后端 | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode | + +正如我们前面提到的,在产品环境中,卡斯诺节点的前端是由后端构建和服务的。 在发展环境中,诺代日人为前端服务。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/bt-panel.md b/i18n/zh/docusaurus-plugin-content-docs/current/bt-panel.md new file mode 100644 index 0000000..2b952c3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/bt-panel.md @@ -0,0 +1,116 @@ +- - - +title: BT panel description: Install Casnode under the Linux BT panel keywords: [bt panel] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.04 + +::: + +## 在 Linux BT 面板下安装 Casnode + +### 准备工作 +After installing the BT panel, the browser visits the BT panel, selects the software store, searches for and installs MySQL, and then searches for node, you can see that there is a PM2 manager, install the PM2 manager. + +After the installation is complete, disconnect from the server or restart the server, node will be automatically written into the environment variable. + +Enter `git --version` to make sure git is , if the prompts Command `git` not found, use `apt-get install git` to install git. + +:::tip + +To access the Casnode successfully, you need to open the **7001** and **8000** port. + +::: + +#### 安装 Golang + +The root user executes the following commands to download and decompress the Go binary file to the **/usr/local** directory. +```shell +wget -c https://dl.google.com/go/go.16.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` +Then we need to add Golang to the environment variables, edit `/etc/profile`, add the following code in the last line of the file. + +```shell +导出 GOROOT=/usr/local/go +导出 PATH=$PATH:$GOROOT/ bin +``` + +Then use command `source /etc/profile` to make the newly added environment variables work. + +Now, enter `go version`, you will see the go version, and we installed it successfully. If you can’t connect to GitHub, you can set up the mirror. The command is +```go +go env -w GOPROXY=https://goproxy.cn,direct +``` +#### Git clone Casnode & Casdoor + +Next, execute the following commands in the folder where you want to store the project. +```shell +git clone https://github.com/casbin/casdoog.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see there are two folders, Casnode and Casdoor. + +### 配置 Cassdoor + +#### 运行Casdoor + +We first configure Casdoor. +```go +cd casdoor +go build main.go +``` +Then edit `conf/app.conf`, find +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel as **123**. +```shell +cd web +npm install +npm building +cd ... +sudo nohup ./main & +``` +#### 配置 Casdoor 中的 Casnode + +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum. Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to http://your-ip:7000/callback.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### 配置 Casnode + +Next we configure in Casnode. + +```shell +cd casnode +go build main.go +``` + +Edit `conf/app.conf`, find + +``` +dataSourceName = root:123@tcp(localhost:3306)/ +``` + +Change MySQL password provided by the BT panel to **123**, then find casdoorEndpoint, modify it to http://your-ip:8000 (Casdoor backend address), find **ClientId** and **ClientSecret**, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to your set. Save and exit. + +Edit `web/src/Conf.js`, modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `ClientId` to the ClientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. +```shell +npm install +npm run build +cd .. +nohup ./main & +``` +Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +For more settings please see [Casnode.](https://casnode.org/docs) + diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/controllers.md b/i18n/zh/docusaurus-plugin-content-docs/current/controllers.md new file mode 100644 index 0000000..52529e6 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/controllers.md @@ -0,0 +1,26 @@ +--- +title: 控制器 +description: Use controllers to handle requests +keywords: + - handler + - controllers + - request +authors: + - kininaru +--- + +在 `路由器/路由器`中,您可以找到很多行像是 + +```go +Beego.Router("/api/get-topics", &controllers.ApiController{}, "GET:GetTopics") +``` + +请注意第三个参数 `"GET:GetTopics"`。 此字符串是HTTP 请求方法和请求处理器的函数名称的组合。 您可以在软件包 `控制器`中找到一个名为 `GetTopics` 的函数。 并且它是请求的处理程序 `/api/get-topics` + +您可以通过这种方式找到请求的相应函数。 + +:::tip + +If you are using **Goland**, you can press `Ctrl+Shift+F`(vscode use `Ctrl+F` instead), and search `func (c *ApiController) FunctionName` to locate to the function quickly. + +::: \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/docker.md b/i18n/zh/docusaurus-plugin-content-docs/current/docker.md new file mode 100644 index 0000000..8e78d72 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/docker.md @@ -0,0 +1,70 @@ +- - - +title: Docker description: Install casnode through docker keywords: [docker] authors: [oranges-eating] +- - - + +:::caution + +The tutorial environment is Ubuntu 20.0.4 . + +::: + +## 通过 docker 安装 casnode +### 准备工作 +#### 安装 docker 和 docker-compose +Install Docker and Docker-compose, you see [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) + +#### Clone casnode & casdoor +Next, clone Casdoor and Casndoe from GitHub. +```shell +git clone https://github.com/casbin/casdoog.git +git clone https://github.com/casbin/casnode.git +``` +Now, you can see two folders, `casnode` and `casdoor`. + +### 配置casdoor + +#### 运行casdoor +We first configure casdoor. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/ to dataSourceName = root:123@tcp(db:3306)/** +```shell +docker-compose up +``` + +:::tip + +mysql and casdoor are in different docker containers. + +::: + +#### 在腰果中配置 casnode +Now that Casdoor has been configured, visit http://your-ip:8000 to configure Casnode. + +The default administrator login account is `admin/123`. + +Click Organization, then click Add, click Edit for the added organization, and change the name to the organization name you want. Here I set it to casbin-forum, and then click Save. + +Click Applications, then click Add, for the application you just added, click Edit, change the name to the application name you want, I changed it to app-casbin-forum.Click on the organization, select the organization you just added, my organization is casbin- forum. Click Redirect URLs, modify the link in the box to `http://your-ip:7000/callback`.Finally, remember the Client ID and Client Secret, and click Save. + +Click Users, click Add, then click Edit, modify the added user, click Organization, select casbin-forum, and click is admin. Finally click Save, now your organization has an administrator account. +
+ +### 配置种子节点 +Next we configure in Casnode. + +Edit `conf/app.conf`, modify **dataSourceName = root:123@tcp(localhost:3306)/** to **dataSourceName = root:123@tcp(db:3306)/** so that the data come from your database. + +Then find `casdoorEndpoint`, modify it to `http://your-ip:8000` (Casdoor backend address), find `clientId` and `clientSecret`, and modify them to the previously remembered Application client id and client secret, find casdoorOrganization, modify the organization name to you set. + +Edit `web/src/Conf.js` , modify `serverUrl` to http://your-ip:8000 (Casdoor front-end access address), modify `clientId` to the clientId of the application just added, modify `appName` to the set application name, and modify `organizationName` to the set organization name. + +Next, run casnode with docker + +```shell +停靠人员组成 +``` + +Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode. + +More settings reference [casnode.](https://casnode.org/docs) + diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/installation.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/installation.mdx new file mode 100644 index 0000000..e3efe38 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/installation.mdx @@ -0,0 +1,249 @@ +--- +title: 安装 +description: Getting started with Casnode +keywords: + - installation + - configuration + - deploy +authors: + - kininaru +--- + +这将有助于您在服务器上部署Casnode 如果您想要通过 BT 面板或 Docker 安装 Casnode ,请在 [BT Panel](./bt-panel.md) and [Docker](./docker.md) 查看详细信息。 + +请先克隆Casnode +```bash +git clone https://github.com/casbin/casnode +``` +然后按照这些步骤轻松设置您自己的论坛! + +## 生产环境 + +### 1. 设置Casdoor + +Casnode 使用 [Casdoor](https://github.com/casbin/casdoor) 来管理成员。 所以您需要在Casdoor 实例中创建一个组织和一个Casnode 的应用程序。 + +按照这些步骤设置Casdoor for Casnode: +- Casdoor配置向导(点击 [此处](https://casdoor.org/docs/overview) 获取更多Casdoor详细信息) +- 登录到机构“built-in” +- 点击顶部栏中的 **Organizations** +- 点击 **添加** 按钮 +- 记住组织名称, 这里我使用 **casbin-forum** 作为我的组织名称: ![组织](/img/installation/organization.png) + +- 点击 **顶部栏中的应用程序** +- 点击 **添加** 按钮 +- 记住应用程序名称, 这里我使用论坛作为我的应用程序名称: +- 点击 **编辑** + +![应用程序](/img/installation/application.png) + +- 选择您刚刚创建的组织作为应用程序组织 + +![选择](/img/installation/chooseorganization.png) +- 修改重定向URL到论坛 URL。 如果您处于正在开发的环境中,您的重定向URL是 **http://localhost:3000/callback**。 如果您处于生产环境,您的重定向URL是 **http://yourip:7000/callback** + +![重定向器](/img/installation/redirecturls.png) +- 点击 **保存** 并记住 `客户端 ID` 和 `客户端密钥` + +![客户](/img/installation/client.png) + +### 2. 修改 `conf/app.conf` + +以下是配置项目的解释: + +#### Database connection: + +#### Casnode database + +```ini {2} +driverName = mysql +dataSourceName = root:123@tcp(localhost:3306)/ +dbName = casnode +``` + +#### Casdoor database + +```ini +casdoorDbName = casdoor +``` + +:::tip + +Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go) + +Here we provide an example: + +1. Add casdoor configuration in `conf/app.conf`: + +```ini +casdoorDriverName = +casdoorDataSourceName = +``` + +2. Modify the `func InitCasdoorAdapter()`: + + +```go + adapter = NewAdapter(beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDriverName"), beego.AppConfig.String("casdoorDbName")) +``` + +::: + +#### Object Storage Service (Casnode uses OSS to store resources): + +```ini +OSSProvider = "" +accessKeyID = "" +accessKeySecret = "" +OSSCustomDomain = "" +OSSBasicPath = "" +OSSRegion = "" +OSSEndPoint = "" +OSSBucket = "" +``` + +If you can not access Google in normal ways, you need to set up a http proxy here: + +```ini +httpProxy = "127.0.0.1:10808" +``` + +#### Casdoor config: + +```ini {2,5,8,13} +# Your Casdoor endpoint in step 1 +casdoorEndpoint = http://localhost:8000 + +# Client ID you copied in step 1 +clientId = xxx + +# Client Secret you copied in step 1 +clientSecret = xxx + +jwtSecret = CasdoorSecret + +# Organization name in step 1 +casdoorOrganization = "casbin-forum" +``` + +### 3. 修改 `web/src/Conf.js` + +```js {3,6,9,12} +export const AuthConfig = { + // Your Casdoor endpoint in step 1 + serverUrl: "http://localhost:7001", + + // Client ID you copied in step 1 + clientId: "014ae4bd048734ca2dea", + + // Application name you copied in step 1 + appName: "app-casbin-forum", + + // Organization name you copied in step 1 + organizationName: "casbin-forum", +}; +``` + +### 4. 构建前端 + +In folder `web`, run the following commands: + +````mdx-code-block + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +```bash +yarn install && yarn run build +``` + + + + + +```bash +npm install && npm run build +``` + + + + +```` +### 5. 重建后端 +In repository root, run: +```shell +go build +./casnode +``` + +Then the Casnode app should run on port 7000. You can setup a nginx proxy pass to manage SSL or something else. + +For most of site owners who want to develop a forum using Casnode, steps above is enough. But if you are a developer, want to contribute to Casnode, or modify the code to suit your own environment, then you can run Casnode in the developing mode. Please follow these steps to start developing mode: + +## 开发环境 + +### 1. 执行上文第1-3步 + +### 4. 运行后退结束 + +```go +go run main.go +``` +### 5. 运行前端 + +In `web` folder: + +````mdx-code-block + + + + + +```bash +yarn install +yarn run start +``` + + + + + +```bash +npm install +npm run start +``` + + + + +```` +Now, Casnode runs its front end at port 3000 and runs it's back end at port 7000. You can modify the code and see what will happen. +:::caution +The front end uses these codes to determine whether it is a dev mode: +```js +export function initServerUrl() { + const hostname = window.location.hostname; + if (hostname === "localhost") { + ServerUrl = `http://${hostname}:7000`; + } +} +``` +It means if hostname is `localhost`, then you are in dev mode. If not, then you are in productive mode. Port of the back end is not same in dev mode and productive mode, so please do not use `127.0.0.1` instead of `localhost` in your browser in dev mode. + +::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/internationalization.md b/i18n/zh/docusaurus-plugin-content-docs/current/internationalization.md new file mode 100644 index 0000000..bb8ab8b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/internationalization.md @@ -0,0 +1,12 @@ +--- +title: Internationalization +description: Help Casnode internationalize +keywords: + - Internationalization +authors: + - ErikQQY +--- + +Casnode 支持多种语言,将翻译部署到Crowdin,我们支持中文、法文、德文、俄文、日文和朝鲜文。 + +Casnode uses the official Crowdin cli to sync translations from Crowdin, if you want to add more languages supports, please propose in [our community](https://github.com/casbin/casnode), and if you want to help us speed up the translating work, please help us translate on [Crowdin](https://crowdin.com/project/casnode). \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/intro.md b/i18n/zh/docusaurus-plugin-content-docs/current/intro.md new file mode 100644 index 0000000..8ec452e --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/intro.md @@ -0,0 +1,16 @@ +--- +title: 概览 +--- + +Casnode 是由 [Cassbin 社区](https://casbin.org/) 开发的论坛。 详细架构: + +| 名称 | 描述 | 实用小工具 | 源代码 | +| -- | ---------------------- | ----------------------------- | ------------------------------------------------- | +| 前端 | Casnode Web 前端界面 | JavaScript 和 React | https://github.com/casbin/casnode/tree/master/web | +| 后端 | Casnode RESTful API 后端 | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin社区将论坛作为官方论坛: [种子节点](https://forum.casbin.com/)。 + +Casnode 是开源的,您可以在这里获得代码 [](https://github.com/casbin/casnode)。 + +Casnode 易用。 它在用户界面中有详细的描述,这样普通用户就可以轻松地从Casnode开始。 此文档是为想要充分使用Casnode的管理员准备的。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/main-features.md b/i18n/zh/docusaurus-plugin-content-docs/current/main-features.md new file mode 100644 index 0000000..2412330 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/main-features.md @@ -0,0 +1,46 @@ +--- +title: 主要功能 +description: Casnode main features +keywords: + - features +authors: + - kininaru +--- + +这里有特殊的特征区分Casnode 和其他论坛。 以下是这些功能的简短介绍。 向前阅读更多细节。 + +## 📧 邮件列表 + +Casnode 很好地支持 Google 小组。 通过集成 [Google group-crawler](https://github.com/casbin/google-groups-crawler), 在设置谷歌群组配置后,将开始双向同步。 现在,Casnode 只能同步谷歌群组的对话,但可以将对话推送到任何其他邮件列表。 + +## ✨ 多平台 + +Casnode 支持计算机和移动访问。 前端用户界面适用于 PC 和移动设备。 + +## 🔍 内置搜索 + +Casnode 支持内置搜索当然也支持使用诸如Google等各种引擎搜索。 + +## 🖼️ 上传图片和附件 + +Casnode 支持拖放以上传图片和附件。 同时,每个账户都有自己的文件库和配额。 文件库中的文件也可以使用共享链接共享,从而更方便地发布图片和图片。 支持各种开放源码软件储存,如Alibaba云和腾讯云。 + +## 📢 网站广告 + +支持建立可以通过背景独立发送的网站广告。 + +## 🎯 服务器端渲染 + +Casnode 支持服务器端渲染,友好以搜索引擎SEO。 + +## 🗄️ 所有类型的数据库 + +Casnode 使用 [xorm](https://github.com/go-xorm/xorm) 连接到数据库。 您可以使用 MySQL 、 sqlite3 、 mymysql 和 Postgres for Casnode。 + +## 🌐 多语言 + +Casnode uses i18next and [Crowdin](https://crowdin.com/project/casnode/) to support multi-language. 现在,Casnode 支持中文、英文、法文、德文、俄文、日文和朝鲜文。 欢迎使用 PR 或文件作为一个问题来支持您的语言! 任何翻译贡献都受到欢迎! + +## 🚪 使用 Casdoor 管理成员 + +Casnode 在数据库中没有成员表。 Casnode 使用 [Casdoor](https://github.com/casbin/casdoor) 来管理用户。 Casdoor是基于 OAuth2.0 的 SSO 平台。 通过Cassdoor,Casnode 支持各种第三方登录/注册方法。 注册方法多种多样,手机、 电子邮件、 QQ、 WeChat、 GitHub、 Facebook、 Google、 LinkedIn、 DingTalk、 Gitee、 wecom和 GitLab。 它还支持人类机器核查的图形核查代码。 如果您使用Casdoor 来管理您的组织,您的成员可以直接登录到Casnode ,无需再次注册。 要获取更多详细的功能,请前往 [Casdoor](https://casdoor.org)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/main-package.md b/i18n/zh/docusaurus-plugin-content-docs/current/main-package.md new file mode 100644 index 0000000..ff25401 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/main-package.md @@ -0,0 +1,28 @@ +--- +title: 主包 +description: Casnode main packages +keywords: + - main +authors: + - kininaru +--- + +Casnode后端有几个软件包。 The main function and the Beego framework call these packages when the program starts. + +## 主要的 + +主要的包裹是卡斯诺德的入口。 我们在主包中做一些基本设置步骤: + +* **设置一些全局变量**: 数据库适配器、http 客户端、开放源码软件适配器、Segmenter 和论坛基本信息 (论坛版本、在线号码、谷歌组 Crawlers) + +* **设置过滤器:** API请求过滤器,搜索引擎机器人过滤器 + +* **会话数据:** Casnode 使用 Beego 会话来存储用户信息。 在主要函数中,写下这些行使用基于文件的会话: + +```go +Beego.BConfig.WebConfig.SessionProvider = "file" +beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp" +beego.BConfig.WebConfig.SessionGCMaxLifetime = 360* 24 * 365 +``` + +如果您想要在Beego使用另一个会话适配器,请参阅 [Beego会话](https://beego.me/docs/mvc/controller/session.md)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/migration.md b/i18n/zh/docusaurus-plugin-content-docs/current/migration.md new file mode 100644 index 0000000..cbadef0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/migration.md @@ -0,0 +1,112 @@ +--- +title: 从 DiscuzX 迁移 +description: Migration from DiscuzX +keywords: + - discuz + - discuz! + - discuzx +authors: + - hsluoyz +--- + +Casnode 提供了很多Go 脚本来帮助用户将他们的论坛从 DiscuzX 3.x 迁移到Casnode。 脚本位于:https://github.com/casbin/casnode/tree/master/discuzx + +Xorm支持的数据库(例如MySQL) 由 Cansode 用于存储主题和回复等论坛数据。 Casnode 用于存储图像和附件文件的对象存储(作为Casdoor 存储提供商的形式)。 + +## 准备工作 + +您需要在进行迁移之前准备好以下环境: + +1. 云端虚拟机(含4个核心和8GB内存,8个核心和16GB更高), 更快地使用内联网与数据库的连接。 此 VM 用于运行迁移脚本。 +2. 上面虚拟机中带有迁移脚本的 Casnode git 仓库(Casnode 实例可以运行或停止)。 +3. 正在运行的 Casdoor 实例 (在同一个云端虚拟机中更优越,速度更快), 至少有一个对象存储被配置为Casdoor 存储提供商。 这用于将DiscuzX的图像和附件文件上传到对象存储。 +4. 您的 DiscuzX 实例已上线。 + +## 配置 + +首先根据他们的安装指南正确配置Casdoor 和 Casnode ,确保他们在迁移前正常工作。 + +:::tip + +Let Casdoor and Casnode connect to the DB's Intranet URL. Let Casdoor's storage provider's endpoint be the Intranet URL of the cloud object storage. It will be much faster. + +::: + +Configure the Casdoor database in Casnode's app.conf, so Casnode can directly connect to Casdoor's DB and create users. This will be faster than calling Casdoor's RESTful API to create users. + +```ini +casdoorDbName = casdoor +``` + +Configure the migration script at: https://github.com/casbin/casnode/blob/master/discuzx/conf.go . + +1. dbname: 你的 DiscuzX's 数据库名称 +2. discuzxDomain: 你的 DiscuzX's 公共域名, 带有尾随斜杠的 +3. discuzxAttachmentBaseUrl: 你的 DiscuzX的附件基URL, 带有尾随斜杠(你可以从你DiscuzX的附件文件 URL 获取) +4. 头像PoolBaseUrl: 不要更改 + +```go +package discuzx + +var dbname = "ultrax" +var discuzxDomain = "https://www.discuz.net/" +var discuzxAttachmentBaseUrl = "https://attachment.discuz.net/forum/" +``` + +:::tip + +In Casnode, we assume you use the same DB username and password for all 3 DBs: Casnode's DB, Casdoor's DB and DiscuzX's DB. So make sure this DB user can access all 3 DBs. + +::: + +## Migration + +You may see the `XXXConcurrency` is defined at the top of the scripts, this is the number of the concurrent threads to do the migration. You can tune this value based on your environment. If it is too small, the migration will be very slow. If it is too high, the DB connections will be more likely to report "Connections too many" errors. + +```go +var SyncAvatarsConcurus = 20 +``` + +:::tip + +The estimation time we provide in the following sections is measured in a machine with remote Internet connection with the DB and object storage. If your VM is in the same subnet with the DB and object storage, you will be much faster. + +::: + +### 1. 用户迁移 + +To migrate all your DiscuzX's UCenter members to Casdoor's users: + +Run `TestAddUsers` in: https://github.com/casbin/casnode/blob/master/discuzx/user_test.go + +This step will roughly take 2 minutes for 60,000 users. + +### 2. 用户头像迁移 + +To migrate all your DiscuzX's UCenter members' avatars to Casdoor's resources (via Casdoor's storage provider, backed by the cloud object storage): + +Run `TestSyncAvatars` in: https://github.com/casbin/casnode/blob/master/discuzx/avatar_test.go + +This step will roughly take 10 minutes for 60,000 users. + +### 3. 论坛迁移 + +To migrate all your DiscuzX's forums to Casdoor's tabs and nodes: + +Run `TestAddForums` in: https://github.com/casbin/casnode/blob/master/discuzx/forum_test.go + +This step will usually finish in 2 seconds. + +### 4. 线程和帖子迁移 + +To migrate all your DiscuzX's threads & posts to Casdoor's topics & replies: + +Run `TestAddThreads` in: https://github.com/casbin/casnode/blob/master/discuzx/thread_test.go + +This step will roughly take 7 minutes for 10,000 users. + +## 最后完成 + +During the migration, you can keep the Casnode instance running at the same time, so you can see the effect immediately by pressing `F5` in Casnode's public homepage. + +If you encounter panic when running the migration scripts, contact the Casnode authors. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/overview.md new file mode 100644 index 0000000..c137fb6 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/overview.md @@ -0,0 +1,22 @@ +--- +title: 概览 +description: Introduction to Casnode +keywords: + - overview + - introduction +authors: + - kininaru +--- + +Casnode is a forum developed by [Casbin community](https://casbin.io/). 详细架构: + +| 名称 | 描述 | 工具 | 源代码 | +| -- | ---------------------- | ----------------------------- | ------------------------------------------------- | +| 前端 | Casnode Web 前端界面 | JavaScript 和 React | https://github.com/casbin/casnode/tree/master/web | +| 后端 | Casnode RESTful API 后端 | Golang + Beego + MySQL + Xorm | https://github.com/casbin/casnode/ | + + Casbin社区将论坛作为官方论坛: [Casnode](https://forum.casbin.com/) 。 + +Casnode 是开源的,您可以在这里获得代码 [](https://github.com/casbin/casnode)。 + +Casnode 易用。 它在用户界面中有详细的描述,这样普通用户就可以轻松地从Casnode开始。 此文档是为想要充分使用Casnode的管理员准备的。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/routers.md b/i18n/zh/docusaurus-plugin-content-docs/current/routers.md new file mode 100644 index 0000000..c41d43f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/routers.md @@ -0,0 +1,25 @@ +--- +title: 路由 +description: Filters in Casnode +keywords: + - routers + - filter +authors: + - kininaru +--- + +实际上, `路由器` 是一个内置的Beego包件。 `routers.init()` 程序启动时由框架运行。 然而,我们在包裹中添加了一些过滤功能。 + +我们不会在这里说 `路由器/路由器` 。Beego已经有一个很好的文档。 我们将在这里介绍我们的过滤器。 + +## 路由器/过滤器.go + +**透明静态:** 此过滤器将服务于静态文件。 如果请求路径不是以 `/api/`开头的,那么过滤器将为浏览器提供静态文件。 过滤器将在 `web/build/`中找到请求的文件,如果存在则服务于该文件。 + +**新旧账户激活状态:** 更新用户发送请求时的在线状态。 + +## 路由器/filter_ssr.go + +我们使用 Chromedp 渲染搜索引擎机器人的页面。 如果安装了 Chrome ,此文件中的函数将返回渲染页面到机器人。 + +我们使用正则表达式 `bot|slurp|bing|crawler` 来匹配请求的用户代理人。 如果匹配,我们认为请求是由机器人发送的。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/server-side-rendering.md b/i18n/zh/docusaurus-plugin-content-docs/current/server-side-rendering.md new file mode 100644 index 0000000..a4420c3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/server-side-rendering.md @@ -0,0 +1,18 @@ +--- +title: 服务端渲染 +description: Server Side Rendering +keywords: + - SSR +authors: + - Nekotoxin +--- + +Casnode 支持 SSR。 SSR(Server-side rendering) 是一种在服务器上呈现客户端单页应用程序(SPA),然后向客户端发送完全呈现的页面的常用技术。 + +这将允许动态组件作为静态HTML标记。 当索引无法正确处理 JavaScript 时,他的方法可以用于搜索引擎优化(SEO)。 在下载一个大型JavaScript包因网络缓慢而受到损害的情况下,它也可能是有益的。 + +## Implementation + +您可以在 `路由器/filter_ssr.go`中看到服务器端渲染。我们使用 Chromedp 来渲染搜索引擎机器人的页面。 如果安装了 Chrome ,此文件中的函数将返回渲染页面到bots。 + +我们使用正则表达式 `bot|slurp|bing|crawler` 来匹配请求的用户代理人。 如果匹配,我们认为请求是由机器人发送的。 diff --git a/i18n/zh/docusaurus-theme-classic/footer.json b/i18n/zh/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..976c6fc --- /dev/null +++ b/i18n/zh/docusaurus-theme-classic/footer.json @@ -0,0 +1,54 @@ +{ + "link.title.Docs": { + "message": "文档", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "社区", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.More": { + "message": "更多", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Overview": { + "message": "概览", + "description": "The label of footer link with label=Overview linking to /docs/overview" + }, + "link.item.label.Get Started": { + "message": "开始", + "description": "The label of footer link with label=Get Started linking to /docs/installation" + }, + "link.item.label.Casnode API": { + "message": "Casnode API", + "description": "The label of footer link with label=Casnode API linking to https://forum.casbin.com/swagger/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/casbin/casnode" + }, + "link.item.label.Stack Overflow": { + "message": "堆栈溢出", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/search?q=casnode" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/qteNGWt8UY" + }, + "link.item.label.QQ Group": { + "message": "QQ 群", + "description": "The label of footer link with label=QQ Group linking to https://qm.qq.com/cgi-bin/qm/qr?k=QKJ53gmeMj5BnnPsf23JasAQdmQF8yEl&jump_from=webapi" + }, + "link.item.label.Blog": { + "message": "博客", + "description": "The label of footer link with label=Blog linking to /blog" + }, + "copyright": { + "message": "Copyright © 2023 Casbin contributors.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Casbin Logo", + "description": "The alt text of footer logo" + } +} diff --git a/i18n/zh/docusaurus-theme-classic/navbar.json b/i18n/zh/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..a9e2d61 --- /dev/null +++ b/i18n/zh/docusaurus-theme-classic/navbar.json @@ -0,0 +1,42 @@ +{ + "title": { + "message": "Casnode", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Docs": { + "message": "文档", + "description": "Navbar item with label Docs" + }, + "item.label.RESTful API": { + "message": "RESTful API", + "description": "Navbar item with label RESTful API" + }, + "item.label.Blog": { + "message": "博客", + "description": "Navbar item with label Blog" + }, + "item.label.Help": { + "message": "帮助", + "description": "Navbar item with label Help" + }, + "item.label.For Enterprise": { + "message": "For Enterprise", + "description": "Navbar item with label For Enterprise" + }, + "item.label.Hosting Plan (SaaS)": { + "message": "Hosting Plan (SaaS)", + "description": "Navbar item with label Hosting Plan (SaaS)" + }, + "item.label.Sign Up": { + "message": "Sign Up", + "description": "Navbar item with label Sign Up" + }, + "item.label.Login": { + "message": "Login", + "description": "Navbar item with label Login" + } +} diff --git a/netlify.toml b/netlify.toml index ddb1af0..c72e7cc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ ignore = "/bin/false" base = "./" publish = "build/" - command = "yarn build --locale en" \ No newline at end of file + command = "yarn build" \ No newline at end of file