-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Expand file tree
/
Copy pathcrowdin-v2.yaml
More file actions
73 lines (64 loc) · 3.26 KB
/
crowdin-v2.yaml
File metadata and controls
73 lines (64 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Crowdin credentials
project_id: '428890'
api_token_env: CROWDIN_PERSONAL_TOKEN
# base_path: '.'
# base_url: https://api.crowdin.com
preserve_hierarchy: true
# We generally want to use the "two-letters-code" of a locale (ie the language)
# But not for all locales!
# "pt-BR" may be better to remain as "pt-BR" instead of being transformed to "pt"
# Note: &/* is Yaml anchor syntax: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
languages_mapping: &languages_mapping
two_letters_code:
pt-BR: pt-BR
# Crowdin regularly update their MDX parser, leading to subtle breakage.
# Freezing the parser to a specific version is helpful to ensure things keep
# working when they upgrade their MDX parser.
# See https://github.com/facebook/docusaurus/pull/11432
#
# Note: you can find the parser version of a Crowdin file using browser DevTools
# and inspecting the MDX file icon, it should have a class ".file_type_mdx_v1_2"
# Find the latest version: manually upload a new .mdx file, then inspect it
#
# How to upgrade the parser version?
# - Rename /docs to /docs_backup on Crowdin UI (same for other mdx folders)
# - Update the parser version of this config file
# - Use the CLI to re-upload the MDX source files: they should now have the new parser version
# - Use the CLI to download the translations
# - Build the full i18n site to ensure it still works (the new parser might break things)
# - Make sure the site content remains translated (normally /docs & /docs_backup share the translation strings)
# - If things work well, you can merge the config update and delete the mdx backup folders on Crowdin UI
mdx_file_type: &mdx_file_type mdx_v2_4
#
# Files configuration
#
files:
- source: /website/i18n/en/**/*
translation: /website/i18n/%two_letters_code%/**/%original_file_name%
languages_mapping: *languages_mapping
- source: /website/docs/**/*.mdx
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
languages_mapping: *languages_mapping
type: *mdx_file_type
- source: /website/docs/**/*
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
languages_mapping: *languages_mapping
ignore: [/**/*.mdx]
- source: /website/versioned_docs/**/*.mdx
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name%
languages_mapping: *languages_mapping
type: *mdx_file_type
- source: /website/versioned_docs/**/*
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name%
languages_mapping: *languages_mapping
ignore: [/**/*.mdx]
- source: /website/community/**/*
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-docs-community/current/**/%original_file_name%
languages_mapping: *languages_mapping
- source: /website/blog/**/*
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-blog/**/%original_file_name%
languages_mapping: *languages_mapping
- source: /website/src/pages/**/*
translation: /website/i18n/%two_letters_code%/docusaurus-plugin-content-pages/**/%original_file_name%
ignore: [/**/*.js, /**/*.jsx, /**/*.ts, /**/*.tsx, /**/*.css]
languages_mapping: *languages_mapping