Crowdin integration to translate the docs (#4029)
* Start Crowdin integration, for #3890 * Wire up crowdin in docs deployment
This commit is contained in:
parent
ab07883336
commit
aebcd41102
16
docs/crowdin.yml
Normal file
16
docs/crowdin.yml
Normal file
@ -0,0 +1,16 @@
|
||||
project_id: '455186'
|
||||
api_token_env: 'CROWDIN_PERSONAL_TOKEN'
|
||||
preserve_hierarchy: true
|
||||
files: [
|
||||
# Markdown files for the user manual
|
||||
{
|
||||
source: '/docs/manual/**/*',
|
||||
translation: '/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%',
|
||||
},
|
||||
# Docs home page
|
||||
{
|
||||
source: '/docs/index.md',
|
||||
translation: '/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/%original_file_name%',
|
||||
},
|
||||
|
||||
]
|
@ -8,6 +8,10 @@ module.exports = {
|
||||
favicon: 'img/openrefine_logo.png',
|
||||
organizationName: 'OpenRefine', // Usually your GitHub org/user name.
|
||||
projectName: 'OpenRefine', // Usually your repo name.
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'jp', 'fr'],
|
||||
},
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
title: 'OpenRefine Documentation',
|
||||
@ -22,12 +26,19 @@ module.exports = {
|
||||
label: 'User Manual',
|
||||
position: 'left',
|
||||
},
|
||||
{to: 'technical-reference/technical-reference-index',
|
||||
label: 'Technical Reference',
|
||||
position: 'left'},
|
||||
{
|
||||
to: 'technical-reference/technical-reference-index',
|
||||
label: 'Technical Reference',
|
||||
position: 'left'
|
||||
},
|
||||
{
|
||||
type: 'localeDropdown',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/OpenRefine/OpenRefine/edit/master/docs',
|
||||
label: 'GitHub',
|
||||
'aria-label': 'GitHub',
|
||||
className: 'header-github-link',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
|
9
docs/netlify.toml
Normal file
9
docs/netlify.toml
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
# Note: this file's config overrides the Netlify UI admin config
|
||||
|
||||
[context.production]
|
||||
command = "yarn netlify:build:production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "yarn netlify:build:deployPreview"
|
||||
|
@ -9,9 +9,13 @@
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy"
|
||||
"deploy": "docusaurus deploy",
|
||||
"crowdin": "crowdin",
|
||||
"netlify:build:production": "docusaurus write-translations && crowdin upload && crowdin download && yarn build",
|
||||
"netlify:build:deployPreview": "docusaurus write-translations && yarn build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@crowdin/cli": "3",
|
||||
"@docusaurus/core": "^2.0.0-beta.1",
|
||||
"@docusaurus/preset-classic": "^2.0.0-beta.3",
|
||||
"clsx": "^1.1.1",
|
||||
|
@ -1107,6 +1107,13 @@
|
||||
"@babel/helper-validator-identifier" "^7.12.11"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@crowdin/cli@3":
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@crowdin/cli/-/cli-3.6.0.tgz#67a882c1f15403da0d4492091b812d15ca593234"
|
||||
integrity sha512-vXycSWnt45bRrV7u6KvvlN0hUm7pXMKlYYDKdRjvvcIFGB3km7WkVXvft9lYOpCH1wHmR7TqjsZQPPQRWqppyA==
|
||||
dependencies:
|
||||
shelljs "^0.8.4"
|
||||
|
||||
"@docsearch/css@3.0.0-alpha.36":
|
||||
version "3.0.0-alpha.36"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.0.0-alpha.36.tgz#0af69a86b845974d0f8cab62db0218f66b6ad2d6"
|
||||
|
Loading…
Reference in New Issue
Block a user