diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e324dcb16..5b44932f83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,7 +78,7 @@ jobs: name: Deploy v1 Website # Skip the deploy if we don't have the right org (facebook), or if this is just a pull request command: | - if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -E "(docusaurus-1\.x\/.*)|(website-1\.x\/.*)"; then + if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -E "(crowdin-v1.yml)|(docusaurus-1\.x\/.*)|(website-1\.x\/.*)"; then echo "Skipping deploy. No relevant v1 website files have changed" elif [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then echo "Deploying website v1..." @@ -88,9 +88,12 @@ jobs: yarn run write-translations # upload translation strings and download translations - # TODO we have a weird Crowdin error "Project already contains the file", trying to resolve that with support - # In the meantime we should not block the v1 site deployment - yarn crowdin-upload || echo "Crowdin source upload failure, but we'll continue..." + # IMPORTANT: if this fails due to a Crowdin error like "Project already contains the file" + # Sometimes Crowdin refuse to upload the new versioned docs for obscure reasons + # Workaround: upload manually the new versioned files through the Crowdin UI... + # If the files already exist on Crowdin, the source upload will now work... + # All this has been extensively reported to their support already. + yarn crowdin-upload # download only enabled languages yarn crowdin-download diff --git a/crowdin-v1.yml b/crowdin-v1.yml index 510a920137..b971c312b7 100644 --- a/crowdin-v1.yml +++ b/crowdin-v1.yml @@ -3,34 +3,36 @@ api_token_env: 'CROWDIN_PERSONAL_TOKEN' base_path: "." preserve_hierarchy: true +languages_mapping: &languages_mapping + locale: + 'es-ES': 'es-ES' + 'fr': 'fr' + 'it': 'it' + 'ja': 'ja' + 'ko': 'ko' + 'nl': 'nl' + 'pt-BR': 'pt-BR' + 'ro': 'ro' + 'ru': 'ru' + 'sk': 'sk-SK' + 'sr': 'sr' + 'sv-SE': 'sv-SE' + 'tr': 'tr' + 'uk': 'uk' + 'vi': 'vi' + 'zh-CN': 'zh-CN' + 'zh-TW': 'zh-TW' + files: - source: '/website-1.x/docs/**/*.md' translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%' - languages_mapping: &anchor - locale: - 'es-ES': 'es-ES' - 'fr': 'fr' - 'it': 'it' - 'ja': 'ja' - 'ko': 'ko' - 'nl': 'nl' - 'pt-BR': 'pt-BR' - 'ro': 'ro' - 'ru': 'ru' - 'sk': 'sk-SK' - 'sr': 'sr' - 'sv-SE': 'sv-SE' - 'tr': 'tr' - 'uk': 'uk' - 'vi': 'vi' - 'zh-CN': 'zh-CN' - 'zh-TW': 'zh-TW' + languages_mapping: *languages_mapping - source: '/website-1.x/versioned_docs/**/*.md' translation: '/website-1.x/translated_docs/%locale%/**/%original_file_name%' - languages_mapping: *anchor + languages_mapping: *languages_mapping - source: '/website-1.x/i18n/en.json' translation: '/website-1.x/i18n/%locale%.json' - languages_mapping: *anchor + languages_mapping: *languages_mapping