Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add deprecated argument to plugin info #328

Merged
merged 299 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
299 commits
Select commit Hold shift + click to select a range
68d4802
Merge branch 'main' into guangcheng
huanmah Oct 11, 2024
367e0d0
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
huanmah Oct 11, 2024
65c74ab
Fix: refine the ja-JP document
huanmah Oct 11, 2024
2cfc03e
Fix: refine the en-US handbook document @11Oct
qixia-san Oct 11, 2024
1b4cf36
Fix: refine the ja-JP document
huanmah Oct 11, 2024
60d1290
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
huanmah Oct 11, 2024
d9e4ec3
Fix: refine the en-US handbook document @12Oct
qixia-san Oct 11, 2024
5f2469d
docs: translation initialization of English adding & partial cn update
qixia-san Oct 11, 2024
2c774dd
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
qixia-san Oct 11, 2024
5922d53
Fix: refine the ja-JP document
huanmah Oct 13, 2024
db6fee4
Merge branch 'nocobase:main' into main
Albert-mah Oct 13, 2024
521e9c7
Merge branch 'main' into guangcheng
huanmah Oct 13, 2024
5009696
docs: update plugin backups ui translation (#182)
huanmah Oct 13, 2024
7d96842
docs: after success (#181)
huanmah Oct 13, 2024
d3c550b
Fix: refine the en-US/zh-CN/ja-JP handbook document @13Oct
qixia-san Oct 13, 2024
e31539c
docs: improve ja-JP translation of tree table definition
huanmah Oct 14, 2024
589d156
docs: improve ja-JP translation
huanmah Oct 14, 2024
b8e514b
Merge branch 'nocobase:main' into main
Albert-mah Oct 14, 2024
2462b8c
Merge branch 'main' into guangcheng
huanmah Oct 14, 2024
3bb1cf8
Fix: refine the en-US handbook document @14Oct
qixia-san Oct 14, 2024
7b66ea4
Merge branch 'guangcheng' of https://github.com/Albert-mah/docs into …
qixia-san Oct 14, 2024
795a557
feat: add ja-JP selection
huanmah Oct 15, 2024
48e4501
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
huanmah Oct 15, 2024
54003dc
Revert "feat: add ja-JP selection"
huanmah Oct 15, 2024
621f550
feat: corrected URL link in ja-JP document.
huanmah Oct 15, 2024
04d2ca8
Merge branch 'nocobase:main' into main
Albert-mah Oct 15, 2024
8d09f9f
Merge branch 'guangcheng'
huanmah Oct 15, 2024
abcbcd7
fix: corrected resource in ja-JP document.
huanmah Oct 15, 2024
8f1300f
fix: correct style error in echarts overview.md.
huanmah Oct 17, 2024
8fdd957
Merge branch 'nocobase:main' into main
Albert-mah Oct 17, 2024
051aaa4
docs: add translations for in-app message notifications (#190)
huanmah Oct 17, 2024
c79c8a5
doc: add translation of commercial-installation.md in EN.
Oct 20, 2024
6f5d2a6
Merge branch 'guangcheng' of https://github.com/Albert-mah/docs into …
qixia-san Oct 20, 2024
f127541
Fix: refine the en-US handbook document @20Oct
qixia-san Oct 20, 2024
2556726
测试
Oct 20, 2024
b557a86
Fix: refine the en-US handbook document @21Oct
2013xile Oct 21, 2024
0c069b6
Fix: refine the en-US handbook document @21Oct
2013xile Oct 21, 2024
52bec69
Fix: refine the en-US handbook document @21Oct
2013xile Oct 21, 2024
5804fa6
Merge branch 'guangcheng' of https://github.com/Albert-mah/docs into …
qixia-san Oct 21, 2024
7b7a2f2
test
2013xile Oct 21, 2024
6d36e85
Rollback test
2013xile Oct 21, 2024
dab4d6c
Merge branch 'guangcheng' of https://github.com/Albert-mah/docs into …
qixia-san Oct 21, 2024
ec6f513
Fix: refine the en-US handbook document @21Oct
qixia-san Oct 21, 2024
82c434c
Fix: refine the en-US handbook document @21Oct
qixia-san Oct 21, 2024
6952815
Merge branch 'nocobase:main' into main
Albert-mah Oct 22, 2024
4c9e806
Merge branch 'guangcheng'
huanmah Oct 22, 2024
4b4d5ee
Merge branch 'nocobase:main' into main
Albert-mah Oct 22, 2024
57ec99c
Fix: refine the en-US handbook document @22Oct
qixia-san Oct 22, 2024
0c3d150
Fix: refine the ja-JP handbook document @22Oct
qixia-san Oct 22, 2024
7bdb050
Fix: refine the en-US handbook/Chart document @22Oct
qixia-san Oct 22, 2024
c93f406
Merge branch 'nocobase:main' into main
Albert-mah Oct 25, 2024
b03a7bd
Fix: refine the en-US handbook/Chart document @25Oct
qixia-san Oct 25, 2024
2eb93fe
docs: translation adding of en-US handbook part @capper
2013xile Oct 27, 2024
4fb49f8
docs: translation adding of en-US handbook part - capper
2013xile Oct 27, 2024
1711936
Fix: refine the en-US handbook/Chart document @27Oct
qixia-san Oct 27, 2024
b68d3f1
Fix: refine the en-US handbook/Chart document @27Oct
qixia-san Oct 27, 2024
628b45d
Fix: refine the en-US handbook/Chart document @28Oct
qixia-san Oct 28, 2024
d62b663
Merge branch 'nocobase:main' into main
Albert-mah Oct 29, 2024
a235620
Merge branch 'guangcheng'
huanmah Oct 29, 2024
1d03490
Merge branch 'nocobase:main' into guangcheng
qixia-san Oct 29, 2024
c87af76
docs: translation adding of en-US handbook part
qixia-san Oct 29, 2024
0b4d0aa
Merge branch 'nocobase:main' into main
Albert-mah Oct 29, 2024
5de8780
Merge branch 'main' into guangcheng
huanmah Oct 29, 2024
b03d9b5
Merge branch 'nocobase:main' into main
Albert-mah Oct 29, 2024
1ce13b5
Merge branch 'nocobase:main' into main
Albert-mah Nov 10, 2024
6e45e46
Fix: refine the en-US handbook/notification document @11Nov
qixia-san Nov 11, 2024
f4b9f91
Merge branch 'nocobase:main' into main
Albert-mah Nov 22, 2024
b259567
Fix: refine the en-US handbook/notification document @22Nov
qixia-san Nov 23, 2024
4d3e778
Fix: refine the en-US handbook/notification document @23Nov
qixia-san Nov 23, 2024
6a20b7b
docs: add supplement of QR-Scan Action
huanmah Nov 25, 2024
a4cef0e
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
huanmah Nov 25, 2024
e5875e5
Merge branch 'nocobase:main' into main
Albert-mah Nov 26, 2024
790a54d
docs: add icon of locale
huanmah Nov 26, 2024
83f748a
Merge branch 'nocobase:main' into main
Albert-mah Dec 1, 2024
cb41ce5
docs: change of locale
huanmah Dec 2, 2024
88b385d
Merge branch 'nocobase:main' into main
Albert-mah Dec 2, 2024
8bad851
fix: update dumi-theme-nocobase version
huanmah Dec 2, 2024
8d75dfe
Merge branch 'nocobase:main' into main
Albert-mah Dec 2, 2024
68ab833
fix: update dumi-theme-nocobase version
huanmah Dec 2, 2024
aff2009
Merge branch 'nocobase:main' into main
Albert-mah Dec 2, 2024
7d877e9
Merge remote-tracking branch 'origin/main'
huanmah Dec 2, 2024
4ccb93c
Merge branch 'nocobase:main' into main
Albert-mah Dec 2, 2024
091e550
Merge branch 'nocobase:main' into main
Albert-mah Dec 3, 2024
84dfdda
Merge branch 'nocobase:main' into main
Albert-mah Dec 3, 2024
a073657
Merge branch 'nocobase:main' into main
Albert-mah Dec 3, 2024
9355e77
fix: add translation of japanese
huanmah Dec 3, 2024
598e967
Merge branch 'main' into main
Albert-mah Dec 4, 2024
003b783
Merge branch 'nocobase:main' into main
Albert-mah Dec 4, 2024
d1012bb
fix: translation of Japanese
huanmah Dec 4, 2024
583a429
Merge branch 'nocobase:main' into main
Albert-mah Dec 4, 2024
faeb7b8
doc: translation of Japanese and English
huanmah Dec 4, 2024
d0ca088
Merge branch 'nocobase:main' into main
Albert-mah Dec 5, 2024
05426c2
doc: append translation of JavaScript
huanmah Dec 5, 2024
df06d2a
doc: append translation of JavaScript
huanmah Dec 5, 2024
937eaa5
doc: supplement some ja-JP text
huanmah Dec 5, 2024
e3a5fe0
fix: handbook index
huanmah Dec 5, 2024
7d7e218
Merge branch 'nocobase:main' into main
Albert-mah Dec 6, 2024
3380c0d
fix: modify plugin install config in ja-JP
huanmah Dec 6, 2024
18b2a23
Merge branch 'nocobase:main' into main
Albert-mah Dec 7, 2024
a13c36a
fix: delete the extra parts
huanmah Dec 10, 2024
d422925
Merge remote-tracking branch 'origin/main'
huanmah Dec 10, 2024
7be53ab
fix: delete the extra parts
huanmah Dec 10, 2024
d172ef2
fix: modify english part
huanmah Dec 10, 2024
dc39ecd
Merge branch 'nocobase:main' into main
qixia-san Dec 11, 2024
881ecf7
Fix: refine the en-US handbook/notification document @12Dec
qixia-san Dec 11, 2024
b373c64
Fix: refine the en-US handbook/notification document @13Dec
qixia-san Dec 12, 2024
6d09d9a
Merge branch 'nocobase:main' into guangcheng
qixia-san Dec 20, 2024
63851bd
Merge branch 'nocobase:main' into main
qixia-san Dec 20, 2024
10a21dd
Merge branch 'main' of https://github.com/Albert-mah/docs
qixia-san Dec 20, 2024
bf4102c
Fix: refine the en-US handbook/plugin document @21Dec
qixia-san Dec 20, 2024
584309a
Merge branch 'guangcheng'
qixia-san Dec 20, 2024
b7022e1
fix: add ja-JP document.
huanmah Dec 22, 2024
126ee24
Merge remote-tracking branch 'origin/main'
huanmah Dec 22, 2024
7213a1e
doc: add formula document.
huanmah Dec 23, 2024
e1f0a98
doc: add formula document.
huanmah Dec 23, 2024
4d7d557
Merge branch 'main' into guangcheng
huanmah Dec 23, 2024
5518aed
Merge branch 'nocobase:main' into main
Albert-mah Dec 23, 2024
73624b0
fix: supplement code block type.
huanmah Dec 24, 2024
70e3300
Merge branch 'nocobase:main' into main
Albert-mah Dec 24, 2024
f95891d
fix: style of formula.
huanmah Dec 24, 2024
e3f6332
fix: style of formula.
huanmah Dec 24, 2024
6702ba8
doc: style of formula.
huanmah Dec 24, 2024
0509648
fix: add locale format of formula.
huanmah Dec 24, 2024
3ad2bb2
Merge branch 'nocobase:main' into main
Albert-mah Dec 24, 2024
6f5eee9
doc: modify size of article when FormulaFunctions in page.
huanmah Dec 24, 2024
7d8eef6
Merge branch 'main' into main
Albert-mah Dec 24, 2024
2c41d8b
doc: add translations.
huanmah Dec 25, 2024
4e71fa3
Merge branch 'nocobase:main' into main
Albert-mah Dec 25, 2024
1a9db44
Merge remote-tracking branch 'origin/main'
huanmah Dec 25, 2024
9cd441c
Merge branch 'nocobase:main' into main
Albert-mah Dec 25, 2024
e8286f8
doc: add mathjs index.
huanmah Dec 25, 2024
5641c5c
fix: add mathjs index.
huanmah Dec 25, 2024
8a22a68
fix: add mathjs index.
huanmah Dec 25, 2024
c594e92
fix: add mathjs functions.
huanmah Dec 26, 2024
6afbe74
doc: add markdown-vditor examples.
huanmah Dec 26, 2024
ce78617
Merge branch 'main' into main
Albert-mah Dec 26, 2024
35cbadc
Merge branch 'nocobase:main' into main
Albert-mah Dec 26, 2024
4444c7f
doc: add calculation-engines
Dec 28, 2024
4c43669
doc: refine calculation engine description
huanmah Dec 28, 2024
fa7edaa
doc: edit calculation-engines
Dec 29, 2024
0d446fe
doc: remove useless files.
huanmah Dec 29, 2024
f6a0b23
Merge branch 'main' into main
Albert-mah Dec 29, 2024
fe74d5f
Merge branch 'nocobase:main' into main
Albert-mah Dec 29, 2024
2ce7f65
Merge branch 'nocobase:main' into main
Albert-mah Dec 31, 2024
18a14ae
doc: add translation of 'assword policy', 'approval'.
huanmah Jan 1, 2025
ce43ef5
fix: supplement code block type.
huanmah Dec 24, 2024
1414134
fix: style of formula.
huanmah Dec 24, 2024
3fa4dd1
fix: style of formula.
huanmah Dec 24, 2024
119d815
doc: style of formula.
huanmah Dec 24, 2024
603c8e4
fix: add locale format of formula.
huanmah Dec 24, 2024
dfddc60
doc: modify size of article when FormulaFunctions in page.
huanmah Dec 24, 2024
3309cdd
doc: add translations.
huanmah Dec 25, 2024
471ceb8
doc: format of formula component. (#249)
Albert-mah Dec 24, 2024
c8c6927
doc: modify size of article when FormulaFunctions in page. (#250)
Albert-mah Dec 24, 2024
219b9f6
doc: add formula translations. (#251)
Albert-mah Dec 25, 2024
02d861a
doc: add formula translations. (#252)
Albert-mah Dec 25, 2024
743a06c
fix: add .dumi theme change to deploy-docs.yml
Albert-mah Dec 25, 2024
7267983
doc: test .dumi change
Albert-mah Dec 25, 2024
3b4b401
doc: add mathjs index.
huanmah Dec 25, 2024
24acf33
fix: add mathjs index.
huanmah Dec 25, 2024
e6ac336
fix: add mathjs index.
huanmah Dec 25, 2024
58a2069
fix: add mathjs functions.
huanmah Dec 26, 2024
021bc19
doc: add markdown-vditor examples.
huanmah Dec 26, 2024
a94e407
doc: add calculation-engines
Dec 28, 2024
8116596
doc: refine calculation engine description
huanmah Dec 28, 2024
99b7762
doc: edit calculation-engines
Dec 29, 2024
9f7baa9
doc: remove useless files.
huanmah Dec 29, 2024
124577e
Feat/password policy (#257)
2013xile Dec 29, 2024
825341a
doc: remove useless files. (#260)
Albert-mah Dec 29, 2024
e142287
chore: separate docs of password policy (#262)
2013xile Dec 30, 2024
2df2397
docs: add delegate, add assignee and modify approval content (#254)
mytharcher Dec 30, 2024
be1a76b
doc: add translation of 'assword policy', 'approval'.
huanmah Jan 1, 2025
acdd4c5
Merge remote-tracking branch 'origin/main'
huanmah Jan 1, 2025
e9b5847
Merge branch 'main' into main
Albert-mah Jan 1, 2025
7afc9c9
doc: add work-subflow translation
Jan 1, 2025
61e4e26
Merge branch 'nocobase:main' into main
Albert-mah Jan 2, 2025
52a1c33
Merge branch 'nocobase:main' into main
Albert-mah Jan 2, 2025
54174e4
docs: Translations for documents under the handbook module and the we…
Jan 2, 2025
789f5cf
docs: Translations for documents under the handbook module and the we…
Jan 2, 2025
ec47ad0
Merge branch 'nocobase:main' into main
quyichen Jan 3, 2025
f9b3eef
docs: add security guide translation.
Jan 3, 2025
0e2c40f
doc: revert translation of security
huanmah Jan 4, 2025
b97278f
Merge branch 'nocobase:main' into main
quyichen Jan 4, 2025
bffd59b
docs: add ja-JP handbook translation.
Jan 4, 2025
883c803
docs: add ja-JP handbook translation.
Jan 4, 2025
e4195c3
docs: add ja-JP handbook translation.
Jan 4, 2025
a548796
docs: add api translation.
Jan 6, 2025
b0b1b2c
Merge branch 'nocobase:main' into main
Albert-mah Jan 7, 2025
efd50bc
doc: add content to action-template-print
huanmah Jan 7, 2025
03b11d5
docs: add handbook translation.
Jan 7, 2025
6874151
docs: add handbook translation.
Jan 7, 2025
0e3ff08
docs: add handbook translation.
Jan 7, 2025
dc1d11d
doc: remove redundant part of action-template-print
huanmah Jan 8, 2025
0781e98
Revert "doc: remove redundant part of action-template-print"
huanmah Jan 8, 2025
6a4a93a
Merge branch 'nocobase:main' into main
Albert-mah Jan 8, 2025
94df40f
doc: remove redundant part of action-template-print
huanmah Jan 8, 2025
27c34f3
Merge branch 'nocobase:main' into main
Albert-mah Jan 8, 2025
686cce2
doc: remove redundant part of action-template-print
huanmah Jan 8, 2025
3efe9aa
doc: refine MySQL version description
huanmah Jan 8, 2025
9c94a4d
Merge branch 'nocobase:main' into main
Albert-mah Jan 8, 2025
0b18109
Fix: refine the en-US/zh-CN handbook/plugin document @10Jan
qixia-san Jan 9, 2025
a349168
Merge branch 'nocobase:main' into main
Albert-mah Jan 10, 2025
7fc57e0
doc: add translation of migration-manager and release-management
huanmah Jan 10, 2025
3fc2d37
Merge branch 'nocobase:main' into main
Albert-mah Jan 13, 2025
07b7048
doc: add translation of action-template-print
huanmah Jan 13, 2025
695e959
Merge branch 'nocobase:main' into main
Albert-mah Jan 14, 2025
0c863d1
doc: add algolia and sitemap config
huanmah Jan 14, 2025
662584b
doc: change to trigger github ci
huanmah Jan 14, 2025
83935d8
Merge branch 'nocobase:main' into main
Albert-mah Jan 14, 2025
a7bf64e
Merge remote-tracking branch 'origin/main'
huanmah Jan 14, 2025
2dd3416
Merge branch 'nocobase:main' into main
Albert-mah Jan 15, 2025
948bb75
doc: update video of en-US and ja-JP
huanmah Jan 15, 2025
187a940
Merge branch 'nocobase:main' into main
Albert-mah Jan 17, 2025
27b4830
doc: removed useless alert
huanmah Jan 17, 2025
f270d4c
Merge branch 'nocobase:main' into main
Albert-mah Jan 20, 2025
55491e7
fix: config error
huanmah Jan 20, 2025
cca9435
Merge branch 'nocobase:main' into main
Albert-mah Jan 21, 2025
fffdfd1
docs:translate ip-restriction、audit-logger、token-policy
Albert-mah Jan 21, 2025
c586350
Merge remote-tracking branch 'origin/guangcheng' into guangcheng
huanmah Jan 21, 2025
a4a6fdf
doc: translation of ip-restriction、audit-logger、token-policy
huanmah Jan 21, 2025
1cf5239
Merge branch 'guangcheng'
huanmah Jan 21, 2025
ddfd49d
Merge branch 'nocobase:main' into main
Albert-mah Jan 31, 2025
7c7f990
doc:
huanmah Jan 31, 2025
2b2632f
Merge branch 'nocobase:main' into main
Albert-mah Feb 5, 2025
9e6fadb
doc: Template Printing
huanmah Feb 5, 2025
47940ca
doc: refine words
huanmah Feb 5, 2025
4603961
doc: drop useless function
huanmah Feb 5, 2025
355c52a
Revert "doc: drop useless function"
huanmah Feb 5, 2025
2262a55
Merge branch 'nocobase:main' into main
Albert-mah Feb 5, 2025
bd1c0ee
doc: drop useless function
huanmah Feb 5, 2025
1e85293
doc: refine title style
huanmah Feb 5, 2025
aaf017d
Merge branch 'nocobase:main' into main
Albert-mah Feb 5, 2025
a547520
doc: refine title style
huanmah Feb 5, 2025
9dbf0b1
Merge remote-tracking branch 'origin/main'
huanmah Feb 5, 2025
368360e
Merge branch 'nocobase:main' into main
Albert-mah Feb 10, 2025
fd459d9
doc: fix Database Client Installation
huanmah Feb 10, 2025
78f739b
doc: fix Database Client Installation, add command
huanmah Feb 10, 2025
15301e9
Merge branch 'nocobase:main' into main
Albert-mah Feb 10, 2025
7d91845
Merge branch 'nocobase:main' into main
Albert-mah Feb 11, 2025
1f36b31
doc: add docker config "restart: always"
huanmah Feb 11, 2025
db1c021
doc: translation of JSON Variable Mapping
huanmah Feb 11, 2025
0f04ca6
Merge branch 'nocobase:main' into main
Albert-mah Feb 17, 2025
dbdeab1
fix: resourceManager words
huanmah Feb 17, 2025
59ad8e6
fix: delete useless function in formulajs
huanmah Feb 19, 2025
4677f5b
Merge branch 'nocobase:main' into main
Albert-mah Feb 19, 2025
40d98f5
feat: add deprecated type with plugin info
huanmah Feb 20, 2025
0b0ac96
Merge branch 'main' of https://github.com/Albert-mah/docs
huanmah Feb 20, 2025
90a648c
feat: add deprecated type with plugin info
huanmah Feb 20, 2025
f5630b0
Merge branch 'nocobase:main' into main
Albert-mah Feb 20, 2025
a38423d
docs: add deprecated to Backup and Restore
huanmah Feb 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 112 additions & 59 deletions .dumi/theme/builtins/PluginInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,77 +1,130 @@
import { Link, useSiteData } from 'dumi';
import React from 'react';
import messages from '../locale/pluginInfo';

function PluginLink(props) {
interface PluginInfoProps {
name: string;
link?: string;
plugins?: string;
commercial?: boolean;
licenseBundled?: 'enterprise' | 'commercial' | boolean;
/** @deprecated This parameter is deprecated and will be removed in future versions. */
deprecated?: boolean;
}

function PluginLink(props: { name: string; link?: string }) {
const { name, link } = props;
return <Link to={link ?? `/handbook/${name}`}>plugin-{name}</Link>;
}

function PluginList({ plugins, name, link }) {
return plugins ? plugins.split(',').map((item, i) => (
function PluginList({ plugins, name, link }: { plugins?: string; name: string; link?: string }) {
return plugins ? (
<>
<PluginLink name={item} />
{i < plugins.split(',').length - 1 ? ', ' : ''}
{plugins.split(',').map((item, i) => (
<React.Fragment key={item}>
<PluginLink name={item.trim()} />
{i < plugins.split(',').length - 1 ? ', ' : ''}
</React.Fragment>
))}
</>
)) : <PluginLink name={name} link={link} />;
) : (
<PluginLink name={name} link={link} />
);
}

const PluginInfo = (props) => {
const { name, link, plugins, commercial, licenseBundled } = props;
function formatMessage(template: string, values: Record<string, React.ReactNode>) {
const parts = template.split(/(\{[^}]+\})/g);
return parts.map((part, index) => {
const matches = part.match(/\{([^}]+)\}/);
if (matches) {
const key = matches[1];
return <React.Fragment key={index}>{values[key]}</React.Fragment>;
}
return part;
});
}

const PluginInfo: React.FC<PluginInfoProps> = (props) => {
const { name, link, plugins, commercial, licenseBundled, deprecated } = props;
const { themeConfig } = useSiteData();
const zhCN = themeConfig.lang === 'zh-CN';
const jaJP = themeConfig.lang === 'ja-JP';
const bundleTexts = licenseBundled === 'enterprise' ? {
'zh-CN': '企业版',
'ja-JP': '企业版',
'en-US': 'commercial edition',
} : {
'zh-CN': '商业版',
'ja-JP': '商业版',
'en-US': 'commercial edition',
}
const lang = themeConfig.lang || 'en-US';
const t = messages[lang];

const edition = licenseBundled && licenseBundled === 'enterprise'
? t.enterpriseEdition
: t.commercialEdition;

const commercialLink = (text: string) => {
const paths = {
'zh-CN': '/cn/commercial',
'ja-JP': '/jp/commercial',
'en-US': '/en/commercial'
};

return (
<a target="_blank" rel="noreferrer" href={`${t.commercialBaseUrl}${paths[lang]}`}>
{text}
</a>
);
};

const licenseLink = () => {
const paths = {
'zh-CN': '/cn/plugins',
'ja-JP': '/jp/plugins',
'en-US': '/en/plugins'
};

return (
<a target="_blank" rel="noreferrer" href={`${t.commercialBaseUrl}${paths[lang]}`}>
{t.commercialLicense}
</a>
);
};

const pluginsList = <PluginList plugins={plugins} name={name} link={link} />;

const renderMessage = () => {
if (licenseBundled) {
return (
<span>
{formatMessage(t.bundledPluginMessage, {
plugins: pluginsList,
edition: commercialLink(edition)
})}
</span>
);
}

return (
<span>
{formatMessage(t.pluginMessage, {
commercial: commercial ? t.commercial : '',
plugins: pluginsList,
license: commercial ? formatMessage(t.licenseDetails, {
license: licenseLink()
}) : ''
})}
</span>
);
};

return (
<div>
<div className="dumi-default-container markdown" data-type="info">
<svg viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg>
<h4>
{zhCN ? '提示' : jaJP ? '注意' : 'INFO'}
</h4>
{
licenseBundled ? (
<section>
{zhCN ? (
<p>
该功能由商业插件 <PluginList name={name} link={link} plugins={plugins} /> 提供,包含在 <a target="_blank" href="https://www.nocobase.com/cn/commercial">{bundleTexts[themeConfig.lang]}</a> 中,无需单独购买。
</p>
) : jaJP ? (
<p>
この機能は商用プラグイン <PluginList name={name} link={link} plugins={plugins} /> によって提供されます,包含在 <a target="_blank" href="https://www.nocobase.com/jp/commercial">{bundleTexts[themeConfig.lang]}</a> 中,无需单独购买。
</p>
) : (
<p>
This feature is provided by the commercial plugin <PluginList name={name} link={link} plugins={plugins} />, included in the <a target="_blank" href="https://www.nocobase.com/en/commercial">{bundleTexts[themeConfig.lang]}</a>, with no additional purchase required.
</p>
)}
</section>
) : (
<section>
{zhCN ? (
<p>
该功能由{commercial ? '商业' : ''}插件 <PluginList name={name} link={link} plugins={plugins} /> 提供{commercial && <>,请查看 <a target="_blank" href="https://www.nocobase.com/cn/plugins">商业授权</a> 了解详情</>}.
</p>
) : jaJP ? (
<p>
この機能は{commercial ? '商用' : ''}プラグイン <PluginList name={name} link={link} plugins={plugins} /> によって提供されます。{commercial && <> 詳細については、<a target="_blank" href="https://www.nocobase.com/jp/plugins">商用ライセンス</a> をご覧ください。</>}
</p>
) : (
<p>
This feature is provided by the {commercial ? 'commercial ' : ''}plugin <PluginList name={name} link={link} plugins={plugins} />. {commercial && <><br /> Please refer to the <a target="_blank" href="https://www.nocobase.com/en/plugins">commercial license</a> for details.</>}
</p>
)}
</section>
)
}
<div className="dumi-default-container markdown" data-type={deprecated ? 'warning' : 'info'}>
<svg viewBox="64 64 896 896">
<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
<path d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path>
</svg>
<h4>{deprecated ? t.deprecatedInfo : t.info}</h4>
<section>
<p>{renderMessage()}</p>
</section>
{deprecated && (
<section>
<p>{t.deprecatedMessage}</p>
</section>
)}
</div>
</div>
);
Expand Down
41 changes: 41 additions & 0 deletions .dumi/theme/locale/pluginInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export default {
'zh-CN': {
info: '提示',
deprecatedInfo: '已废弃',
bundledPluginMessage: '该功能由商业插件 {plugins} 提供,包含在 {edition} 中,无需单独购买。',
commercialEdition: '商业版本',
pluginMessage: '该功能由{commercial}插件 {plugins} 提供。{license}',
commercial: '商业',
licenseDetails: '请查看{license}了解详情',
commercialLicense: '商业授权',
deprecatedMessage: '⚠️ 该功能已废弃,我们不建议在新项目中使用此功能。',
enterpriseEdition: '企业版',
commercialBaseUrl: 'https://www.nocobase.com'
},
'ja-JP': {
info: '注意',
deprecatedInfo: '非推奨',
bundledPluginMessage: 'この機能は商用プラグイン {plugins} によって提供されます,{edition} に含まれており、個別の購入は必要ありません。',
commercialEdition: '商用版',
pluginMessage: 'この機能は{commercial}プラグイン {plugins} によって提供されます。{license}',
commercial: '商用',
licenseDetails: '詳細については、{license}をご覧ください。',
commercialLicense: '商用ライセンス',
deprecatedMessage: '⚠️ この機能は非推奨となりました。新しいプロジェクトでの使用はお勧めしません。',
enterpriseEdition: '企業版',
commercialBaseUrl: 'https://www.nocobase.com'
},
'en-US': {
info: 'INFO',
deprecatedInfo: 'DEPRECATED',
bundledPluginMessage: 'This feature is provided by the commercial plugin {plugins}, included in the {edition}, with no additional purchase required.',
commercialEdition: 'commercial edition',
pluginMessage: 'This feature is provided by the {commercial}plugin {plugins}.{license}',
commercial: 'Commercial',
licenseDetails: 'For details, please check the {license}.',
commercialLicense: 'Commercial License',
deprecatedMessage: '⚠️ This feature is deprecated and not recommended for use in new projects.',
enterpriseEdition: 'enterprise edition',
commercialBaseUrl: 'https://www.nocobase.com'
}
};
2 changes: 1 addition & 1 deletion docs/en-US/handbook/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Backup and Restore

<PluginInfo name="backup-restore"></PluginInfo>
<PluginInfo name="backup-restore" deprecated=true></PluginInfo>

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/plugins/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Backup-Restore

<PluginInfo name="backup-restore" deprecated=true></PluginInfo>
## Introduction

The backup-restore and restore plugin for the NocoBase application is used in scenarios such as application replication, migration, and upgrades.
Expand Down
2 changes: 1 addition & 1 deletion docs/fr-FR/plugins/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Backup and Restore

<PluginInfo name="backup-restore" deprecated=true></PluginInfo>
## Introduction

The backup and restore plugin for the NocoBase application is used in scenarios such as application replication, migration, and upgrades.
Expand Down
2 changes: 1 addition & 1 deletion docs/ja-JP/handbook/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# バックアップと復元

<PluginInfo name="plugin-manager"></PluginInfo>
<PluginInfo name="backup-restore" deprecated=true></PluginInfo>

## 紹介

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/handbook/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 备份和还原

<PluginInfo name="plugin-manager"></PluginInfo>
<PluginInfo name="backup-restore" deprecated=true></PluginInfo>

## 介绍

Expand Down
Loading