diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml index f1c0a57a4f2..731b4a90052 100644 --- a/.devcontainer/compose.yml +++ b/.devcontainer/compose.yml @@ -7,6 +7,7 @@ services: - node_modules:/workspace/growi/node_modules - buildcache_app:/workspace/growi/apps/app/.next - ../../growi-docker-compose:/workspace/growi-docker-compose:delegated + - ../../share:/workspace/share:delegated tty: true mongo: diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 2d4d4dd86c8..cce6acd3c66 100644 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -3,7 +3,6 @@ sudo chown -R vscode:vscode /workspace; # Instal additional packages sudo apt update sudo apt-get install -y --no-install-recommends \ - git-lfs \ iputils-ping net-tools dnsutils sudo apt-get clean -y diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 26e34863c31..00000000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.gz filter=lfs diff=lfs merge=lfs -text -*.woff2 filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/ci-app.yml b/.github/workflows/ci-app.yml index 3613fd5a235..505a0432c2d 100644 --- a/.github/workflows/ci-app.yml +++ b/.github/workflows/ci-app.yml @@ -17,6 +17,19 @@ on: - apps/app/** - '!apps/app/docker/**' - packages/** + pull_request: + types: [opened, reopened, synchronize] + paths: + - .github/mergify.yml + - .github/workflows/ci-app.yml + - .eslint* + - tsconfig.base.json + - turbo.json + - pnpm-lock.yaml + - package.json + - apps/app/** + - '!apps/app/docker/**' + - packages/** concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 871eee9170a..8d252bd8aa2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,6 @@ jobs: - name: Bump versions run: | turbo run version:patch --filter=@growi/app - pnpm upgrade --scope=@growi sh ./apps/app/bin/github-actions/update-readme.sh - name: Retrieve information from package.json @@ -178,7 +177,6 @@ jobs: run: | turbo run version:prepatch --filter=@growi/app turbo run version:prepatch --filter=@growi/slackbot-proxy - pnpm upgrade --scope=@growi - name: Retrieve information from package.json uses: myrotvorets/info-from-package-json-action@2.0.1 diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml index f59fa1853af..f1dfe4caf57 100644 --- a/.github/workflows/reusable-app-prod.yml +++ b/.github/workflows/reusable-app-prod.yml @@ -11,6 +11,18 @@ on: secrets: SLACK_WEBHOOK_URL: required: true + workflow_dispatch: + inputs: + node-version: + required: true + type: string + default: 20.x + skip-e2e-test: + type: boolean + default: false + secrets: + SLACK_WEBHOOK_URL: + required: true jobs: @@ -23,10 +35,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Git LFS - run: | - git lfs install - - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 @@ -165,6 +173,10 @@ jobs: run-playwright: needs: [build-prod] + if: | + github.event_name == 'workflow_dispatch' || + (!inputs.skip-e2e-test && startsWith(github.head_ref, 'mergify/merge-queue/')) + runs-on: ubuntu-latest container: # Match the Playwright version @@ -227,6 +239,7 @@ jobs: run: | pnpm playwright test --project=chromium/installer env: + DEBUG: pw:api HOME: /root # ref: https://github.com/microsoft/playwright/issues/6500 MONGO_URI: mongodb://mongodb:27017/growi-playwright-installer ELASTICSEARCH_URI: http://localhost:${{ job.services.elasticsearch.ports['9200'] }}/growi @@ -241,6 +254,7 @@ jobs: run: | pnpm playwright test --project=${{ matrix.browser }} --shard=${{ matrix.shard }} env: + DEBUG: pw:api HOME: /root # ref: https://github.com/microsoft/playwright/issues/6500 MONGO_URI: mongodb://mongodb:27017/growi-playwright ELASTICSEARCH_URI: http://localhost:${{ job.services.elasticsearch.ports['9200'] }}/growi @@ -255,10 +269,19 @@ jobs: run: | pnpm playwright test --project=${{ matrix.browser }}/guest-mode --shard=${{ matrix.shard }} env: + DEBUG: pw:api HOME: /root # ref: https://github.com/microsoft/playwright/issues/6500 MONGO_URI: mongodb://mongodb:27017/growi-playwright-guest-mode ELASTICSEARCH_URI: http://localhost:${{ job.services.elasticsearch.ports['9200'] }}/growi + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: blob-report-${{ matrix.shard }} + path: blob-report + retention-days: 30 + - name: Slack Notification uses: weseek/ghaction-slack-notification@master if: failure() @@ -268,3 +291,35 @@ jobs: channel: '#ci' isCompactMode: true url: ${{ secrets.SLACK_WEBHOOK_URL }} + + + report-playwright: + needs: [run-playwright] + + if: always() && needs.run-playwright.result != 'skipped' + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: 'pnpm' + + - name: Install dependencies + run: | + pnpm install --frozen-lockfile + + - name: Merge into HTML Report + run: pnpm playwright merge-reports --reporter html ./all-blob-reports + + - name: Upload HTML report + uses: actions/upload-artifact@v4 + with: + name: html-report + path: playwright-report + retention-days: 30 diff --git a/.vscode/settings.json b/.vscode/settings.json index 6be40b38e0e..a1925bb3c7e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,5 +19,13 @@ "githubPullRequests.ignoredPullRequestBranches": [ "master" - ] + ], + + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + "typescript.preferences.autoImportFileExcludePatterns": ["node_modules/*"], + "typescript.validate.enable": true, + "typescript.surveys.enabled": false, + + "vitest.filesWatcherInclude": "**/*" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 574fba11bef..c09eb3cca6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,175 @@ # Changelog -## [Unreleased](https://github.com/weseek/growi/compare/v7.0.22...HEAD) +## [Unreleased](https://github.com/weseek/growi/compare/v7.1.6...HEAD) *Please do not manually update this file. We've automated the process.* +## [v7.1.6](https://github.com/weseek/growi/compare/v7.1.5...v7.1.6) - 2024-12-26 + +### 💎 Features + +* feat(ai): Save file to VectorStore in HTML format (#9462) @miya + +### 🐛 Bug Fixes + +* fix: remark-lsx pagination (#9513) @miya +* fix: Spelling miss of external_link in i18n (#9456) @reiji-h +* fix: Wider copy to clipboard area (#9450) @Ryosei-Fukushima +* fix: Error when creating pages with deep hierarchy (#9487) @reiji-h + +### 🧰 Maintenance + +* ci(deps): bump next from 14.2.13 to 14.2.15 (#9501) @dependabot + +## [v7.1.5](https://github.com/weseek/growi/compare/v7.1.4...v7.1.5) - 2024-12-13 + +### 🚀 Improvement + +* imprv: Slim down the sidebar scrollbar (#9430) @reiji-h + +### 🐛 Bug Fixes + +* fix: Usage for stream pipeline of callback version (#9455) @reiji-h +* fix: TypeError occurs during export (#9481) @miya +* fix: Put `/` before the page name (#9471) @Ryosei-Fukushima +* fix: Cannot comment when comments from rom user are allowed (#9472) @miya + +## [v7.1.4](https://github.com/weseek/growi/compare/v7.1.3...v7.1.4) - 2024-11-26 + +### 🐛 Bug Fixes + +* fix: Failed to export the page markdown (#9444) @miya + +## [v7.1.3](https://github.com/weseek/growi/compare/v7.1.2...v7.1.3) - 2024-11-26 + +### 💎 Features + +* feat(ai): Set a rate limit for vector store rebuild (#9404) @miya + +### 🚀 Improvement + +* imprv: Fonts preload settings (#9432) @yuki-takei +* imprv: Use stream.pipeline (#9361) @reiji-h + +### 🐛 Bug Fixes + +* fix: Retrieving runtime versions (#9438) @yuki-takei +* fix: Notification for new user creation (#9434) @yuki-takei +* fix: Deleted pages appear in the page tree (#9337) @reiji-h + +## [v7.1.2](https://github.com/weseek/growi/compare/v7.1.1...v7.1.2) - 2024-11-18 + +### 🚀 Improvement + +* imprv(ai): GROWI AI Knowledge Assistant instructions (#9407) @yuki-takei +* imprv(ai): Knowedge Assistant model configuration by env var (#9410) @yuki-takei +* imprv(ai): Shorten thread deletion expiredAt (#9419) @yuki-takei +* imprv(ai): Remove unnecessary strings from markdown when creating VectorStoreFIie (#9411) @miya +* imprv(ai): Create thead before the first post (#9414) @yuki-takei + +### 🐛 Bug Fixes + +* fix: Fixed the message when all read (#9405) @Ryosei-Fukushima + +### 🧰 Maintenance + +* support: Import OpenAI features dynamically (#9413) @yuki-takei +* support: Welcome back Hufflepuff badger (#9403) @satof3 + +## [v7.1.1](https://github.com/weseek/growi/compare/v7.1.0...v7.1.1) - 2024-11-12 + +### 💎 Features + +* feat(ai): Swtch summary mode (#9377) @yuki-takei +* feat: Return sources when generating responses (Knowledge assistant) (#9362) @miya +* feat: Set the maximum number of minutes until the request in an environment variable (#9347) @miya + +### 🚀 Improvement + +* imprv: GitHub Alert with directive syntax (#9392) @yuki-takei +* imprv: Sidebar button displays tooltip (#9371) @reiji-h +* imprv: Open the link of PageTreeItem in a new tab when the user middle click (#9365) @yuki-takei +* support: Avoid using req.t() (#9149) @shironegi39 +* imprv: Tidy up /Sandbox (#9355) @yuki-takei +* imprv: Reduce sanitizing (#9350) @yuki-takei + +### 🐛 Bug Fixes + +* fix: Output TextDirective and LeafDirective HTML (#9388) @yuki-takei +* fix: NextLink isCreatablePage always returns false (#9356) @yuki-takei +* fix: Duplicate page names alert should not occur on a single page (#9348) @reiji-h +* fix: i18n for security settings (#9379) @yuki-takei +* fix: Output TextDirective and LeafDirective HTML (#9388) @yuki-takei +* fix(i18n): i18n for server side (#9372) @yuki-takei +* fix: Duplicate page names alert should not occur on a single page (#9348) @reiji-h +* fix: NextLink isCreatablePage always returns false (#9356) @yuki-takei + +### 🧰 Maintenance + +* support: Welcome back new Christmas theme (#9374) @satof3 +* support: Type checking (#9393) @yuki-takei +* support: Welcome back new Christmas theme (#9374) @satof3 +* support: Omit remark-toc (#9383) @yuki-takei +* support: Stop managing font files with Git LFS (#9351) @yuki-takei +* support: Avoid using req.t() (#9149) @shironegi39 +* support: Improve playwright report (#9363) @yuki-takei +* support: Avoid using req.t() (#9149) @shironegi39 +* support: Stop managing font files with Git LFS (#9351) @yuki-takei + +## [v7.1.0](https://github.com/weseek/growi/compare/v7.0.23...v7.1.0) - 2024-10-31 + +### BREAKING CHANGES + +* imprv: Update default value for S3_OBJECT_ACL (#9332) @yuki-takei + +### 💎 Features + +* feat: GROWI OpenAI Integration (#9246) @yuki-takei + +### 🚀 Improvement + +* imprv: Add GitHub Markdown alerts (#9127) @reiji-h +* imprv: Upgrade unified and remark-growi-directive (#9048) @reiji-h +* imprv: ROM users can manage comments (#9101) @WNomunomu +* imprv: Update default value for S3_OBJECT_ACL (#9332) @yuki-takei +* imprv: Sandbox (#9330) @yuki-takei +* support: JSDoc for OpenAPI document (#9311) @yuki-takei + +### 🐛 Bug Fixes + +* fix: Couldn't show old revision (#9296) @yuki-takei +* fix: Replace the word ROM (#9295) @satof3 +* fix: forgot-password API (#9257) @reiji-h +* fix: Edit button appear for the side of header (#9270) @yuki-takei +* fix: Ensure text-only paste for mixed content from various sources (#9096) @reiji-h +* fix: Notification count badge (#9124) @shironegi39 +* fix(ogp): Set an unknown label when the user is not found (#9232) @yuki-takei + +### 🧰 Maintenance + +* support: Migrate to pnpm from yarn v1 (#9249) @yuki-takei +* support: Omit MongoDB 4.x compatible code (#9334) @yuki-takei +* support: Pull LFS files with turbo (#9325) @yuki-takei +* support: Use `pnpm deploy` instead of `turbo prune` (#9323) @yuki-takei +* support: Maintenance API docs generation (#9302) @yuki-takei +* support: Improve typings for PageService (#9220) @yuki-takei +* support: Typescriptize accessTokenParser (#9320) @yuki-takei +* support: Migrate to pnpm from yarn v1 (#9249) @yuki-takei +* support: JSDoc for OpenAPI document (#9311) @yuki-takei +* support: Maintenance API docs generation (#9302) @yuki-takei +* support: Omit docs route (#9299) @yuki-takei + +## [v7.0.23](https://github.com/weseek/growi/compare/v7.0.22...v7.0.23) - 2024-10-24 + +### 🐛 Bug Fixes + +* fix: Couln't show old revision (#9296) @yuki-takei + +### 🧰 Maintenance + +* support: Maintenance API docs generation (#9302) @yuki-takei +* support: Omit docs route (#9299) @yuki-takei + ## [v7.0.22](https://github.com/weseek/growi/compare/v7.0.21...v7.0.22) - 2024-10-21 ### 🐛 Bug Fixes diff --git a/README.md b/README.md index 4b37af56c53..6a19c7cd73a 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ See [GROWI Docs: Environment Variables](https://docs.growi.org/en/admin-guide/ad | command | desc | | --------------------- | ------------------------------------------------------- | -| `pnpm run app:build` | Build GROWI app client | -| `pnpm run app:server` | Launch GROWI app server | -| `pnpm run start` | Invoke `pnpm run app:build` and `pnpm run app:server` | +| `npm run app:build` | Build GROWI app client | +| `npm run app:server` | Launch GROWI app server | +| `npm run start` | Invoke `npm run app:build` and `npm run app:server` | For more info, see [GROWI Docs: List of npm Scripts](https://docs.growi.org/en/dev/startup-v5/start-development.html#list-of-npm-scripts). diff --git a/README_JP.md b/README_JP.md index aadc2c3e8bb..ce3b713f17f 100644 --- a/README_JP.md +++ b/README_JP.md @@ -96,9 +96,9 @@ Crowi からの移行は **[こちら](https://docs.growi.org/en/admin-guide/mig | コマンド | 説明 | | --------------------- | --------------------------------------------------------------- | -| `pnpm run app:build` | GROWI app クライアントをビルドします。 | -| `pnpm run app:server` | GROWI app サーバーを起動します。 | -| `pnpm run start` | `pnpm run app:build` と `pnpm run app:server` を呼び出します。 | +| `npm run app:build` | GROWI app クライアントをビルドします。 | +| `npm run app:server` | GROWI app サーバーを起動します。 | +| `npm run start` | `npm run app:build` と `npm run app:server` を呼び出します。 | 詳しくは [GROWI Docs: npm スクリプトリスト](https://docs.growi.org/ja/dev/startup-v5/start-development.html#npm-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%95%E3%82%9A%E3%83%88%E3%83%AA%E3%82%B9%E3%83%88)をご覧ください。 diff --git a/apps/app/bin/swagger-jsdoc/definition-apiv3.js b/apps/app/bin/swagger-jsdoc/definition-apiv3.js index 832174be25f..ce5dcc054b8 100644 --- a/apps/app/bin/swagger-jsdoc/definition-apiv3.js +++ b/apps/app/bin/swagger-jsdoc/definition-apiv3.js @@ -23,6 +23,11 @@ module.exports = { name: 'access_token', in: 'query', }, + cookieAuth: { + type: 'apiKey', + in: 'cookie', + name: 'connect.sid', + }, }, }, 'x-tagGroups': [ @@ -31,6 +36,7 @@ module.exports = { tags: [ 'Attachment', 'Bookmarks', + 'BookmarkFolders', 'Page', 'Pages', 'Revisions', @@ -57,6 +63,7 @@ module.exports = { name: 'System Management API', tags: [ 'Home', + 'AdminHome', 'AppSettings', 'SecuritySetting', 'MarkDownSetting', @@ -74,6 +81,7 @@ module.exports = { 'UserGroups', 'Users Management', 'FullTextSearch Management', + 'Install', ], }, { diff --git a/apps/app/config/i18next.config.js b/apps/app/config/i18next.config.js index 6f7d65c306a..4ab8102e67f 100644 --- a/apps/app/config/i18next.config.js +++ b/apps/app/config/i18next.config.js @@ -1,6 +1,6 @@ -const { Lang, AllLang } = require('@growi/core'); +const { Lang, AllLang } = require('@growi/core/dist/interfaces'); -/** @type {Lang} */ +/** @type {import('@growi/core/dist/interfaces').Lang} */ const defaultLang = Lang.en_US; /** @type {import('i18next').InitOptions} */ @@ -10,7 +10,5 @@ const initOptions = { defaultNS: 'translation', }; -module.exports = { - defaultLang, - initOptions, -}; +exports.defaultLang = defaultLang; +exports.initOptions = initOptions; diff --git a/apps/app/docker/Dockerfile b/apps/app/docker/Dockerfile index dcba7171311..4107080b71f 100644 --- a/apps/app/docker/Dockerfile +++ b/apps/app/docker/Dockerfile @@ -1,4 +1,4 @@ -# syntax = docker/dockerfile:1.4 +# syntax = docker/dockerfile:1 ## @@ -6,15 +6,17 @@ ## FROM node:20-slim AS base -ENV optDir /opt +ENV optDir=/opt WORKDIR ${optDir} +# install tools +RUN apt-get update && apt-get install -y ca-certificates wget curl --no-install-recommends + # install pnpm -RUN apt-get update && apt-get install -y ca-certificates wget --no-install-recommends \ - && wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh - -ENV PNPM_HOME "/root/.local/share/pnpm" -ENV PATH "$PNPM_HOME:$PATH" +RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh - +ENV PNPM_HOME="/root/.local/share/pnpm" +ENV PATH="$PNPM_HOME:$PATH" # install turbo RUN pnpm add turbo --global @@ -26,7 +28,7 @@ RUN pnpm add turbo --global ## FROM base AS builder -ENV optDir /opt +ENV optDir=/opt WORKDIR ${optDir} @@ -62,12 +64,12 @@ RUN tar -zcf packages.tar.gz \ ## release ## FROM node:20-slim -LABEL maintainer Yuki Takei +LABEL maintainer="Yuki Takei " -ENV NODE_ENV production +ENV NODE_ENV="production" -ENV optDir /opt -ENV appDir ${optDir}/growi +ENV optDir=/opt +ENV appDir=${optDir}/growi # Add gosu # see: https://github.com/tianon/gosu/blob/1.13/INSTALL.md @@ -78,13 +80,6 @@ RUN set -eux; \ # verify that the binary works gosu nobody true -# Add pnpm for 'node' user -RUN apt-get update && apt-get install -y sudo ca-certificates wget --no-install-recommends \ - && wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sudo -u node sh - \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -ENV PNPM_HOME="/home/node/.local/share/pnpm" -ENV PATH "$PNPM_HOME:$PATH" - COPY --from=builder --chown=node:node \ ${optDir}/packages.tar.gz ${appDir}/ @@ -102,4 +97,4 @@ VOLUME /data EXPOSE 3000 ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["pnpm run migrate && node -r dotenv-flow/config --expose_gc dist/server/app.js"] +CMD ["npm run migrate && node -r dotenv-flow/config --expose_gc dist/server/app.js"] diff --git a/apps/app/docker/README.md b/apps/app/docker/README.md index 12c9a0b6a13..ab3e3608e53 100644 --- a/apps/app/docker/README.md +++ b/apps/app/docker/README.md @@ -10,10 +10,9 @@ GROWI Official docker image Supported tags and respective Dockerfile links ------------------------------------------------ -* [`7.0.22`, `7.0`, `7`, `latest` (Dockerfile)](https://github.com/weseek/growi/blob/v7.0.22/apps/app/docker/Dockerfile) +* [`7.1.0`, `7.1`, `7`, `latest` (Dockerfile)](https://github.com/weseek/growi/blob/v7.1.0/apps/app/docker/Dockerfile) +* [`7.0.23`, `7.0` (Dockerfile)](https://github.com/weseek/growi/blob/v7.0.23/apps/app/docker/Dockerfile) * [`6.3.2`, `6.3`, `6` (Dockerfile)](https://github.com/weseek/growi/blob/v6.3.2/apps/app/docker/Dockerfile) -* [`6.2.4`, `6.2` (Dockerfile)](https://github.com/weseek/growi/blob/v6.2.4/apps/app/docker/Dockerfile) -* [`6.1.15`, `6.1` (Dockerfile)](https://github.com/weseek/growi/blob/v6.1.15/apps/app/docker/Dockerfile) What is GROWI? @@ -27,7 +26,7 @@ see: [weseek/growi](https://github.com/weseek/growi) Requirements ------------- -* MongoDB (>= 4.4) +* MongoDB (>= 6.0) ### Optional Dependencies diff --git a/apps/app/docker/codebuild/buildspec.yml b/apps/app/docker/codebuild/buildspec.yml index 8d1f2ad49f8..80878596522 100644 --- a/apps/app/docker/codebuild/buildspec.yml +++ b/apps/app/docker/codebuild/buildspec.yml @@ -10,11 +10,6 @@ env: phases: pre_build: commands: - # install Git LFS - - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash - - yum install -y git-lfs - # fetch LFS files - - git-lfs pull # login to docker.io - echo ${DOCKER_REGISTRY_PASSWORD} | docker login --username wsmoogle --password-stdin build: diff --git a/apps/app/package.json b/apps/app/package.json index fc0b6267f7c..90fa602ebc5 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -1,6 +1,6 @@ { "name": "@growi/app", - "version": "7.1.0-RC.0", + "version": "7.1.7-RC.0", "license": "MIT", "private": "true", "scripts": { @@ -15,7 +15,6 @@ "server:ci": "pnpm run server --ci", "preserver": "cross-env NODE_ENV=production pnpm run migrate", "pre:styles": "vite build -c vite.styles-prebuilt.config.ts", - "pre:lfs": "git lfs pull", "migrate": "node -r dotenv-flow/config node_modules/migrate-mongo/bin/migrate-mongo up -f config/migrate-mongo-config.js", "//// for development": "", "dev": "cross-env NODE_ENV=development nodemon --exec pnpm run ts-node --inspect src/server/app.ts", @@ -28,7 +27,7 @@ "dev:migrate:down": "pnpm run dev:migrate-mongo down -f config/migrate-mongo-config.js", "//// for CI": "", "launch-dev:ci": "cross-env NODE_ENV=development pnpm run dev:migrate && pnpm run ts-node src/server/app.ts --ci", - "lint:typecheck": "npx -y tspc", + "lint:typecheck": "vue-tsc --noEmit", "lint:eslint": "eslint --quiet \"**/*.{js,jsx,ts,tsx}\"", "lint:styles": "stylelint \"src/**/*.scss\"", "lint:swagger2openapi:apiv3": "node node_modules/swagger2openapi/oas-validate tmp/openapi-spec-apiv3.json", @@ -43,7 +42,8 @@ "reg:run": "reg-suit run", "previtest:run:integ": "vitest run -c test-with-vite/download-mongo-binary/vitest.config.ts test-with-vite/download-mongo-binary", "//// misc": "", - "console": "cross-env NODE_ENV=development pnpm run ts-node --experimental-repl-await src/server/console.js", + "console": "npm run repl", + "repl": "cross-env NODE_ENV=development npm run ts-node src/server/repl.ts", "swagger2openapi:apiv3": "sh bin/swagger-jsdoc/generate-spec-apiv3.sh", "swagger2openapi:apiv1": "sh bin/swagger-jsdoc/generate-spec-apiv1.sh", "ts-node": "node -r ts-node/register/transpile-only -r tsconfig-paths/register -r dotenv-flow/config", @@ -126,9 +126,10 @@ "graceful-fs": "^4.1.11", "hast-util-sanitize": "^5.0.1", "hast-util-select": "^6.0.2", + "hastscript": "^8.0.0", "helmet": "^4.6.0", "http-errors": "^2.0.0", - "i18next": "^23.10.1", + "i18next": "^23.16.5", "i18next-resources-to-backend": "^1.2.1", "is-absolute-url": "^4.0.1", "is-iso-date": "^0.0.1", @@ -156,9 +157,9 @@ "multer": "~1.4.0", "multer-autoreap": "^1.0.3", "mustache": "^4.2.0", - "next": "^14.2.13", + "next": "^14.2.21", "next-dynamic-loading-props": "^0.1.1", - "next-i18next": "^15.2.0", + "next-i18next": "^15.3.1", "next-superjson": "^0.0.4", "next-themes": "^0.2.1", "nocache": "^4.0.0", @@ -184,7 +185,7 @@ "react-disable": "^0.1.1", "react-dom": "^18.2.0", "react-error-boundary": "^3.1.4", - "react-i18next": "^14.1.0", + "react-i18next": "^15.1.1", "react-image-crop": "^8.3.0", "react-markdown": "^9.0.1", "react-multiline-clamp": "^2.0.0", @@ -196,9 +197,11 @@ "reconnecting-websocket": "^4.4.0", "redis": "^3.0.2", "rehype-katex": "^7.0.1", + "rehype-meta": "^4.0.1", "rehype-raw": "^7.0.0", "rehype-sanitize": "^6.0.0", "rehype-slug": "^6.0.0", + "rehype-stringify": "^10.0.1", "rehype-toc": "^3.0.2", "remark-breaks": "^4.0.0", "remark-directive": "^3.0.0", @@ -208,10 +211,8 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.1.1", "remark-stringify": "^11.0.0", - "remark-toc": "^9.0.0", "sanitize-filename": "^1.6.3", "socket.io": "^4.7.5", - "stream-to-promise": "^3.0.0", "string-width": "=4.2.2", "superjson": "^1.9.1", "swagger-jsdoc": "^6.2.8", @@ -228,6 +229,7 @@ "unzip-stream": "^0.3.2", "url-join": "^4.0.0", "usehooks-ts": "^2.6.0", + "uuid": "^11.0.3", "validator": "^13.7.0", "ws": "^8.17.1", "xss": "^1.0.15", @@ -256,6 +258,7 @@ "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.5.2", + "@types/bunyan": "^1.8.11", "@types/express": "^4.17.21", "@types/hast": "^3.0.4", "@types/jest": "^29.5.2", @@ -272,6 +275,7 @@ "@types/unist": "^3.0.3", "@types/unzip-stream": "^0.3.4", "@types/url-join": "^4.0.2", + "@types/uuid": "^10.0.0", "babel-loader": "^8.2.5", "bootstrap": "=5.3.2", "connect-browser-sync": "^2.1.0", @@ -284,8 +288,8 @@ "handsontable": "=6.2.2", "happy-dom": "^15.7.4", "i18next-chained-backend": "^4.6.2", - "i18next-hmr": "^3.0.4", - "i18next-http-backend": "^2.5.0", + "i18next-hmr": "^3.1.3", + "i18next-http-backend": "^2.6.2", "i18next-localstorage-backend": "^4.2.0", "jest": "^29.5.0", "jest-date-mock": "^1.0.8", diff --git a/apps/app/playwright.config.ts b/apps/app/playwright.config.ts index 11371c64aa7..e097fcd5e11 100644 --- a/apps/app/playwright.config.ts +++ b/apps/app/playwright.config.ts @@ -48,7 +48,12 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: process.env.CI ? 'github' : 'list', + reporter: process.env.CI + ? [ + ['github'], + ['blob'], + ] + : 'list', webServer: { command: 'pnpm run server', diff --git a/apps/app/public/static/locales/en_US/admin.json b/apps/app/public/static/locales/en_US/admin.json index bbe59f98992..ff870429d9f 100644 --- a/apps/app/public/static/locales/en_US/admin.json +++ b/apps/app/public/static/locales/en_US/admin.json @@ -199,9 +199,9 @@ "id_detail": "Specification of the name of attribute which can identify the user in OIDC claims", "username_detail": "Specification of mappings for username when creating new users", "name_detail": "Specification of mappings for name when creating new users", - "mapping_detail": "Specification of mappings for %s when creating new users", + "mapping_detail": "Specification of mappings for {{target}} when creating new users", "register_1": "Contact to OIDC IdP Administrator", - "register_2": "Register your OIDC App with \"Authorization callback URL\" as %s", + "register_2": "Register your OIDC App with \"Authorization callback URL\" as {{url}}", "register_3": "Copy and paste your ClientID and Client Secret above", "updated_oidc": "Succeeded to update OpenID Connect", "Use discovered URL if empty": "Use discovered URL from \"Issuer Host\" if empty" @@ -1140,7 +1140,7 @@ }, "ai_integration": { "ai_integration": "AI Integration", - "disable_mode_explanation": "Currently, AI integration is disabled. To enable it, please set the environment variable AI_ENABLED to true.", + "disable_mode_explanation": "Currently, AI integration is disabled. To enable it, configure the AI_ENABLED environment variable along with the required additional variables.

