Skip to content

Commit cb32207

Browse files
committed
website添加多语言
1 parent 6434559 commit cb32207

File tree

138 files changed

+9329
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+9329
-18
lines changed

website/docusaurus.config.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const config = {
2020

2121
// GitHub pages deployment config.
2222
// If you aren't using GitHub pages, you don't need these.
23-
organizationName: 'facebook', // Usually your GitHub org/user name.
24-
projectName: 'docusaurus', // Usually your repo name.
23+
organizationName: 'GeneralLibrary', // Usually your GitHub org/user name.
24+
projectName: 'GeneralLibrary', // Usually your repo name.
2525

2626
onBrokenLinks: 'throw',
2727
onBrokenMarkdownLinks: 'warn',
@@ -34,10 +34,12 @@ const config = {
3434
locales: ['zh','en'],
3535
localeConfigs: {
3636
zh: {
37-
htmlLang: 'zh-GB',
37+
label: '中文',
38+
direction: 'ltr',
3839
},
3940
en: {
40-
htmlLang: 'en-GB',
41+
label: 'English',
42+
direction: 'ltr',
4143
}
4244
}
4345
},
@@ -99,7 +101,8 @@ const config = {
99101
href: 'https://github.com/GeneralLibrary',
100102
label: 'GitHub',
101103
position: 'right',
102-
},{
104+
},
105+
{
103106
type: 'localeDropdown',
104107
position: 'right',
105108
}
@@ -121,17 +124,9 @@ const config = {
121124
title: 'Community',
122125
items: [
123126
{
124-
label: 'Stack Overflow',
125-
href: 'https://github.com/GeneralLibrary',
126-
},
127-
{
128-
label: 'Discord',
129-
href: 'https://github.com/GeneralLibrary',
130-
},
131-
{
132-
label: 'Twitter',
127+
label: 'GitHub',
133128
href: 'https://github.com/GeneralLibrary',
134-
},
129+
}
135130
],
136131
},
137132
{

website/i18n/en/code.json

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
{
2+
"theme.ErrorPageContent.title": {
3+
"message": "This page crashed.",
4+
"description": "The title of the fallback page when the page crashed"
5+
},
6+
"theme.BackToTopButton.buttonAriaLabel": {
7+
"message": "Scroll back to top",
8+
"description": "The ARIA label for the back to top button"
9+
},
10+
"theme.blog.archive.title": {
11+
"message": "Archive",
12+
"description": "The page & hero title of the blog archive page"
13+
},
14+
"theme.blog.archive.description": {
15+
"message": "Archive",
16+
"description": "The page & hero description of the blog archive page"
17+
},
18+
"theme.blog.paginator.navAriaLabel": {
19+
"message": "Blog list page navigation",
20+
"description": "The ARIA label for the blog pagination"
21+
},
22+
"theme.blog.paginator.newerEntries": {
23+
"message": "Newer Entries",
24+
"description": "The label used to navigate to the newer blog posts page (previous page)"
25+
},
26+
"theme.blog.paginator.olderEntries": {
27+
"message": "Older Entries",
28+
"description": "The label used to navigate to the older blog posts page (next page)"
29+
},
30+
"theme.blog.post.paginator.navAriaLabel": {
31+
"message": "Blog post page navigation",
32+
"description": "The ARIA label for the blog posts pagination"
33+
},
34+
"theme.blog.post.paginator.newerPost": {
35+
"message": "Newer Post",
36+
"description": "The blog post button label to navigate to the newer/previous post"
37+
},
38+
"theme.blog.post.paginator.olderPost": {
39+
"message": "Older Post",
40+
"description": "The blog post button label to navigate to the older/next post"
41+
},
42+
"theme.blog.post.plurals": {
43+
"message": "One post|{count} posts",
44+
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
45+
},
46+
"theme.blog.tagTitle": {
47+
"message": "{nPosts} tagged with \"{tagName}\"",
48+
"description": "The title of the page for a blog tag"
49+
},
50+
"theme.tags.tagsPageLink": {
51+
"message": "View All Tags",
52+
"description": "The label of the link targeting the tag list page"
53+
},
54+
"theme.docs.DocCard.categoryDescription": {
55+
"message": "{count} items",
56+
"description": "The default description for a category card in the generated index about how many items this category includes"
57+
},
58+
"theme.docs.breadcrumbs.navAriaLabel": {
59+
"message": "Breadcrumbs",
60+
"description": "The ARIA label for the breadcrumbs"
61+
},
62+
"theme.colorToggle.ariaLabel": {
63+
"message": "Switch between dark and light mode (currently {mode})",
64+
"description": "The ARIA label for the navbar color mode toggle"
65+
},
66+
"theme.colorToggle.ariaLabel.mode.dark": {
67+
"message": "dark mode",
68+
"description": "The name for the dark color mode"
69+
},
70+
"theme.colorToggle.ariaLabel.mode.light": {
71+
"message": "light mode",
72+
"description": "The name for the light color mode"
73+
},
74+
"theme.docs.paginator.navAriaLabel": {
75+
"message": "Docs pages",
76+
"description": "The ARIA label for the docs pagination"
77+
},
78+
"theme.docs.paginator.previous": {
79+
"message": "Previous",
80+
"description": "The label used to navigate to the previous doc"
81+
},
82+
"theme.docs.paginator.next": {
83+
"message": "Next",
84+
"description": "The label used to navigate to the next doc"
85+
},
86+
"theme.docs.tagDocListPageTitle.nDocsTagged": {
87+
"message": "One doc tagged|{count} docs tagged",
88+
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
89+
},
90+
"theme.docs.tagDocListPageTitle": {
91+
"message": "{nDocsTagged} with \"{tagName}\"",
92+
"description": "The title of the page for a docs tag"
93+
},
94+
"theme.docs.versionBadge.label": {
95+
"message": "Version: {versionLabel}"
96+
},
97+
"theme.docs.versions.unreleasedVersionLabel": {
98+
"message": "This is unreleased documentation for {siteTitle} {versionLabel} version.",
99+
"description": "The label used to tell the user that he's browsing an unreleased doc version"
100+
},
101+
"theme.docs.versions.unmaintainedVersionLabel": {
102+
"message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.",
103+
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
104+
},
105+
"theme.docs.versions.latestVersionSuggestionLabel": {
106+
"message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).",
107+
"description": "The label used to tell the user to check the latest version"
108+
},
109+
"theme.docs.versions.latestVersionLinkLabel": {
110+
"message": "latest version",
111+
"description": "The label used for the latest version suggestion link label"
112+
},
113+
"theme.common.editThisPage": {
114+
"message": "Edit this page",
115+
"description": "The link label to edit the current page"
116+
},
117+
"theme.common.headingLinkTitle": {
118+
"message": "Direct link to {heading}",
119+
"description": "Title for link to heading"
120+
},
121+
"theme.lastUpdated.atDate": {
122+
"message": " on {date}",
123+
"description": "The words used to describe on which date a page has been last updated"
124+
},
125+
"theme.lastUpdated.byUser": {
126+
"message": " by {user}",
127+
"description": "The words used to describe by who the page has been last updated"
128+
},
129+
"theme.lastUpdated.lastUpdatedAtBy": {
130+
"message": "Last updated{atDate}{byUser}",
131+
"description": "The sentence used to display when a page has been last updated, and by who"
132+
},
133+
"theme.NotFound.title": {
134+
"message": "Page Not Found",
135+
"description": "The title of the 404 page"
136+
},
137+
"theme.navbar.mobileVersionsDropdown.label": {
138+
"message": "Versions",
139+
"description": "The label for the navbar versions dropdown on mobile view"
140+
},
141+
"theme.tags.tagsListLabel": {
142+
"message": "Tags:",
143+
"description": "The label alongside a tag list"
144+
},
145+
"theme.admonition.caution": {
146+
"message": "caution",
147+
"description": "The default label used for the Caution admonition (:::caution)"
148+
},
149+
"theme.admonition.danger": {
150+
"message": "danger",
151+
"description": "The default label used for the Danger admonition (:::danger)"
152+
},
153+
"theme.admonition.info": {
154+
"message": "info",
155+
"description": "The default label used for the Info admonition (:::info)"
156+
},
157+
"theme.admonition.note": {
158+
"message": "note",
159+
"description": "The default label used for the Note admonition (:::note)"
160+
},
161+
"theme.admonition.tip": {
162+
"message": "tip",
163+
"description": "The default label used for the Tip admonition (:::tip)"
164+
},
165+
"theme.admonition.warning": {
166+
"message": "warning",
167+
"description": "The default label used for the Warning admonition (:::warning)"
168+
},
169+
"theme.AnnouncementBar.closeButtonAriaLabel": {
170+
"message": "Close",
171+
"description": "The ARIA label for close button of announcement bar"
172+
},
173+
"theme.blog.sidebar.navAriaLabel": {
174+
"message": "Blog recent posts navigation",
175+
"description": "The ARIA label for recent posts in the blog sidebar"
176+
},
177+
"theme.CodeBlock.copied": {
178+
"message": "Copied",
179+
"description": "The copied button label on code blocks"
180+
},
181+
"theme.CodeBlock.copyButtonAriaLabel": {
182+
"message": "Copy code to clipboard",
183+
"description": "The ARIA label for copy code blocks button"
184+
},
185+
"theme.CodeBlock.copy": {
186+
"message": "Copy",
187+
"description": "The copy button label on code blocks"
188+
},
189+
"theme.CodeBlock.wordWrapToggle": {
190+
"message": "Toggle word wrap",
191+
"description": "The title attribute for toggle word wrapping button of code block lines"
192+
},
193+
"theme.DocSidebarItem.expandCategoryAriaLabel": {
194+
"message": "Expand sidebar category '{label}'",
195+
"description": "The ARIA label to expand the sidebar category"
196+
},
197+
"theme.DocSidebarItem.collapseCategoryAriaLabel": {
198+
"message": "Collapse sidebar category '{label}'",
199+
"description": "The ARIA label to collapse the sidebar category"
200+
},
201+
"theme.NavBar.navAriaLabel": {
202+
"message": "Main",
203+
"description": "The ARIA label for the main navigation"
204+
},
205+
"theme.NotFound.p1": {
206+
"message": "We could not find what you were looking for.",
207+
"description": "The first paragraph of the 404 page"
208+
},
209+
"theme.NotFound.p2": {
210+
"message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
211+
"description": "The 2nd paragraph of the 404 page"
212+
},
213+
"theme.navbar.mobileLanguageDropdown.label": {
214+
"message": "Languages",
215+
"description": "The label for the mobile language switcher dropdown"
216+
},
217+
"theme.TOCCollapsible.toggleButtonLabel": {
218+
"message": "On this page",
219+
"description": "The label used by the button on the collapsible TOC component"
220+
},
221+
"theme.blog.post.readMore": {
222+
"message": "Read More",
223+
"description": "The label used in blog post item excerpts to link to full blog posts"
224+
},
225+
"theme.blog.post.readMoreLabel": {
226+
"message": "Read more about {title}",
227+
"description": "The ARIA label for the link to full blog posts from excerpts"
228+
},
229+
"theme.blog.post.readingTime.plurals": {
230+
"message": "One min read|{readingTime} min read",
231+
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
232+
},
233+
"theme.docs.breadcrumbs.home": {
234+
"message": "Home page",
235+
"description": "The ARIA label for the home page in the breadcrumbs"
236+
},
237+
"theme.docs.sidebar.collapseButtonTitle": {
238+
"message": "Collapse sidebar",
239+
"description": "The title attribute for collapse button of doc sidebar"
240+
},
241+
"theme.docs.sidebar.collapseButtonAriaLabel": {
242+
"message": "Collapse sidebar",
243+
"description": "The title attribute for collapse button of doc sidebar"
244+
},
245+
"theme.docs.sidebar.navAriaLabel": {
246+
"message": "Docs sidebar",
247+
"description": "The ARIA label for the sidebar navigation"
248+
},
249+
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
250+
"message": "Close navigation bar",
251+
"description": "The ARIA label for close button of mobile sidebar"
252+
},
253+
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
254+
"message": "← Back to main menu",
255+
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
256+
},
257+
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
258+
"message": "Toggle navigation bar",
259+
"description": "The ARIA label for hamburger menu button of mobile navigation"
260+
},
261+
"theme.docs.sidebar.expandButtonTitle": {
262+
"message": "Expand sidebar",
263+
"description": "The ARIA label and title attribute for expand button of doc sidebar"
264+
},
265+
"theme.docs.sidebar.expandButtonAriaLabel": {
266+
"message": "Expand sidebar",
267+
"description": "The ARIA label and title attribute for expand button of doc sidebar"
268+
},
269+
"theme.ErrorPageContent.tryAgain": {
270+
"message": "Try again",
271+
"description": "The label of the button to try again rendering when the React error boundary captures an error"
272+
},
273+
"theme.common.skipToMainContent": {
274+
"message": "Skip to main content",
275+
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
276+
},
277+
"theme.tags.tagsPageTitle": {
278+
"message": "Tags",
279+
"description": "The title of the tag list page"
280+
},
281+
"theme.unlistedContent.title": {
282+
"message": "Unlisted page",
283+
"description": "The unlisted content banner title"
284+
},
285+
"theme.unlistedContent.message": {
286+
"message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.",
287+
"description": "The unlisted content banner message"
288+
}
289+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version.label": {
3+
"message": "Next",
4+
"description": "The label for version current"
5+
},
6+
"sidebar.tutorialSidebar.category.Doc": {
7+
"message": "Doc",
8+
"description": "The label for category Doc in sidebar tutorialSidebar"
9+
},
10+
"sidebar.tutorialSidebar.category.Doc.link.generated-index.description": {
11+
"message": "GeneralUpdate开源项目在线文档.",
12+
"description": "The generated-index page description for category Doc in sidebar tutorialSidebar"
13+
},
14+
"sidebar.tutorialSidebar.category.Guide": {
15+
"message": "Guide",
16+
"description": "The label for category Guide in sidebar tutorialSidebar"
17+
},
18+
"sidebar.tutorialSidebar.category.Guide.link.generated-index.description": {
19+
"message": "指南.",
20+
"description": "The generated-index page description for category Guide in sidebar tutorialSidebar"
21+
},
22+
"sidebar.tutorialSidebar.category.Quik start": {
23+
"message": "Quik start",
24+
"description": "The label for category Quik start in sidebar tutorialSidebar"
25+
},
26+
"sidebar.tutorialSidebar.category.Quik start.link.generated-index.description": {
27+
"message": "Quik start.",
28+
"description": "The generated-index page description for category Quik start in sidebar tutorialSidebar"
29+
},
30+
"sidebar.tutorialSidebar.category.Release log": {
31+
"message": "Release log",
32+
"description": "The label for category Release log in sidebar tutorialSidebar"
33+
},
34+
"sidebar.tutorialSidebar.category.Release log.link.generated-index.description": {
35+
"message": "发布日志.",
36+
"description": "The generated-index page description for category Release log in sidebar tutorialSidebar"
37+
}
38+
}

0 commit comments

Comments
 (0)