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

i18n support + zh-Hans docs #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ static website generator.
## Installation

```shell
pnpm
pnpm i
```

## Local Development
Expand Down
20 changes: 19 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,21 @@ const config = {

i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'zh-Hans'],
path: 'i18n',
localeConfigs: {
en: {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'en',
},
'zh-Hans': {
label: '中文(中国)',
path: 'zh-Hans',
},
},
},

presets: [
Expand Down Expand Up @@ -125,6 +139,10 @@ const config = {
position: 'right',
docsPluginId: 'api',
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/goatcorp/Dalamud',
position: 'right',
Expand Down
412 changes: 412 additions & 0 deletions i18n/en/code.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions i18n/en/docusaurus-plugin-content-blog/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": {
"message": "Blog",
"description": "The title for the blog used in SEO"
},
"description": {
"message": "Blog",
"description": "The description for the blog used in SEO"
},
"sidebar.title": {
"message": "Recent posts",
"description": "The label for the left sidebar"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version.label": {
"message": "X.x (Placeholder)",
"description": "The label for version placeholder"
}
}
38 changes: 38 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version.label": {
"message": "Next",
"description": "The label for version current"
},
"sidebar.docSidebar.category.Plugin Development": {
"message": "Plugin Development",
"description": "The label for category Plugin Development in sidebar docSidebar"
},
"sidebar.docSidebar.category.Plugin Development.link.generated-index.title": {
"message": "Plugin Development",
"description": "The generated-index page title for category Plugin Development in sidebar docSidebar"
},
"sidebar.docSidebar.category.Plugin Development.link.generated-index.description": {
"message": "Learn the basics of Dalamud plugin development.",
"description": "The generated-index page description for category Plugin Development in sidebar docSidebar"
},
"sidebar.docSidebar.category.How To's": {
"message": "How To's",
"description": "The label for category How To's in sidebar docSidebar"
},
"sidebar.docSidebar.category.How To's.link.generated-index.title": {
"message": "How To's",
"description": "The generated-index page title for category How To's in sidebar docSidebar"
},
"sidebar.docSidebar.category.How To's.link.generated-index.description": {
"message": "Learn more about specific APIs",
"description": "The generated-index page description for category How To's in sidebar docSidebar"
},
"sidebar.docSidebar.category.Versions & Channels": {
"message": "Versions & Channels",
"description": "The label for category Versions & Channels in sidebar docSidebar"
},
"sidebar.docSidebar.category.Development FAQ (Legacy)": {
"message": "Development FAQ (Legacy)",
"description": "The label for category Development FAQ (Legacy) in sidebar docSidebar"
}
}
22 changes: 22 additions & 0 deletions i18n/en/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"link.title.Community": {
"message": "Community",
"description": "The title of the footer links column with title=Community in the footer"
},
"link.title.More": {
"message": "More",
"description": "The title of the footer links column with title=More in the footer"
},
"link.item.label.Discord": {
"message": "Discord",
"description": "The label of footer link with label=Discord linking to https://discord.gg/holdshift"
},
"link.item.label.GitHub": {
"message": "GitHub",
"description": "The label of footer link with label=GitHub linking to https://github.com/goatcorp/Dalamud"
},
"copyright": {
"message": "Final Fantasy XIV © 2010-2023 SQUARE ENIX CO., LTD. All Rights Reserved. We are not affiliated with SQUARE ENIX CO., LTD. in any way.",
"description": "The footer copyright"
}
}
22 changes: 22 additions & 0 deletions i18n/en/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"title": {
"message": "Dalamud.dev",
"description": "The title in the navbar"
},
"logo.alt": {
"message": "Dalamud logo",
"description": "The alt text of navbar logo"
},
"item.label.Docs": {
"message": "Docs",
"description": "Navbar item with label Docs"
},
"item.label.API": {
"message": "API",
"description": "Navbar item with label API"
},
"item.label.News": {
"message": "News",
"description": "Navbar item with label News"
}
}
Loading