For details, please refer to the documentation.", "ai_search_management": "AI search management", "rebuild_vector_store": "Rebuild Vector Store", "rebuild_vector_store_label": "Rebuild", diff --git a/apps/app/public/static/locales/en_US/commons.json b/apps/app/public/static/locales/en_US/commons.json index d4556527bbd..edc821c6b89 100644 --- a/apps/app/public/static/locales/en_US/commons.json +++ b/apps/app/public/static/locales/en_US/commons.json @@ -62,6 +62,7 @@ "all": "All", "unopend": "Unread", "mark_all_as_read": "Mark all as read", + "no_unread_messages": "no_unread_messages", "only_unread": "Only unread" }, diff --git a/apps/app/public/static/locales/en_US/translation.json b/apps/app/public/static/locales/en_US/translation.json index 794ce4cec43..18964a23a5b 100644 --- a/apps/app/public/static/locales/en_US/translation.json +++ b/apps/app/public/static/locales/en_US/translation.json @@ -30,7 +30,7 @@ "Tags": "Tags", "Close": "Close", "Shortcuts": "Shortcuts", - "CustomSidebar": "Custom Sidebar", + "Custom Sidebar": "Custom Sidebar", "eg": "e.g.", "add": "Add", "Undo": "Undo", @@ -117,7 +117,7 @@ "Create under": "Create page under below:", "V5 Page Migration": "Convert To V5 Compatibility", "GROWI.5.0_new_schema": "GROWI.5.0 new schema", - "See_more_detail_on_new_schema": "See more detail on {{title}} external_link ", + "See_more_detail_on_new_schema": "See more detail on {{title}} external_link ", "external_account_management": "External Account Management", "UserGroup": "UserGroup", "Basic Settings": "Basic Settings", @@ -157,10 +157,11 @@ "duplicated_path": "Duplicated path", "Link sharing is disabled": "Link sharing is disabled", "successfully_saved_the_page": "Successfully saved the page", - "you_can_not_create_page_with_this_name": "You can not create page with this name", + "you_can_not_create_page_with_this_name_or_hierarchy": "You can not create page with this name or page hierarchy", "not_allowed_to_see_this_page": "You cannot see this page", "Confirm": "Confirm", "Successfully requested": "Successfully requested.", + "source": "Source", "input_validation": { "target": { "page_name": "Page name", @@ -169,8 +170,8 @@ }, "message": { "error_message": "Some values ​​are incorrect", - "required": "%s is required", - "invalid_syntax": "The syntax of %s is invalid.", + "required": "'{{param}}' is required", + "invalid_syntax": "The syntax of {{syntax}} is invalid.", "title_required": "Title is required.", "field_required": "{{target}} is required" } @@ -489,6 +490,8 @@ "title": "Knowledge Assistant", "title_beta_label": "(Beta)", "placeholder": "Ask me anything.", + "summary_mode_label": "Summary mode", + "summary_mode_help": "Concise answer within 2-3 sentences", "caution_against_hallucination": "Please verify the information and check the sources.", "progress_label": "Generating answers", "failed_to_create_or_retrieve_thread": "Failed to create or retrieve thread", @@ -612,7 +615,7 @@ "alert_desc1": "On this page, you can select pages with the checkbox and batch convert to the new v5 compatible format from the \"Bulk operation\" button at the top of the screen.", "nopages_title": "Congratulations. Ready to use GROWI v5!", "nopages_desc1": "Now all the pages you can manage seem to be in v5 compatible format.", - "detail_info": "See the detail information from Upgrading GROWI to v5.0.x external_link.", + "detail_info": "See the detail information from Upgrading GROWI to v5.0.x external_link.", "modal": { "title": "Convert to new v5 compatible format", "converting_pages": "Converting pages", diff --git a/apps/app/public/static/locales/fr_FR/admin.json b/apps/app/public/static/locales/fr_FR/admin.json index a51af4d0689..cc9c70d0d38 100644 --- a/apps/app/public/static/locales/fr_FR/admin.json +++ b/apps/app/public/static/locales/fr_FR/admin.json @@ -199,9 +199,9 @@ "id_detail": "Specification of the name of attribute which can identify the user in OIDC claims", "username_detail": "Spécifications des liaisons username lors de la création de nouveaux utilisateurs", "name_detail": "Spécifications des liaisons name lors de la création de nouveaux utilisateurs", - "mapping_detail": "Spécifications des liaisons pour %s lors de la création de nouveaux utilisateurs", + "mapping_detail": "Spécifications des liaisons pour {{target}} lors de la création de nouveaux utilisateurs", "register_1": "Contacter votre administrateur OIDC", - "register_2": "Configurer l'application OAuth avec l'un des URL de redirection autorisés avec %s", + "register_2": "Configurer l'application OAuth avec l'un des URL de redirection autorisés avec {{url}}", "register_3": "Copier l'ID client et Secret client ci-dessus", "updated_oidc": "Paramètres mis à jour", "Use discovered URL if empty": "Use discovered URL from \"Issuer Host\" if empty" @@ -1139,7 +1139,7 @@ }, "ai_integration": { "ai_integration": "Intégration de l'IA", - "disable_mode_explanation": "Actuellement, l'intégration de l'IA est désactivée. Pour l'activer, veuillez définir la variable d'environnement AI_ENABLED sur true", + "disable_mode_explanation": "Actuellement, l'intégration AI est désactivée. Pour l'activer, configurez la variable d'environnement AI_ENABLED ainsi que les autres variables nécessaires.

Pour plus de détails, veuillez consulter la documentation.", "ai_search_management": "Gestion de la recherche par l'IA", "rebuild_vector_store": "Reconstruire le magasin Vector", "rebuild_vector_store_label": "Reconstruire", diff --git a/apps/app/public/static/locales/fr_FR/commons.json b/apps/app/public/static/locales/fr_FR/commons.json index 84ca40faa19..5adcd94a0a8 100644 --- a/apps/app/public/static/locales/fr_FR/commons.json +++ b/apps/app/public/static/locales/fr_FR/commons.json @@ -61,7 +61,8 @@ "no_notification": "Vous n'avez pas de notifications.", "all": "Toutes", "unopend": "Non-lues", - "mark_all_as_read": "Tout marquer comme lu" + "mark_all_as_read": "Tout marquer comme lu", + "no_unread_messages": "aucun message non lu" }, "personal_dropdown": { diff --git a/apps/app/public/static/locales/fr_FR/translation.json b/apps/app/public/static/locales/fr_FR/translation.json index 8165929b5bb..1265ea61c1a 100644 --- a/apps/app/public/static/locales/fr_FR/translation.json +++ b/apps/app/public/static/locales/fr_FR/translation.json @@ -30,7 +30,7 @@ "Tags": "Étiquettes", "Close": "Fermer", "Shortcuts": "Raccourcis", - "CustomSidebar": "Navigation latérale", + "Custom Sidebar": "Navigation latérale", "eg": "e.g.", "add": "Ajouter", "Undo": "Annuler", @@ -117,7 +117,7 @@ "Create under": "Créer la page sous:", "V5 Page Migration": "Convertir vers la V5", "GROWI.5.0_new_schema": "Nouveau schéma GROWI.5.0", - "See_more_detail_on_new_schema": "Plus de détails sur {{title}} ", + "See_more_detail_on_new_schema": "Plus de détails sur {{title}}external_link ", "external_account_management": "Gestion des comptes externes", "UserGroup": "Groupe utilisateur", "Basic Settings": "Paramètres de base", @@ -157,10 +157,11 @@ "duplicated_path": "Chemin dupliqué", "Link sharing is disabled": "Le partage est désactivé", "successfully_saved_the_page": "Page sauvegardée", - "you_can_not_create_page_with_this_name": "Vous ne pouvez pas créer cette page", + "you_can_not_create_page_with_this_name_or_hierarchy": "Vous ne pouvez pas créer de page avec ce nom ou cette hiérarchie de pages", "not_allowed_to_see_this_page": "Vous ne pouvez pas voir cette page", "Confirm": "Confirmer", "Successfully requested": "Demande envoyée.", + "source": "Source", "input_validation": { "target": { "page_name": "Nom de la page", @@ -169,8 +170,8 @@ }, "message": { "error_message": "Des champs sont invalides", - "required": "%s est requis", - "invalid_syntax": "La syntaxe de %s est invalide.", + "required": "'{{param}}' est requis", + "invalid_syntax": "La syntaxe de {{syntax}} est invalide.", "title_required": "Titre requis.", "field_required": "{{target}} est requis" } @@ -483,6 +484,8 @@ "title": "Assistant de Connaissance", "title_beta_label": "(Bêta)", "placeholder": "Demandez-moi n'importe quoi.", + "summary_mode_label": "Mode résumé", + "summary_mode_help": "Réponse concise en 2-3 phrases", "caution_against_hallucination": "Veuillez vérifier les informations et consulter les sources.", "progress_label": "Génération des réponses", "failed_to_create_or_retrieve_thread": "Échec de la création ou de la récupération du fil de discussion", @@ -605,7 +608,7 @@ "alert_desc1": "Sélectionner les pages à convertir vers le format V5 avec le bouton \"Opération de masse\".", "nopages_title": "GROWI V5 est maintenant utilisable!", "nopages_desc1": "Toutes les pages ont été converties au format V5.", - "detail_info": "Pour plus de détails, voir Convertir vers GROWI v5.0.x external_link.", + "detail_info": "Pour plus de détails, voir Convertir vers GROWI v5.0.x external_link.", "modal": { "title": "Convertir au format V5", "converting_pages": "Conversion des pages", diff --git a/apps/app/public/static/locales/ja_JP/admin.json b/apps/app/public/static/locales/ja_JP/admin.json index 25926123f38..5fb96fa1b22 100644 --- a/apps/app/public/static/locales/ja_JP/admin.json +++ b/apps/app/public/static/locales/ja_JP/admin.json @@ -210,7 +210,7 @@ "name_detail": "新規ユーザー名(name)に関連付ける属性", "mapping_detail": "新規ユーザーの{{target}}に関連付ける属性", "register_1": "OIDC IdP Administrator へ接続します。", - "register_2": "OIDCアプリの認証コールバックURLを%sとして登録します。", + "register_2": "OIDCアプリの認証コールバックURLを{{url}}として登録します。", "register_3": "上記のClientIDとClient Secretをコピー&ペーストしてください。", "updated_oidc": "OpenID Connect を更新しました", "Use discovered URL if empty": "データベース側の値が空の場合、\"Issuer Host\"から検出した値を利用します。" @@ -1150,7 +1150,7 @@ }, "ai_integration": { "ai_integration": "AI 連携", - "disable_mode_explanation": "現在、AI 連携は無効になっています。有効にする場合は環境変数 AI_ENABLED を true に設定してください。", + "disable_mode_explanation": "現在、AI 連携は無効になっています。有効にする場合は環境変数 AI_ENABLED の他、必要な環境変数を設定してください。

詳細はドキュメントを参照してください。", "ai_search_management": "AI 検索管理", "rebuild_vector_store": "Vector Store のリビルド", "rebuild_vector_store_label": "リビルド", diff --git a/apps/app/public/static/locales/ja_JP/commons.json b/apps/app/public/static/locales/ja_JP/commons.json index f4031699aae..f141182eaca 100644 --- a/apps/app/public/static/locales/ja_JP/commons.json +++ b/apps/app/public/static/locales/ja_JP/commons.json @@ -64,6 +64,7 @@ "all": "全て", "unopend": "未読", "mark_all_as_read": "全て既読にする", + "no_unread_messages": "未読はありません", "only_unread": "未読のみ" }, diff --git a/apps/app/public/static/locales/ja_JP/translation.json b/apps/app/public/static/locales/ja_JP/translation.json index d508186dd4e..7706b524058 100644 --- a/apps/app/public/static/locales/ja_JP/translation.json +++ b/apps/app/public/static/locales/ja_JP/translation.json @@ -30,7 +30,7 @@ "Tags": "タグ", "Close": "閉じる", "Shortcuts": "ショートカット", - "CustomSidebar": "カスタムサイドバー", + "Custom Sidebar": "カスタムサイドバー", "eg": "例:", "add": "追加", "Undo": "元に戻す", @@ -116,7 +116,7 @@ "Create under": "ページを以下に作成", "V5 Page Migration": "V5 互換形式 への変換", "GROWI.5.0_new_schema": "GROWI.5.0における新スキーマについて", - "See_more_detail_on_new_schema": "詳しくは{{title}}external_linkを参照ください。", + "See_more_detail_on_new_schema": "詳しくは{{title}}external_linkを参照ください。", "external_account_management": "外部アカウント管理", "UserGroup": "グループ", "Basic Settings": "基本設定", @@ -158,10 +158,11 @@ "duplicated_path": "重複したパス", "Link sharing is disabled": "リンクのシェアは無効化されています", "successfully_saved_the_page": "ページが正常に保存されました", - "you_can_not_create_page_with_this_name": "この名前でページを作成することはできません", + "you_can_not_create_page_with_this_name_or_hierarchy": "この名前、または階層でページを作成することはできません", "not_allowed_to_see_this_page": "このページは閲覧できません", "Confirm": "確認", "Successfully requested": "正常に処理を受け付けました", + "source": "出典", "input_validation": { "target": { "page_name": "ページ名", @@ -170,8 +171,8 @@ }, "message": { "error_message": "いくつかの値が設定されていません", - "required": "%sに値を入力してください", - "invalid_syntax": "%sの構文が不正です", + "required": "'{{param}}' に値を入力してください", + "invalid_syntax": "{{syntax}} の構文が不正です", "title_required": "タイトルを入力してください", "field_required": "{{target}}に値を入力してください" } @@ -522,6 +523,8 @@ "title": "ナレッジアシスタント", "title_beta_label": "(ベータ)", "placeholder": "ききたいことを入力してください", + "summary_mode_label": "要約モード", + "summary_mode_help": "2~3文以内の簡潔な回答", "caution_against_hallucination": "情報が正しいか出典を確認しましょう", "progress_label": "回答を生成しています", "failed_to_create_or_retrieve_thread": "スレッドの作成または取得に失敗しました", @@ -644,7 +647,7 @@ "alert_desc1": "このページでは、チェックボックスでページを選択し、画面上部の「一括操作」ボタンから新しい v5 互換形式に一括変換できます。", "nopages_title": "おめでとうございます。GROWI v5 を使う準備が完了しました!", "nopages_desc1": "今あなたが管理可能なページはすべて v5 互換形式になっているようです。", - "detail_info": "詳しくは GROWI v5.0.x へのアップグレード external_link を参照ください。", + "detail_info": "詳しくは GROWI v5.0.x へのアップグレード external_link を参照ください。", "modal": { "title": "新しい v5 互換形式への変換", "converting_pages": "以下のページを変換します", diff --git a/apps/app/public/static/locales/zh_CN/admin.json b/apps/app/public/static/locales/zh_CN/admin.json index 0fdfaa85b83..a11a2511d17 100644 --- a/apps/app/public/static/locales/zh_CN/admin.json +++ b/apps/app/public/static/locales/zh_CN/admin.json @@ -208,9 +208,9 @@ "id_detail": "Specification of the name of attribute which can identify the user in OIDC claims", "username_detail": "Specification of mappings for username when creating new users", "name_detail": "Specification of mappings for name when creating new users", - "mapping_detail": "Specification of mappings for %s when creating new users", + "mapping_detail": "Specification of mappings for {{target}} when creating new users", "register_1": "Contact to OIDC IdP Administrator", - "register_2": "Register your OIDC App with \"Authorization callback URL\" as %s", + "register_2": "Register your OIDC App with \"Authorization callback URL\" as {{url}}", "register_3": "Copy and paste your ClientID and Client Secret above", "updated_oidc": "Succeeded to update OpenID Connect", "Use discovered URL if empty": "Use discovered URL from \"Issuer Host\" if empty" @@ -1149,7 +1149,7 @@ }, "ai_integration": { "ai_integration": "AI 集成", - "disable_mode_explanation": "目前,AI 集成已禁用。要启用它,请将环境变量 AI_ENABLED 设置为 true", + "disable_mode_explanation": "目前,AI 集成已被禁用。若要启用,请配置 AI_ENABLED 环境变量以及其他必要的变量。

详细信息请参考文档。", "ai_search_management": "AI 搜索管理", "rebuild_vector_store": "重建矢量商店", "rebuild_vector_store_label": "重建", diff --git a/apps/app/public/static/locales/zh_CN/commons.json b/apps/app/public/static/locales/zh_CN/commons.json index 6f2f7aa8907..f630125446d 100644 --- a/apps/app/public/static/locales/zh_CN/commons.json +++ b/apps/app/public/static/locales/zh_CN/commons.json @@ -65,6 +65,7 @@ "all": "全部", "unopend": "未读", "mark_all_as_read" : "标记为已读", + "no_unread_messages": "no_unread_messages", "only_unread": "Only unread" }, diff --git a/apps/app/public/static/locales/zh_CN/translation.json b/apps/app/public/static/locales/zh_CN/translation.json index df7710e95f0..82521506bc3 100644 --- a/apps/app/public/static/locales/zh_CN/translation.json +++ b/apps/app/public/static/locales/zh_CN/translation.json @@ -30,7 +30,7 @@ "Tags": "标签", "Close": "Close", "Shortcuts": "快捷方式", - "CustomSidebar": "Custom Sidebar", + "Custom Sidebar": "Custom Sidebar", "eg": "e.g.", "add": "添加", "Undo": "撤销", @@ -122,7 +122,7 @@ "Create under": "Create page under below:", "V5 Page Migration": "转换为V5的兼容性", "GROWI.5.0_new_schema": "GROWI.5.0 new schema", - "See_more_detail_on_new_schema": "更多详情请见 {{title}} external_link ", + "See_more_detail_on_new_schema": "更多详情请见 {{title}} external_link ", "Markdown Settings": "Markdown设置", "external_account_management": "外部账户管理", "UserGroup": "用户组", @@ -163,11 +163,12 @@ "duplicated_path": "Duplicated path", "Link sharing is disabled": "你不允许分享该链接", "successfully_saved_the_page": "成功地保存了该页面", - "you_can_not_create_page_with_this_name": "您无法使用此名称创建页面", + "you_can_not_create_page_with_this_name_or_hierarchy": "您無法使用此名稱或頁面層級建立頁面", "not_allowed_to_see_this_page": "你不能看到这个页面", "Confirm": "确定", "Successfully requested": "进程成功接受", "copied_to_clipboard": "它已复制到剪贴板。", + "source": "消息来源", "input_validation": { "target": { "page_name": "页面名称", @@ -176,8 +177,8 @@ }, "message": { "error_message": "有些值不正确", - "required": "%s 是必需的", - "invalid_syntax": "%s的语法无效。", + "required": "'{{param}}' 是必需的", + "invalid_syntax": "{{syntax}} 的语法无效。", "title_required": "标题是必需的。", "field_required": "{{target}} 是必需的" } @@ -478,6 +479,8 @@ "title": "知识助手", "title_beta_label": "(测试版)", "placeholder": "问我任何问题。", + "summary_mode_label": "摘要模式", + "summary_mode_help": "简洁回答在2-3句话内", "caution_against_hallucination": "请核实信息并检查来源。", "progress_label": "生成答案中", "failed_to_create_or_retrieve_thread": "创建或获取线程失败", @@ -614,7 +617,7 @@ "alert_desc1": "在这一页,你可以用复选框选择页面,并通过屏幕上方的批量操作按钮批量转换为新的v5兼容格式。", "nopages_title": "恭喜你。准备使用GROWI v5!", "nopages_desc1": "现在你能管理的所有页面似乎都是v5兼容的格式。", - "detail_info": "请参见 升级GROWI到v5.0.x external_link.的详细内容。", + "detail_info": "请参见 升级GROWI到v5.0.x external_link.的详细内容。", "modal": { "title": "转换为新的v5兼容格式", "converting_pages": "转换页面", diff --git a/apps/app/resource/fonts/MaterialSymbolsOutlined-opsz,wght,FILL@20..48,300,0..1.woff2 b/apps/app/resource/fonts/MaterialSymbolsOutlined-opsz,wght,FILL@20..48,300,0..1.woff2 index c632f72f366..b67d0ee13c7 100644 Binary files a/apps/app/resource/fonts/MaterialSymbolsOutlined-opsz,wght,FILL@20..48,300,0..1.woff2 and b/apps/app/resource/fonts/MaterialSymbolsOutlined-opsz,wght,FILL@20..48,300,0..1.woff2 differ diff --git a/apps/app/resource/fonts/PressStart2P-latin.woff2 b/apps/app/resource/fonts/PressStart2P-latin.woff2 index 395a0981513..7c2c6ff7520 100644 Binary files a/apps/app/resource/fonts/PressStart2P-latin.woff2 and b/apps/app/resource/fonts/PressStart2P-latin.woff2 differ diff --git a/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-jis2.woff2 b/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-jis2.woff2 index aaa304e929d..f6d12deff7e 100644 Binary files a/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-jis2.woff2 and b/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-jis2.woff2 differ diff --git a/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-main.woff2 b/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-main.woff2 index 792669f4246..20c00c7094c 100644 Binary files a/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-main.woff2 and b/apps/app/resource/fonts/SourceHanCodeJP-Regular-subset-main.woff2 differ diff --git a/apps/app/resource/locales/en_US/sandbox-markdown.md b/apps/app/resource/locales/en_US/sandbox-markdown.md new file mode 100644 index 00000000000..236fd2dac5c --- /dev/null +++ b/apps/app/resource/locales/en_US/sandbox-markdown.md @@ -0,0 +1,247 @@ +# Alerts + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. +``` + +You can also use [directive syntax](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444). + +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: + +```markdown +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: +``` + + +# Quote text +- Use quoted expressions by putting `>` at the beginning of the paragraph + - Multiple quotations can be expressed by using a sequence of `>` characters +- Lists and other elements can be used together within the blockquotes + +#### Example +> - Quotation +> - Quotation +>> Multiple quotations need to insert more `>` + +```markdown +> - Quotation +> - Quotation +>> Multiple quotations need to insert more `>` +``` + + +# Code +- It is possible to express the code by adding it in three `` ` `` + +#### Example + +```markdown +Add codes here + +Line breaks and paragraphs can be reflected in the code as-is +``` + +#### Example (source code) + +```javascript:mersenne-twister.js +function MersenneTwister(seed) { + if (arguments.length == 0) { + seed = new Date().getTime(); + } + + this._mt = new Array(624); + this.setSeed(seed); +} +``` + +## Inline Code +- Enclose words in `` ` `` to make inline code + +#### Example +Here is the `inline code` + + + +# Task List +- Insert an unchecked checkbox list by writing `[] ` + - Check the checkbox by writing `[x]` + +#### Example +- [ ] Task 1 + - [x] Task 1-1 + - [ ] Task 1-2 +- [x] Task 2 + + +# Horizontal lines +- Insert the horizontal line with three or more consecutive asterisks `*` or underscores `_` + +#### Example +Below is a horizontal line +*** + +Below is a horizontal line +___ + +```markdown +Below is a horizontal line +*** + +Below is a horizontal line +___ +``` + + +# Footnotes + +You can add footnotes to your content by using this bracket syntax: + +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. + +```markdown +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. +``` + + +# emoji + +You can add emojis to your text by typing the emoji name after a colon `:`. + +- :+1: GOOD! +- :white_check_mark: Check +- :lock: Lock + +When you type two or more characters after the colon, an emoji suggestion list will appear. This list will narrow down as you continue typing. Once you find the emoji you are looking for, press Tab or Enter to insert the highlighted emoji. + +For a list of available emojis, refer to the "[Emoji Cheat Sheet](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md)". + + +# Table +### General syntax +#### Example + +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | + +```markdown +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | +``` + +### CSV / TSV + +#### Example + +``` tsv +Content Cell Content Cell +Content Cell Content Cell +``` + +~~~ +``` csv +Content Cell,Content Cell +Content Cell,Content Cell +``` +~~~ + +~~~ +``` tsv +Content Cell Content Cell +Content Cell Content Cell +``` +~~~ + + +### CSV / TSV (with header) + + +#### Example + +``` tsv-h +First Header Second Header +Content Cell Content Cell +Content Cell Content Cell +``` + +~~~ +``` csv-h +First Header,Second Header +Content Cell,Content Cell +Content Cell,Content Cell +``` +~~~ + +~~~ +``` tsv-h +First Header Second Header +Content Cell Content Cell +Content Cell Content Cell +``` +~~~ + + diff --git a/apps/app/resource/locales/en_US/sandbox.md b/apps/app/resource/locales/en_US/sandbox.md index bb9e2348b73..98d48784b31 100644 --- a/apps/app/resource/locales/en_US/sandbox.md +++ b/apps/app/resource/locales/en_US/sandbox.md @@ -1,6 +1,39 @@ -# What is Sandbox? -- On this page, you will find tips that help you to master GROWI -- Feel free to enrich the content of your pages with the references under this page hierarchy +# Welcome to the GROWI Sandbox! + +> [!NOTE] +> **What is a Sandbox?** +> +> This is a practice page that you can freely edit. It's the perfect place to try new things! + + +## :beginner: For Beginners + +With GROWI, you can easily create visually appealing pages using a notation called "Markdown". +By using Markdown, you can do things like this! + +- Emphasize text with **bold** or *italic* +- Create bulleted or numbered lists +- [Insert links](#-link) +- Create tables +- Add code blocks + +Various other decorations are also possible. + +## Let's Try It! + +1. Feel free to edit this page +1. There's no need to fear making mistakes +1. You can always revert changes +1. You can also learn from others' edits + +> [!IMPORTANT] +> **For Administrators** +> +> The sandbox is an important place for learning: +> - As a first step for new members to get used to GROWI +> - As a practice ground for Markdown +> - As a communication tool within the team +> - Even if this page becomes cluttered, it is a sign of active learning. Regular cleanups are good, but it is recommended to maintain its nature as a free experimentation space. # :closed_book: Headings & Paragraphs @@ -45,66 +78,24 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -## Horizontal lines -- Insert the horizontal line with three or more consecutive asterisks `*` or underscores `_` - -#### Example -Below is a horizontal line -*** -Below is a horizontal line -___ +# :blue_book: Styling Text -```markdown -Below is a horizontal line -*** - -Below is a horizontal line -___ -``` - - -# :green_book: Styling Text - Various styles can be applied to enrich the textual expression of a sentence - - These styles also can be easily applied by selecting the toolbar icon at the bottom of the Edit screen - -## Italic -- Enclose the text with an asterisk `*` or an underscore `_`. - -#### Examples -- This sentence indicates emphasis with *Italic* -- This sentence indicates emphasis with _Italic_ - -```markdown -- This sentence indicates emphasis with *Italic* -- This sentence indicates emphasis with _Italic_ -``` + - These styles can also be easily applied by selecting the toolbar icon at the bottom of the Edit screen -## Bold -- Enclose the text with two asterisks `*` or two underscores `_` +| Style | Syntax | Keyboard Shortcut | Example | Output | +| ------------------------- | ---------------------- | ----------------- | ----------------------------------------- | -------------------------------------- | +| Bold | `** **` or `__ __` | (TBD) | `**This is bold text**` | **This is bold text** | +| Italic | `* *` or `_ _` | (TBD) | `_This text is italicized_` | *This text is italicized* | +| Strikethrough | `~~ ~~` | (TBD) | `~~This was mistaken text~~` | ~~This was mistaken text~~ | +| Bold and nested italic | `** **` and `_ _` | None | `**This text is _extremely_ important**` | **This text is _extremely_ important** | +| All Bold and Italic | `*** ***` | None | `***All this text is important***` | ***All this text is important*** | +| Subscript | ` ` | None | `This is a subscript text` | This is a subscript text | +| Superscript | ` ` | None | `This is a superscript text` | This is a superscript text | -#### Example -- This sentence indicates emphasis with **Bold** -- This sentence indicates emphasis with __Bold__ - -```markdown -- This sentence indicates emphasis with **Bold** -- This sentence indicates emphasis with __Bold__ -``` - -## Italic & Bold -- Enclose the text with three asterisks `*` or three underscores `_` -#### Example -- This sentence indicates emphasis with ***Italic & Bold*** -- This sentence indicates emphasis witH ___Italic & Bold___ - -```markdown -- This sentence indicates emphasis with ***Italic & Bold*** -- This sentence indicates emphasis witH ___Italic & Bold___ -``` - -# :orange_book: Insert Lists +# :green_book: Insert Lists ## Bulleted List - Insert a bulleted list by starting a line with a hyphen `-`, a plus `+`, or an asterisk `*` @@ -131,18 +122,8 @@ ___ 1. This sentence is present in the bulleted list - This sentence is present in the bulleted list -## Task List -- Insert an unchecked checkbox list by writing `[] ` - - Check the checkbox by writing `[x]` -#### Example -- [ ] Task 1 - - [x] Task 1-1 - - [ ] Task 1-2 -- [x] Task 2 - - -# :blue_book: Link +# :ledger: Link ## Auto link Just write the URL and the link will be generated automatically. @@ -181,140 +162,16 @@ Flexible link syntax make it easy to write a link by page path, a relative page - [[How to write formulas?>./Math]] ``` -# :notebook: Others -## Blockquotes -- Use quoted expressions by putting `>` at the beginning of the paragraph - - Multiple quotations can be expressed by using a sequence of `>` characters -- Lists and other elements can be used together within the blockquotes - -#### Example -> - Quotation -> - Quotation ->> Multiple quotations need to insert more `>` - -```markdown -> - Quotation -> - Quotation ->> Multiple quotations need to insert more `>` -``` - -## Code -- It is possible to express the code by adding it in three `` ` `` - -#### Example - -```markdown -Add codes here - -Line breaks and paragraphs can be reflected in the code as-is -``` - -#### Example (source code) - -```javascript:mersenne-twister.js -function MersenneTwister(seed) { - if (arguments.length == 0) { - seed = new Date().getTime(); - } - - this._mt = new Array(624); - this.setSeed(seed); -} -``` - -## Inline Code -- Enclose words in `` ` `` to make inline code - -#### Example -Here is the `inline code` - - -## Table - -### General syntax - -#### Example - -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | - -```markdown -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | -``` - -### CSV / TSV - -#### Example - -``` tsv -Content Cell Content Cell -Content Cell Content Cell -``` - -~~~ -``` csv -Content Cell,Content Cell -Content Cell,Content Cell -``` -~~~ - -~~~ -``` tsv -Content Cell Content Cell -Content Cell Content Cell -``` -~~~ - - -### CSV / TSV (with header) - - -#### Example - -``` tsv-h -First Header Second Header -Content Cell Content Cell -Content Cell Content Cell -``` - -~~~ -``` csv-h -First Header,Second Header -Content Cell,Content Cell -Content Cell,Content Cell -``` -~~~ - -~~~ -``` tsv-h -First Header Second Header -Content Cell Content Cell -Content Cell Content Cell -``` -~~~ - -# :ledger: More Applications -- [Bootstrap](/Sandbox/Bootstrap) +# :notebook: More Applications -- [Diagrams](/Sandbox/Diagrams) +- [Learn more about Markdown](/Sandbox/Markdown) -- [Math](/Sandbox/Math) +- [Further decorate your page (Bootstrap5)](/Sandbox/Bootstrap5) +- [How to represent diagrams (Diagrams)](/Sandbox/Diagrams) +- [How to represent mathematical formulas (Math)](/Sandbox/Math) diff --git a/apps/app/resource/locales/fr_FR/sandbox-markdown.md b/apps/app/resource/locales/fr_FR/sandbox-markdown.md new file mode 100644 index 00000000000..af073ea4213 --- /dev/null +++ b/apps/app/resource/locales/fr_FR/sandbox-markdown.md @@ -0,0 +1,246 @@ +# Alerts + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. +``` + +Vous pouvez également utiliser la [syntaxe de directive](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444). + +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: + +```markdown +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: +``` + + +# Autres +## Citations +- Utilisez des expressions entre guillemets en mettant `>` au début du paragraphe + - Plusieurs citations peuvent être exprimées en utilisant une séquence de caractères `>` +- Des listes et d'autres éléments peuvent être utilisés ensemble dans les citations + +#### Exemple +> - Citation +> - Citation +>> Plusieurs citations doivent insérer plus de `>` + +```markdown +> - Citation +> - Citation +>> Plusieurs citations doivent insérer plus de `>` +``` + +# Code +- Il est possible d'exprimer le code en l'ajoutant en trois `` ` `` + +#### Exemple + +```markdown +Ajoutez des codes ici + +Les sauts de ligne et les paragraphes peuvent être reflétés dans le code tel quel +``` + +#### Exemple (code source) + +```javascript:mersenne-twister.js +function MersenneTwister(seed) { + if (arguments.length == 0) { + seed = new Date().getTime(); + } + + this._mt = new Array(624); + this.setSeed(seed); +} +``` + +## Code en ligne +- Entourez les mots de `` ` `` pour créer du code en ligne + +#### Exemple +Voici le `code en ligne` + + + +# Liste des tâches +- Insérer une liste de cases à cocher non cochées en écrivant `[]` + - Cocher la case à cocher en écrivant `[x]` + +#### Exemple +- [ ] Tâche 1 + - [x] Tâche 1-1 + - [ ] Tâche 1-2 +- [x] Tâche 2 + + +# Lignes horizontales +- Insérer la ligne horizontale avec trois astérisques consécutifs ou plus `*` ou des traits de soulignement `_` + +#### Exemple +Ci-dessous se trouve une ligne horizontale +*** + +Ci-dessous se trouve une ligne horizontale +___ + +```markdown +Ci-dessous se trouve une ligne horizontale +*** + +Ci-dessous se trouve une ligne horizontale +___ +``` + + +# Footnotes + +You can add footnotes to your content by using this bracket syntax: + +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. + +```markdown +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. +``` + + +# emoji + +Vous pouvez ajouter des emojis à votre texte en tapant le nom de l'emoji après un deux-points `:`. + +- :+1: BON! +- :white_check_mark: Vérifié +- :lock: Verrouillé + +Lorsque vous tapez deux caractères ou plus après le deux-points, une liste de suggestions d'emojis apparaîtra. Cette liste se réduira au fur et à mesure que vous continuez à taper. Une fois que vous avez trouvé l'emoji que vous recherchez, appuyez sur Tab ou Entrée pour insérer l'emoji sélectionné. + +Pour une liste des emojis disponibles, consultez le "[Emoji Cheat Sheet](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md)". + + +## Tableau + +### Syntaxe générale + +#### Exemple + +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | + +```markdown +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | +``` + +### CSV / TSV + +#### Exemple + +``` tsv +Cellule de contenu Cellule de contenu +Cellule de contenu Cellule de contenu +``` + +~~~ +``` csv +Cellule de contenu,Cellule de contenu +Cellule de contenu,Cellule de contenu +``` +~~~ + +~~~ +``` tsv +Cellule de contenu Cellule de contenu +Cellule de contenu Cellule de contenu +``` +~~~ + +### CSV / TSV (avec en-tête) + +#### Exemple + +``` tsv-h +Premier en-tête Deuxième en-tête +Cellule de contenu Cellule de contenu +Cellule de contenu Cellule de contenu +``` + +~~~ +``` csv-h +Premier en-tête Deuxième en-tête +Cellule de contenu,Cellule de contenu +Cellule de contenu,Cellule de contenu +``` +~~~ + +~~~ +``` tsv-h +Premier en-tête Deuxième en-tête +Cellule de contenu Cellule de contenu +Cellule de contenu Contenu Cellule +``` +~~~ + diff --git a/apps/app/resource/locales/fr_FR/sandbox.md b/apps/app/resource/locales/fr_FR/sandbox.md index 31275a315b7..ba47594408f 100644 --- a/apps/app/resource/locales/fr_FR/sandbox.md +++ b/apps/app/resource/locales/fr_FR/sandbox.md @@ -1,6 +1,40 @@ -# Qu'est-ce que Sandbox ? -- Sur cette page, vous trouverez des conseils qui vous aideront à maîtriser GROWI -- N'hésitez pas à enrichir le contenu de vos pages avec les références sous cette hiérarchie de pages +# Bienvenue dans le bac à sable GROWI ! + +> [!NOTE] +> **Qu'est-ce qu'un bac à sable ?** +> +> Ceci est une page de pratique que vous pouvez éditer librement. C'est l'endroit idéal pour essayer de nouvelles choses ! + + +## :beginner: Pour les débutants + +Avec GROWI, vous pouvez facilement créer des pages visuellement attrayantes en utilisant une notation appelée "Markdown". +En utilisant Markdown, vous pouvez faire des choses comme ça ! + +- Mettre en évidence du texte avec du **gras** ou de l'*italique* +- Créer des listes à puces ou numérotées +- [Insérer des liens](#-lien) +- Créer des tableaux +- Ajouter des blocs de code + +Diverses autres décorations sont également possibles. + +## Essayons-le ! + +1. N'hésitez pas à éditer cette page +1. Il n'y a pas besoin de craindre de faire des erreurs +1. Vous pouvez toujours revenir en arrière sur les modifications +1. Vous pouvez également apprendre des modifications des autres + +> [!IMPORTANT] +> **Pour les administrateurs** +> +> Le bac à sable est un lieu important pour l'apprentissage : +> - Comme première étape pour que les nouveaux membres s'habituent à GROWI +> - Comme terrain de pratique pour Markdown +> - Comme outil de communication au sein de l'équipe +> - Même si cette page devient encombrée, c'est un signe d'apprentissage actif. Des nettoyages réguliers sont bons, mais il est recommandé de maintenir sa nature d'espace d'expérimentation libre. + # :closed_book: Titres et paragraphes - En insérant des titres et des paragraphes, vous pouvez rendre le texte de la page plus facile à lire @@ -44,65 +78,23 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -## Lignes horizontales -- Insérer la ligne horizontale avec trois astérisques consécutifs ou plus `*` ou des traits de soulignement `_` -#### Exemple -Ci-dessous se trouve une ligne horizontale -*** - -Ci-dessous se trouve une ligne horizontale -___ - -```markdown -Ci-dessous se trouve une ligne horizontale -*** - -Ci-dessous se trouve une ligne horizontale -___ -``` - -# :green_book: Style du texte +# :blue_book: Style du texte - Différents styles peuvent être appliqués pour enrichir l'expression textuelle d'une phrase - Ces styles peuvent également être facilement appliqués en sélectionnant l'icône de la barre d'outils en bas de l'écran d'édition -## Italique -- Entourez le texte d'un astérisque `*` ou d'un trait de soulignement `_`. - -#### Exemples -- Cette phrase indique l'emphase avec *Italique* -- Cette phrase indique l'emphase avec _Italique_ +| Style | Syntax | Keyboard Shortcut | Example | Output | +| ------------------------- | ---------------------- | ----------------- | ----------------------------------------- | -------------------------------------- | +| Bold | `** **` or `__ __` | (TBD) | `**This is bold text**` | **This is bold text** | +| Italic | `* *` or `_ _` | (TBD) | `_This text is italicized_` | *This text is italicized* | +| Strikethrough | `~~ ~~` | (TBD) | `~~This was mistaken text~~` | ~~This was mistaken text~~ | +| Bold and nested italic | `** **` and `_ _` | None | `**This text is _extremely_ important**` | **This text is _extremely_ important** | +| All Bold and Italic | `*** ***` | None | `***All this text is important***` | ***All this text is important*** | +| Subscript | ` ` | None | `This is a subscript text` | This is a subscript text | +| Superscript | ` ` | None | `This is a superscript text` | This is a superscript text | -```markdown -- Cette phrase indique l'emphase avec *Italique* -- Cette phrase indique l'emphase avec _Italique_ -``` -## Gras -- Entourez le texte de deux astérisques `*` ou de deux traits de soulignement `_` - -#### Exemple -- Cette phrase indique l'emphase avec **Gras** -- Cette phrase indique l'emphase avec __Gras__ - -```markdown -- Cette phrase indique l'emphase avec **Gras** -- Cette phrase indique l'emphase avec __Gras__ -``` - -## Italique et Gras -- Entourez le texte de trois astérisques `*` ou de trois traits de soulignement `_` - -#### Exemple -- Cette phrase indique l'emphase avec ***Italique et Gras*** -- Cette phrase indique l'emphase avec ___Italique et Gras___ - -```markdown -- Cette phrase indique l'emphase avec ***Italique et gras*** -- Cette phrase indique l'emphase avec ___Italique et gras___ -``` - -# :orange_book: Insérer des listes +# :green_book: Insérer des listes ## Liste à puces - Insérer une liste à puces en commençant une ligne par un trait d'union `-`, un plus `+` ou un astérisque `*` @@ -129,17 +121,8 @@ ___ 1. Cette phrase est présente dans la liste à puces - Cette phrase est présente dans la liste à puces -## Liste des tâches -- Insérer une liste de cases à cocher non cochées en écrivant `[]` - - Cocher la case à cocher en écrivant `[x]` -#### Exemple -- [ ] Tâche 1 - - [x] Tâche 1-1 - - [ ] Tâche 1-2 -- [x] Tâche 2 - -# :blue_book: Lien +# :ledger: Lien ## Lien automatique Il suffit d'écrire l'URL et le lien sera généré automatiquement. @@ -178,131 +161,12 @@ La syntaxe de lien flexible permet d'écrire facilement un lien par chemin de pa - [[Comment écrire des formules ?>./Math]] ``` -# :notebook: Autres -## Citations -- Utilisez des expressions entre guillemets en mettant `>` au début du paragraphe -- Plusieurs citations peuvent être exprimées en utilisant une séquence de caractères `>` -- Des listes et d'autres éléments peuvent être utilisés ensemble dans les citations - -#### Exemple -> - Citation -> - Citation ->> Plusieurs citations doivent insérer plus de `>` - -```markdown -> - Citation -> - Citation ->> Plusieurs citations doivent insérer plus de `>` -``` - -## Code -- Il est possible d'exprimer le code en l'ajoutant en trois `` ` `` - -#### Exemple - -```markdown -Ajoutez des codes ici - -Les sauts de ligne et les paragraphes peuvent être reflétés dans le code tel quel -``` - -#### Exemple (code source) - -```javascript:mersenne-twister.js -function MersenneTwister(seed) { - if (arguments.length == 0) { - seed = new Date().getTime(); - } - - this._mt = new Array(624); - this.setSeed(seed); -} -``` - -## Code en ligne -- Entourez les mots de `` ` `` pour créer du code en ligne - -#### Exemple -Voici le `code en ligne` - -## Tableau -### Syntaxe générale - -#### Exemple - -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | - -```markdown -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | -``` - -### CSV / TSV - -#### Exemple - -``` tsv -Cellule de contenu Cellule de contenu -Cellule de contenu Cellule de contenu -``` - -~~~ -``` csv -Cellule de contenu,Cellule de contenu -Cellule de contenu,Cellule de contenu -``` -~~~ - -~~~ -``` tsv -Cellule de contenu Cellule de contenu -Cellule de contenu Cellule de contenu -``` -~~~ - -### CSV / TSV (avec en-tête) - -#### Exemple - -``` tsv-h -Premier en-tête Deuxième en-tête -Cellule de contenu Cellule de contenu -Cellule de contenu Cellule de contenu -``` - -~~~ -``` csv-h -Premier en-tête Deuxième en-tête -Cellule de contenu,Cellule de contenu -Cellule de contenu,Cellule de contenu -``` -~~~ - -~~~ -``` tsv-h -Premier en-tête Deuxième en-tête -Cellule de contenu Cellule de contenu -Cellule de contenu Contenu Cellule -``` -~~~ +# :notebook: Autres applications +- [En savoir plus sur Markdown](/Sandbox/Markdown) -# :ledger: Autres applications -- [Bootstrap](/Sandbox/Bootstrap) +- [Décorez davantage votre page (Bootstrap5)](/Sandbox/Bootstrap5) -- [Diagrammes](/Sandbox/Diagrammes) +- [Comment représenter des diagrammes (Diagrams)](/Sandbox/Diagrams) -- [Math](/Sandbox/Math) \ No newline at end of file +- [Comment représenter des formules mathématiques (Math)](/Sandbox/Math) \ No newline at end of file diff --git a/apps/app/resource/locales/ja_JP/sandbox-markdown.md b/apps/app/resource/locales/ja_JP/sandbox-markdown.md new file mode 100644 index 00000000000..c524624edd7 --- /dev/null +++ b/apps/app/resource/locales/ja_JP/sandbox-markdown.md @@ -0,0 +1,234 @@ +# アラート + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. +``` + +[directive](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444) を使って記述することもできます。 + +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: + +```markdown +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: +``` + + +# テキストの引用 +- 行頭に `>` を記述することで引用表現を記述できます + - 多重引用の際は `>` を複数個連続で記述することで表現できます + +#### 例 +> - 引用符 +> - 引用符 +>> 複数の引用符にはさらに `>` を挿入する必要があります + +```markdown +> - 引用する文章が入ります +> - 引用する文章が入ります +>> 多重引用を表現するにはさらに `>` を挿入します +``` + + +# コード +- `` ` `` 3つで囲むことでコードの表現をすることが可能です + +#### 例 + +```markdown +ここにコードを追加 + +改行と段落はそのまま反映されます +``` +#### 例 (ソースコード) + +```javascript:mersenne-twister.js +function MersenneTwister(seed) { + if (arguments.length == 0) { + seed = new Date().getTime(); + } + + this._mt = new Array(624); + this.setSeed(seed); +} +``` + +## インライン コード +- `` ` `` で単語を囲むとインラインコードになります + +#### 例 +こちらは `インラインコード` です + + +# タスク リスト +- `[] ` を記述することでリストに対して未チェックのチェックボックスを挿入することができます + - `[x] ` を記述することでチェック済みのチェックボックスを挿入することができます + +#### 例 +- [ ] タスク 1 + - [x] タスク 1-1 + - [ ] タスク 1-2 +- [x] タスク2 + + +# 水平線 +- 3 つ以上の連続したアスタリスク `*` またはアンダースコア `_` で水平線を挿入します + +#### 例 +以下は水平線です +*** + +以下は水平線です +___ + +```markdown +以下は水平線です +*** + +以下は水平線です +___ +``` + + +# 脚注 +角かっこ構文を使用して、コンテンツに脚注を追加できます。 + +シンプルな脚注[^1]. + +複数行にわたる脚注も追加できます[^myfootnote2]. + +[^1]: 注記はこのように書きます. +[^myfootnote2]: 注記を改行するには、新しい行頭にで2つの連続したスペースをいれます。 + こちらが2行目です。 + + +```markdown +シンプルな脚注[^1]. + +複数行にわたる脚注も追加できます[^myfootnote2]. + +[^1]: 注記はこのように書きます. +[^myfootnote2]: 注記を改行するには、新しい行頭にで2つの連続したスペースをいれます。 + こちらが2行目です。 +``` + + +# 絵文字 + +`:EMOJICODE:` とコロンの後に絵文字の名前を入力することで、文章に絵文字を追加できます。 + +- :+1: GOOD! +- :white_check_mark: チェック +- :lock: 鍵マーク + +`:` に続いて2文字以上入力すると、絵文字のサジェストリストが表示されます。このリストは、入力を進めるにつれて絞り込まれていくので、探している絵文字が見つかり次第、Tab または Enter を押して、ハイライトされているものを入力してください。 + +使用可能な絵文字の一覧は、「[絵文字チートシート](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md)」を参照してください。 + + +# 表 +### Markdown 標準 +- Markdown で記載できる標準的な形式の表です + +#### 例 +| 左揃え | 右揃え | 中央揃え | +| :------------------- | -------------------: | :--------------------: | +| この列は | この列は | この列は | +| 左揃えで表示されます | 右揃えで表示されます | 中央揃えで表示されます | + +```markdown +| 左揃え | 右揃え | 中央揃え | +| :------------------- | -------------------: | :--------------------: | +| この列は | この列は | この列は | +| 左揃えで表示されます | 右揃えで表示されます | 中央揃えで表示されます | +``` + +### CSV / TSV +#### 例 + +``` tsv +10:00 集合 +10:20 移動 +``` + +~~~ +``` csv +11:00,MTG +12:00,昼食 +``` +~~~ + +~~~ +``` tsv +10:00 集合 +10:20 移動 +``` +~~~ + +### CSV / TSV(ヘッダー付き) +#### 例 +``` tsv-h +時間 行動 +10:00 集合 +10:20 移動 +``` + +~~~ +``` csv-h +時間,行動 +11:00,MTG +12:00,昼食 +``` +~~~ + +~~~ +``` tsv-h +時間 行動 +10:00 集合 +10:20 移動 +``` +~~~ + + + + diff --git a/apps/app/resource/locales/ja_JP/sandbox.md b/apps/app/resource/locales/ja_JP/sandbox.md index 0ec191e7669..2703f9dc42e 100644 --- a/apps/app/resource/locales/ja_JP/sandbox.md +++ b/apps/app/resource/locales/ja_JP/sandbox.md @@ -1,6 +1,40 @@ -# サンドボックスとは? -- このページでは、GROWI を使いこなすためのヒントを紹介します -- このページと下の階層にある参考記述を利用して、ページのコンテンツを充実させることができます +# GROWI の砂場へようこそ! + +> [!NOTE] +> **サンドボックスとは?** +> +> ここは自由に編集できる練習用のページです。新しいことを試すのに最適な場所です! + + +## :beginner: はじめての方へ + +GROWI では「マークダウン」という記法で簡単に見栄えの良いページを作ることができます。 +マークダウンを使うと、こんなことができます! + +- **太字**や*斜体*で文字を強調 +- 箇条書きや番号付きリストの作成 +- [リンクの挿入](#-リンク) +- 表の作成 +- コードブロックの追加 + +その他、様々な装飾が可能です。 + +## 試してみましょう! + +1. このページを自由に編集してください +1. 失敗を恐れる必要はありません +1. 元に戻すこともできます +1. 他の人の編集も参考になります + +> [!IMPORTANT] +> **管理者の方へ** +> +> 砂場は学習のための大切な場所です: +> - 新しいメンバーがGROWIに慣れるための第一歩として +> - マークダウンの練習場として +> - チーム内のコミュニケーションツールとして +> - このページが乱雑になっても、それは活発な学習の証です。定期的なクリーンアップは良いですが、自由な実験の場としての性質は維持することをおすすめします。 + # :closed_book: 見出しと段落 - 見出しと段落を挿入すると、ページ上のテキストを読みやすくすることができます @@ -46,65 +80,25 @@ またそのなかでいっしょになったたくさんのひとたち、ファゼーロとロザーロ、羊飼のミーロや、顔の赤いこどもたち、地主のテーモ、山猫博士のボーガント・デストゥパーゴなど、いまこの暗い巨きな石の建物のなかで考えていると、みんなむかし風のなつかしい青い幻燈のように思われます。 -## 水平線 -- 3 つ以上の連続したアスタリスク `*` またはアンダースコア `_` で水平線を挿入します - -#### 例 -以下は水平線です -*** -以下は水平線です -___ - -```markdown -以下は水平線です -*** -以下は水平線です -___ -``` - -# :green_book: テキストのスタイル設定 +# :blue_book: テキストのスタイル設定 - さまざまなスタイルを適用して、文章のテキスト表現を豊かにすることができます - これらのスタイルは、編集画面の下部にあるツールバー アイコンを選択して簡単に適用することもできます -## 斜体 -- テキストをアスタリスク `*` またはアンダースコア `_` で囲みます。 - -#### 例 -- この文は *斜体* で強調を示します -- この文は _斜体_ で強調を示します - -```markdown -- この文は *斜体* で強調を示します -- この文は _斜体_ で強調を示します -``` - -## 太字 -- テキストを 2 つのアスタリスク `*` または 2 つのアンダースコア `_` で囲みます - -#### 例 -- この文は **太字** で強調を示します -- この文は __太字__ で強調を示します - -```markdown -- この文は **太字** で強調を示します -- この文は __太字__ で強調を示します -``` - -## 斜体と太字 -- テキストを 3 つのアスタリスク `*` または 3 つのアンダースコア `_` で囲みます +| スタイル | 構文 | キーボードショートカット | 例 | 出力 | +| -------------------------- | ---------------------- | ------------------------ | ---------------------------------------- | -------------------------------------- | +| 太字 | `** **` または `__ __` | (準備中) | `**これは太字のテキストです**` | **これは太字のテキストです** | +| [斜体] | `* *` または `_ _` | (準備中) | `_このテキストは斜体です_` | *このテキストは斜体です* | +| 取り消し線 | `~~ ~~` | (準備中) | `~~これは間違ったテキストでした~~` | ~~これは間違ったテキストでした~~ | +| 太字および太字中にある斜体 | `** **` および `_ _` | なし | `**This text is _extremely_ important**` | **This text is _extremely_ important** | +| 全体が太字か斜体 | `*** ***` | なし | `***このテキストはすべて重要です***` | ***このテキストはすべて重要です*** | +| 下付き | ` ` | なし | `これは下付きテキストです` | これは下付きテキストです | +| 上付き | ` ` | なし | `これは上付きテキストです` | これは上付きテキストです | -#### 例 -- この文は ***斜体と太字*** で強調を示します -- この文は ___斜体と太字で強調を示します太字___ -```markdown -- この文は ***斜体 & 太字*** で強調を示します -- この文は ___斜体 & 太字___ で強調を示します -``` -# :orange_book: リストの挿入 +# :green_book: リストの挿入 ## 箇条書きリスト - ハイフン `-`、プラス `+`、アスタリスク `*` を行頭に記述することで、箇条書きのリストを挿入することでができます @@ -130,17 +124,9 @@ ___ 1. この文章は箇条書きリストで表現しています - この文章は箇条書きリストで表現しています -## タスク リスト -- `[] ` を記述することでリストに対して未チェックのチェックボックスを挿入することができます - - `[x] ` を記述することでチェック済みのチェックボックスを挿入することができます -#### 例 -- [ ] タスク 1 - - [x] タスク 1-1 - - [ ] タスク 1-2 -- [x] タスク2 -# :blue_book: リンク +# :ledger: リンク ## 自動リンク URL を記述するだけで、リンクが自動的に生成されます。 @@ -179,118 +165,11 @@ https://www.google.co.jp - [[数式の書き方は?>./Math]] ``` -# :notebook: その他 -## 引用符 -- 行頭に `>` を記述することで引用表現を記述できます - - 多重引用の際は `>` を複数個連続で記述することで表現できます - -#### 例 -> - 引用符 -> - 引用符 ->> 複数の引用符にはさらに `>` を挿入する必要があります - -```markdown -> - 引用する文章が入ります -> - 引用する文章が入ります ->> 多重引用を表現するにはさらに `>` を挿入します -``` - -## コード -- `` ` `` 3つで囲むことでコードの表現をすることが可能です - -#### 例 - -```markdown -ここにコードを追加 - -改行と段落はそのまま反映されます -``` -#### 例 (ソースコード) - -```javascript:mersenne-twister.js -function MersenneTwister(seed) { - if (arguments.length == 0) { - seed = new Date().getTime(); - } - - this._mt = new Array(624); - this.setSeed(seed); -} -``` - -## インライン コード -- `` ` `` で単語を囲むとインラインコードになります - -#### 例 -こちらは `インラインコード` です - - - -# :memo:表の挿入 -## Markdown 標準 -- Markdown で記載できる標準的な形式の表です - -#### 例 -| 左揃え | 右揃え | 中央揃え | -| :------------------- | -------------------: | :--------------------: | -| この列は | この列は | この列は | -| 左揃えで表示されます | 右揃えで表示されます | 中央揃えで表示されます | - -```markdown -| 左揃え | 右揃え | 中央揃え | -| :------------------- | -------------------: | :--------------------: | -| この列は | この列は | この列は | -| 左揃えで表示されます | 右揃えで表示されます | 中央揃えで表示されます | -``` - -### CSV / TSV -#### 例 - -``` tsv -10:00 集合 -10:20 移動 -``` - -~~~ -``` csv -11:00,MTG -12:00,昼食 -``` -~~~ - -~~~ -``` tsv -10:00 集合 -10:20 移動 -``` -~~~ +# :notebook: さらにアプリケーションを活用 -### CSV / TSV(ヘッダー付き) -#### 例 -``` tsv-h -時間 行動 -10:00 集合 -10:20 移動 -``` - -~~~ -``` csv-h -時間,行動 -11:00,MTG -12:00,昼食 -``` -~~~ - -~~~ -``` tsv-h -時間 行動 -10:00 集合 -10:20 移動 -``` -~~~ +- [もっとマークダウンについて学ぶ](/Sandbox/Markdown) -# :ledger: さらにアプリケーションを利用 -- [ページの装飾方法(Bootstrap5)](/Sandbox/Bootstrap5) +- [さらにページの装飾をする(Bootstrap5)](/Sandbox/Bootstrap5) - [図形の表現方法(Diagrams)](/Sandbox/Diagrams) diff --git a/apps/app/resource/locales/zh_CN/sandbox-markdown.md b/apps/app/resource/locales/zh_CN/sandbox-markdown.md new file mode 100644 index 00000000000..2625c865165 --- /dev/null +++ b/apps/app/resource/locales/zh_CN/sandbox-markdown.md @@ -0,0 +1,245 @@ +# Alert + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. +``` + +您还可以使用[directive 语法](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444)。 + +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: + +```markdown +:::note +Useful information that users should know, even when skimming content. +::: + +:::tip[Custom Label] +Useful information that users should know, even when skimming content. +::: +``` + + +# 引用 +- 在段落开头放置 `>` 即可使用带引号的表达式 + - 可以使用一系列 `>` 字符来表示多个引号 +- 列表和其他元素可以在区块引用中一起使用 + +#### 示例 +> - 引号 +> - 引号 +>> 多个引号需要插入更多 `>` + +```markdown +> - 引号 +> - 引号 +>> 多个引号需要插入更多 `>` +``` + + +# 代码 +- 可以通过在三个 `` ` `` 中添加代码来表示代码 + +####示例 + +```markdown +在此处添加代码 + +换行符和段落可以按原样反映在代码中 +``` + +#### 示例(源代码) + +```javascript:mersenne-twister.js +function MersenneTwister(seed) { + if (arguments.length == 0) { + seed = new Date().getTime(); + } + + this._mt = new Array(624); + this.setSeed(seed); +} +``` + +## 内联代码 +- 将单词括在 `` ` `` 中以制作内联代码 + +#### 示例 +以下是 `内联代码` + + + +# 任务列表 +- 通过写入 `[] ` 插入未选中的复选框列表 + - 通过写入 `[x]` 选中复选框 + +#### 示例 +- [ ] 任务 1 + - [x] 任务 1-1 + - [ ] 任务 1-2 +- [x] 任务 2 + + +# 水平线 +- 用三个或更多连续的星号 `*` 或下划线 `_` 插入水平线 + +#### 示例 +下面是一条水平线 +*** +下面是一条水平线 +___ + +```markdown +下面是一条水平线 +*** +下面是一条水平线 +___ +``` + + +# 脚注 + +您可以使用此括号语法为您的内容添加脚注: + +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. + +```markdown +Here is a simple footnote[^1]. + +A footnote can also have multiple lines[^2]. + +[^1]: My reference. +[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces. + This is a second line. +``` + + +# 表情符号 + +您可以通过在冒号 `:` 后输入表情符号名称来添加表情符号。 + +- :+1: 好! +- :white_check_mark: 检查 +- :lock: 锁定 + +当您在冒号后输入两个或更多字符时,会出现一个表情符号建议列表。随着您继续输入,这个列表会逐渐缩小范围。一旦找到您要查找的表情符号,按 Tab 或 Enter 键插入高亮显示的表情符号。 + +有关可用表情符号的列表,请参阅 "[Emoji Cheat Sheet](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md)"。 + + + +# 表格 + +### 通用语法 + +#### 示例 + +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | + +```markdown +| Left align | Right align | Center align | +|:-----------|------------:|:------------:| +| This | This | This | +| column | column | column | +| will | will | will | +| be | be | be | +| left | right | center | +| aligned | aligned | aligned | +``` + +### CSV / TSV + +#### 示例 + +``` tsv +内容单元格 内容单元格 +内容单元格 内容单元格 +``` + +~~~ +``` csv +内容单元格,内容单元格 +内容单元格,内容单元格 +``` +~~~ + +~~~ +``` tsv +内容单元格 内容单元格 +内容单元格 内容单元格 +``` +~~~ + +### CSV / TSV (带标题) + +#### 示例 + +``` tsv-h +第一个标题 第二个标题 +内容单元格 内容单元格 +内容单元格 内容单元格 +``` + +~~~ +``` csv-h +第一个标题,第二个标题 +内容单元格,内容单元格 +内容单元格,内容单元格 +``` +~~~ + +~~~ +``` tsv-h +第一个标题 第二个标题 +内容单元格 内容单元格 +内容单元格 内容单元格 +``` +~~~ + diff --git a/apps/app/resource/locales/zh_CN/sandbox.md b/apps/app/resource/locales/zh_CN/sandbox.md index f43eabd94b2..2c82dee7fa9 100644 --- a/apps/app/resource/locales/zh_CN/sandbox.md +++ b/apps/app/resource/locales/zh_CN/sandbox.md @@ -1,6 +1,40 @@ -# 什么是沙盒? -- 在此页面上,您将找到帮助您掌握 GROWI 的技巧 -- 使用此页面层次结构下的参考资料随意丰富页面内容 +# 欢迎来到 GROWI 沙盒! + +> [!NOTE] +> **什么是沙盒?** +> +> 这是一个您可以自由编辑的练习页面。它是尝试新事物的绝佳场所! + +## :beginner: 初学者指南 + +使用 GROWI,您可以使用名为“Markdown”的符号轻松创建具有视觉吸引力的页面。 + +通过使用 Markdown,您可以做这样的事情! + +- 用**粗体**或*斜体*强调文本 +- 创建项目符号或编号列表 +- [插入链接](#-link) +- 创建表格 +- 添加代码块 + +还可以使用各种其他装饰。 + +## 让我们尝试一下! + +1. 随意编辑此页面 +1. 无需担心犯错 +1. 您随时可以撤销更改 +1. 您还可以从其他人的编辑中学习 + +> [!IMPORTANT] +> **对于管理员** +> +> 沙盒是学习的重要场所: +> - 作为新成员习惯 GROWI 的第一步 +> - 作为 Markdown 的练习场 +> - 作为团队内部的沟通工具 +> - 即使此页面变得杂乱无章,这也是积极学习的标志。定期清理是好的,但建议保持其作为自由实验空间的性质。 + # :closed_book: 标题和段落 - 通过插入标题和段落,您可以使页面上的文本更易于阅读 @@ -44,63 +78,23 @@ Lorem ipsum dolor sat amet, consectetur adipiscing elit, sed do eiusmod tempor i Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur。 Excepteur sint occaecat cupidatat non proident,sunt in culpa qui officia deserunt mollit anim id est laborum。 -## 水平线 -- 用三个或更多连续的星号 `*` 或下划线 `_` 插入水平线 -#### 示例 -下面是一条水平线 -*** -下面是一条水平线 -___ - -```markdown -下面是一条水平线 -*** -下面是一条水平线 -___ -``` - -# :green_book: 文本样式 +# :blue_book: 文本样式 - 可以应用各种样式来丰富句子的文本表达 - 也可以通过选择编辑屏幕底部的工具栏图标轻松应用这些样式 -## 斜体 -- 用星号 `*` 或下划线 `_` 括住文本。 - -#### 示例 -- 本句用 *Italic* 表示强调 -- 本句用 _Italic_ 表示强调 - -```markdown -- 本句用 *Italic* 表示强调 -- 本句用 _Italic_ 表示强调 -``` - -## 粗体 -- 用两个星号 `*` 或两个下划线 `_` 括住文本 - -#### 示例 -- 本句用 **Bold** 表示强调 -- 本句用 __Bold__ 表示强调 - -```markdown -- 本句用 **Bold** 表示强调 -- 本句用 __Bold__ 表示强调 -``` +| Style | 语法 | 键盘快捷键 | 示例 | 输出 | +|-------|------|------------|------|------| +| 加粗 | `** **` 或 `__ __` | (TBD) | `**这是粗体文本**` | **这是粗体文本** | +| 斜体 | `* *` 或 `_ _` | (TBD) | `_这是斜体文本_` | *这是斜体文本* | +| 删除线 | `~~ ~~` | 无 | `~~这是错误文本~~` | ~~这是错误文本~~ | +| 粗体和嵌入的斜体 | `** **` 和 `_ _` | (TBD) | `**This text is _extremely_ important**` | **This text is _extremely_ important** | +| 全部粗体和斜体 | `*** ***` | 无 | ***所有这些文本都很重要*** | ***所有这些文本都很重要*** | +| 下标 | ` ` | 无 | This is a subscript text | 这是下标文本 | +| 上标 | ` ` | 无 | This is a superscript text | 这是上标文本 | -## 斜体 & 粗体 -- 用三个星号 `*` 或三个下划线 `_` 括住文本 -#### 示例 -- 本句用 ***Italic & 粗体*** 表示强调 -- 本句用 ___Italic & 粗体___ 表示强调 - -```markdown --本句使用 ***斜体和粗体*** 表示强调 -- 本句使用 ___斜体和粗体___ 表示强调 -``` - -# :orange_book: 插入列表 +# :green_book: 插入列表 ## 项目符号列表 - 通过在行首使用连字符 `-`、加号 `+` 或星号 `*` 插入项目符号列表 @@ -127,17 +121,9 @@ ___ 1. 此句子出现在项目符号列表中 - 此句子出现在项目符号列表中 -## 任务列表 -- 通过写入 `[] ` 插入未选中的复选框列表 - - 通过写入 `[x]` 选中复选框 -#### 示例 -- [ ] 任务 1 - - [x] 任务 1-1 - - [ ] 任务 1-2 -- [x] 任务 2 -# :blue_book: 链接 +# :ledger: 链接 ## 自动链接 只需输入 URL,链接就会自动生成。 @@ -176,131 +162,12 @@ https://www.google.co.jp - [[如何写公式?>./Math]] ``` -# :notebook: 其他 -## 区块引用 -- 在段落开头放置 `>` 即可使用带引号的表达式 - - 可以使用一系列 `>` 字符来表示多个引号 -- 列表和其他元素可以在区块引用中一起使用 - -#### 示例 -> - 引号 -> - 引号 ->> 多个引号需要插入更多 `>` - -```markdown -> - 引号 -> - 引号 ->> 多个引号需要插入更多 `>` -``` - -## 代码 -- 可以通过在三个 `` ` `` 中添加代码来表示代码 -####示例 - -```markdown -在此处添加代码 - -换行符和段落可以按原样反映在代码中 -``` - -#### 示例(源代码) - -```javascript:mersenne-twister.js -function MersenneTwister(seed) { - if (arguments.length == 0) { - seed = new Date().getTime(); - } - - this._mt = new Array(624); - this.setSeed(seed); -} -``` - -## 内联代码 -- 将单词括在 `` ` `` 中以制作内联代码 - -#### 示例 -以下是 `内联代码` - -## 表格 - -### 通用语法 - -#### 示例 - -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | - -```markdown -| Left align | Right align | Center align | -|:-----------|------------:|:------------:| -| This | This | This | -| column | column | column | -| will | will | will | -| be | be | be | -| left | right | center | -| aligned | aligned | aligned | -``` - -### CSV / TSV - -#### 示例 - -``` tsv -内容单元格 内容单元格 -内容单元格 内容单元格 -``` - -~~~ -``` csv -内容单元格,内容单元格 -内容单元格,内容单元格 -``` -~~~ - -~~~ -``` tsv -内容单元格 内容单元格 -内容单元格 内容单元格 -``` -~~~ - -### CSV / TSV (带标题) - -#### 示例 - -``` tsv-h -第一个标题 第二个标题 -内容单元格 内容单元格 -内容单元格 内容单元格 -``` - -~~~ -``` csv-h -第一个标题,第二个标题 -内容单元格,内容单元格 -内容单元格,内容单元格 -``` -~~~ - -~~~ -``` tsv-h -第一个标题 第二个标题 -内容单元格 内容单元格 -内容单元格 内容单元格 -``` -~~~ +# :notebook: 更多应用 +- [了解更多关于 Markdown](/Sandbox/Markdown) -# :ledger: 更多应用 -- [Bootstrap](/Sandbox/Bootstrap) +- [进一步装饰你的页面 (Bootstrap5)](/Sandbox/Bootstrap5) -- [Diagrams](/Sandbox/Diagrams) +- [如何表示图表 (Diagrams)](/Sandbox/Diagrams) -- [Math](/Sandbox/Math) \ No newline at end of file +- [如何表示数学公式 (Math)](/Sandbox/Math) \ No newline at end of file diff --git a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/UploadForm.jsx b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/UploadForm.jsx index fc48c15921e..f511d931f5f 100644 --- a/apps/app/src/client/components/Admin/ImportData/GrowiArchive/UploadForm.jsx +++ b/apps/app/src/client/components/Admin/ImportData/GrowiArchive/UploadForm.jsx @@ -75,7 +75,12 @@ class UploadForm extends React.Component {
-
+
+ { this.props.onDiscard && ( + + ) } @@ -91,6 +96,7 @@ class UploadForm extends React.Component { UploadForm.propTypes = { t: PropTypes.func.isRequired, // i18next onUpload: PropTypes.func.isRequired, + onDiscard: PropTypes.func, isTheSameVersion: PropTypes.bool, onVersionMismatch: PropTypes.func, }; diff --git a/apps/app/src/client/components/Admin/ImportData/GrowiArchiveSection.jsx b/apps/app/src/client/components/Admin/ImportData/GrowiArchiveSection.jsx index 1922fa45156..d114884fe11 100644 --- a/apps/app/src/client/components/Admin/ImportData/GrowiArchiveSection.jsx +++ b/apps/app/src/client/components/Admin/ImportData/GrowiArchiveSection.jsx @@ -121,6 +121,7 @@ class GrowiArchiveSection extends React.Component { : ( )} diff --git a/apps/app/src/client/components/Admin/Security/OidcSecuritySettingContents.jsx b/apps/app/src/client/components/Admin/Security/OidcSecuritySettingContents.jsx index d1b041abc1c..18dfe343012 100644 --- a/apps/app/src/client/components/Admin/Security/OidcSecuritySettingContents.jsx +++ b/apps/app/src/client/components/Admin/Security/OidcSecuritySettingContents.jsx @@ -455,7 +455,7 @@ class OidcSecurityManagementContents extends React.Component {
  1. {t('security_settings.OAuth.OIDC.register_1')}
  2. -
  3. {t('security_settings.OAuth.OIDC.register_2')}
  4. +
  5. {t('security_settings.OAuth.OIDC.register_3')}
diff --git a/apps/app/src/client/components/Admin/Security/SamlSecuritySettingContents.jsx b/apps/app/src/client/components/Admin/Security/SamlSecuritySettingContents.jsx index e1db61790e0..dd292e23cb5 100644 --- a/apps/app/src/client/components/Admin/Security/SamlSecuritySettingContents.jsx +++ b/apps/app/src/client/components/Admin/Security/SamlSecuritySettingContents.jsx @@ -33,12 +33,18 @@ class SamlSecurityManagementContents extends React.Component { try { await adminSamlSecurityContainer.updateSamlSetting(); - await adminGeneralSecurityContainer.retrieveSetupStratedies(); toastSuccess(t('security_settings.SAML.updated_saml')); } catch (err) { toastError(err); } + + try { + await adminGeneralSecurityContainer.retrieveSetupStratedies(); + } + catch (err) { + toastError(err); + } } render() { diff --git a/apps/app/src/client/components/Common/CopyDropdown/CopyDropdown.jsx b/apps/app/src/client/components/Common/CopyDropdown/CopyDropdown.jsx index e396215973a..ad2586346a6 100644 --- a/apps/app/src/client/components/Common/CopyDropdown/CopyDropdown.jsx +++ b/apps/app/src/client/components/Common/CopyDropdown/CopyDropdown.jsx @@ -195,8 +195,7 @@ export const CopyDropdown = (props) => { {pagePathWithParams}
{permalink}} - className="text-truncate" - style={{ direction: 'rtl' }} + className="text-truncate d-block" /> diff --git a/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx b/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx index 7efa1c4b5bc..142c3f2017e 100644 --- a/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx +++ b/apps/app/src/client/components/InAppNotification/InAppNotificationDropdown.tsx @@ -72,7 +72,7 @@ export const InAppNotificationDropdown = (): JSX.Element => { { inAppNotificationData != null && inAppNotificationData.docs.length === 0 // no items - ? {t('in_app_notification.mark_all_as_read')} + ? {t('in_app_notification.no_unread_messages')} // render DropdownItem : } diff --git a/apps/app/src/client/components/InAppNotification/InAppNotificationPage.tsx b/apps/app/src/client/components/InAppNotification/InAppNotificationPage.tsx index 6534f77df8e..0fd63f38d9a 100644 --- a/apps/app/src/client/components/InAppNotification/InAppNotificationPage.tsx +++ b/apps/app/src/client/components/InAppNotification/InAppNotificationPage.tsx @@ -79,7 +79,7 @@ export const InAppNotificationPage: FC = () => { )} { notificationData != null && notificationData.docs.length === 0 // no items - ? t('in_app_notification.mark_all_as_read') + ? t('in_app_notification.no_unread_messages') // render list-group : ( diff --git a/apps/app/src/client/components/InstallerForm.tsx b/apps/app/src/client/components/InstallerForm.tsx index 8d76526e198..e2eb6d0824d 100644 --- a/apps/app/src/client/components/InstallerForm.tsx +++ b/apps/app/src/client/components/InstallerForm.tsx @@ -34,24 +34,11 @@ const InstallerForm = memo((props: Props): JSX.Element => { const isSupportedLang = AllLang.includes(i18n.language as Lang); - const [isValidUserName, setValidUserName] = useState(true); const [isLoading, setIsLoading] = useState(false); const [currentLocale, setCurrentLocale] = useState(isSupportedLang ? i18n.language : Lang.en_US); const [registerErrors, setRegisterErrors] = useState([]); - const checkUserName = useCallback(async(event) => { - const axios = require('axios').create({ - headers: { - 'Content-Type': 'application/json', - 'X-Requested-With': 'XMLHttpRequest', - }, - responseType: 'json', - }); - const res = await axios.get('/_api/v3/check-username', { params: { username: event.target.value } }); - setValidUserName(res.data.valid); - }, []); - const onClickLanguageItem = useCallback((locale) => { i18n.changeLanguage(locale); setCurrentLocale(locale); @@ -101,13 +88,8 @@ const InstallerForm = memo((props: Props): JSX.Element => { } }, [currentLocale, router, t]); - const hasErrorClass = isValidUserName ? '' : ' has-error'; - const unavailableUserId = isValidUserName - ? '' - : block{ t('installer.unavaliable_user_id') }; - return ( -
+

@@ -120,13 +102,15 @@ const InstallerForm = memo((props: Props): JSX.Element => { { registerErrors != null && registerErrors.length > 0 && ( -

- {registerErrors.map(err => ( - - {tWithOpt(err.message, err.args)}
-
- ))} -

+
+
+ {registerErrors.map(err => ( + + {tWithOpt(err.message, err.args)}
+
+ ))} +
+
) } @@ -179,7 +163,7 @@ const InstallerForm = memo((props: Props): JSX.Element => {
-
+
@@ -189,11 +173,9 @@ const InstallerForm = memo((props: Props): JSX.Element => { className="form-control rounded" placeholder={t('User ID')} name="registerForm[username]" - // onBlur={checkUserName} // need not to check username before installation -- 2020.07.24 Yuki Takei required />
-

{ unavailableUserId }