diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d9436d..1f1e0a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Unreleased + +- The website got a brand new [translation to Chinese](https://task-zh.readthedocs.io/zh_CN/latest/) + by [@DeronW](https://github.com/DeronW). Thanks! + ## v3.18.0 - Show aliases on `task --list --silent` (`task --ls`). This means that aliases diff --git a/docs/constants.js b/docs/constants.js new file mode 100644 index 00000000..a9d26e49 --- /dev/null +++ b/docs/constants.js @@ -0,0 +1,11 @@ +const GITHUB_URL = 'https://github.com/go-task/task'; +const TWITTER_URL = 'https://twitter.com/taskfiledev'; +const DISCORD_URL = 'https://discord.gg/6TY36E39UK'; +const CHINESE_URL = 'https://task-zh.readthedocs.io/zh_CN/latest/'; + +module.exports = { + GITHUB_URL, + TWITTER_URL, + DISCORD_URL, + CHINESE_URL +}; diff --git a/docs/docs/community.md b/docs/docs/community.md index 35053f04..eed3a357 100644 --- a/docs/docs/community.md +++ b/docs/docs/community.md @@ -9,6 +9,12 @@ Some of the work to improve the Task ecosystem is done by the community, be it installation methods or integrations with code editor. I (the author) am thankful for everyone that helps me to improve the overall experience. +## Translations + +[@DeronW](https://github.com/DeronW) maintains the +[Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the +website [on this repository](https://github.com/DeronW/task). + ## Editor Integrations ### JSON Schema diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 5a3bd8d7..aa7b19d3 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,13 +1,15 @@ // @ts-check // Note: type annotations allow type checking and IDEs autocompletion +const { + GITHUB_URL, + TWITTER_URL, + DISCORD_URL, + CHINESE_URL +} = require('./constants'); const lightCodeTheme = require('./src/themes/prismLight'); const darkCodeTheme = require('./src/themes/prismDark'); -const GITHUB_URL = 'https://github.com/go-task/task'; -const TWITTER_URL = 'https://twitter.com/taskfiledev'; -const DISCORD_URL = 'https://discord.gg/6TY36E39UK'; - /** @type {import('@docusaurus/types').Config} */ const config = { title: 'Task', @@ -153,6 +155,15 @@ const config = { href: 'https://opencollective.com/task' } ] + }, + { + title: 'Translations', + items: [ + { + label: 'Chinese', + href: CHINESE_URL + } + ] } ] }, diff --git a/docs/sidebars.js b/docs/sidebars.js index 8ccbf3b5..b5bff706 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -1,9 +1,19 @@ // @ts-check +const { CHINESE_URL } = require('./constants'); + /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { tutorialSidebar: [ - { type: 'autogenerated', dirName: '.' }, + { + type: 'autogenerated', + dirName: '.' + }, + { + type: 'link', + label: 'Chinese', + href: CHINESE_URL + }, { type: 'html', value: '
'