mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
Separate examples for translation functionality
This commit is contained in:
parent
3033688d40
commit
330153fbf3
3 changed files with 56 additions and 1 deletions
49
examples-translations/crowdin.yaml
Normal file
49
examples-translations/crowdin.yaml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
project_identifier_env: CROWDIN_PROJECT_ID
|
||||||
|
api_key_env: CROWDIN_API_KEY
|
||||||
|
base_path: "./"
|
||||||
|
preserve_hierarchy: true
|
||||||
|
|
||||||
|
files:
|
||||||
|
-
|
||||||
|
source: '/docs/en/*.md'
|
||||||
|
translation: '/docs/%locale%/%original_file_name%'
|
||||||
|
languages_mapping: &anchor
|
||||||
|
locale:
|
||||||
|
'af': 'af'
|
||||||
|
'ar': 'ar'
|
||||||
|
'bs-BA': 'bs-BA'
|
||||||
|
'ca': 'ca'
|
||||||
|
'cs': 'cs'
|
||||||
|
'da': 'da'
|
||||||
|
'de': 'de'
|
||||||
|
'el': 'el'
|
||||||
|
'es-ES': 'es-ES'
|
||||||
|
'fa': 'fa-IR'
|
||||||
|
'fi': 'fi'
|
||||||
|
'fr': 'fr'
|
||||||
|
'he': 'he'
|
||||||
|
'hu': 'hu'
|
||||||
|
'id': 'id-ID'
|
||||||
|
'it': 'it'
|
||||||
|
'ja': 'ja'
|
||||||
|
'ko': 'ko'
|
||||||
|
'mr': 'mr-IN'
|
||||||
|
'nl': 'nl'
|
||||||
|
'no': 'no-NO'
|
||||||
|
'pl': 'pl'
|
||||||
|
'pt-BR': 'pt-BR'
|
||||||
|
'pt-PT': 'pt-PT'
|
||||||
|
'ro': 'ro'
|
||||||
|
'ru': 'ru'
|
||||||
|
'sk': 'sk-SK'
|
||||||
|
'sr': 'sr'
|
||||||
|
'sv-SE': 'sv-SE'
|
||||||
|
'tr': 'tr'
|
||||||
|
'uk': 'uk'
|
||||||
|
'vi': 'vi'
|
||||||
|
'zh-CN': 'zh-Hans'
|
||||||
|
'zh-TW': 'zh-Hant'
|
||||||
|
-
|
||||||
|
source: '/website/i18n/en.json'
|
||||||
|
translation: '/website/i18n/%locale%.json'
|
||||||
|
languages_mapping: *anchor
|
|
@ -12,4 +12,10 @@
|
||||||
const CWD = process.cwd();
|
const CWD = process.cwd();
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
|
|
||||||
fs.copySync(__dirname + "/../examples/", CWD, { overwrite: false });
|
if (process.argv.indexOf("translations") !== -1) {
|
||||||
|
fs.copySync(__dirname + "/../examples-translations/", CWD, {
|
||||||
|
overwrite: false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
fs.copySync(__dirname + "/../examples/", CWD, { overwrite: false });
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue