Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Add crowdin integration action #2654

Merged
merged 49 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d5e6c8c
Add crowdin integration action
squirrelsc Jul 7, 2020
836be03
Update main.yml
squirrelsc Jul 8, 2020
d6c06ed
Update main.yml
squirrelsc Jul 8, 2020
2c0f8c5
Update main.yml
squirrelsc Jul 8, 2020
9559648
Update crowdin.yml
squirrelsc Jul 8, 2020
ecae7c2
Update main.yml
squirrelsc Jul 8, 2020
e1d02d3
Update main.yml
squirrelsc Jul 8, 2020
5faf37e
Update main.yml
squirrelsc Jul 8, 2020
178ecbf
Update main.yml
squirrelsc Jul 8, 2020
451ff67
Update crowdin.yml
squirrelsc Jul 8, 2020
46a67a0
Update crowdin.yml
squirrelsc Jul 8, 2020
cb391dc
Update main.yml
squirrelsc Jul 8, 2020
d7c98e3
Update main.yml
squirrelsc Jul 8, 2020
a7bbd23
Update crowdin.yml
squirrelsc Jul 8, 2020
d3700e5
Update crowdin.yml
squirrelsc Jul 8, 2020
de0f036
Update crowdin.yml
squirrelsc Jul 8, 2020
d989073
Update crowdin.yml
squirrelsc Jul 8, 2020
76ab354
Update main.yml
squirrelsc Jul 8, 2020
773fc3f
Update crowdin.yml
squirrelsc Jul 8, 2020
9180719
Update crowdin.yml
squirrelsc Jul 8, 2020
ec10e58
Update crowdin.yml
squirrelsc Jul 8, 2020
ba56412
Update crowdin.yml
squirrelsc Jul 8, 2020
af205ca
Update crowdin.yml
squirrelsc Jul 8, 2020
6607341
Update crowdin.yml
squirrelsc Jul 8, 2020
a7d59da
Update main.yml
squirrelsc Jul 8, 2020
9470002
Update Cifar10Examples.md
squirrelsc Jul 8, 2020
01d2dbf
Update Cifar10Examples.md
squirrelsc Jul 8, 2020
fd9035f
Update README.md
squirrelsc Jul 8, 2020
3877645
Update main.yml
squirrelsc Jul 8, 2020
33ba101
Update main.yml
squirrelsc Jul 8, 2020
2b68b06
Update main.yml
squirrelsc Jul 8, 2020
61c5d15
Update main.yml
squirrelsc Jul 8, 2020
a913845
Update main.yml
squirrelsc Jul 8, 2020
b6e4a92
Update main.yml
squirrelsc Jul 8, 2020
d135212
Update main.yml
squirrelsc Jul 8, 2020
c65d213
Update main.yml
squirrelsc Jul 8, 2020
1af7838
Update main.yml
squirrelsc Jul 8, 2020
7f4e52a
Update main.yml
squirrelsc Jul 8, 2020
fcc8a28
Update main.yml
squirrelsc Jul 8, 2020
2725f9f
Update crowdin.yml
squirrelsc Jul 8, 2020
85cb886
Update main.yml
squirrelsc Jul 8, 2020
fe477bb
Update main.yml
squirrelsc Jul 8, 2020
7cd66e0
Update main.yml
squirrelsc Jul 8, 2020
44a1bfd
Update main.yml
squirrelsc Jul 8, 2020
1e18f32
Update main.yml
squirrelsc Jul 8, 2020
5a4229a
Update main.yml
squirrelsc Jul 8, 2020
4b63be1
Update main.yml
squirrelsc Jul 8, 2020
14fe0d8
Update README.md
squirrelsc Jul 8, 2020
0070af1
Update README.md
squirrelsc Jul 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
paths:
- '**.md'
- '**.rst'
- '/docs/en_US/**'
- '.github/worklflows/**'
- '/crowdin.yml'
schedule:
- cron: '*/30 * * * *'


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
translation-syncup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# crowin-translation
- name: crowdin-action
uses: crowdin/github-action@1.0.8
with:
# Upload sources to Crowdin
upload_sources: true # optional, default is true
# Upload translations to Crowdin
upload_translations: false # optional, default is false
# Automatically approves uploaded translations
auto_approve_imported: false # optional, default is false
# Defines whether to add translation if it is equal to source string in Crowdin project
import_eq_suggestions: false # optional, default is false
# Make pull request of Crowdin translations
download_translations: true # optional, default is false
# Use this option to download translations for a single specified language
# download_language: # optional
# Skip untranslated strings in exported files (does not work with .docx, .html, .md and other document files)
# skip_untranslated_strings: # optional, default is false
# Omit downloading not fully downloaded files
# skip_untranslated_files: # optional, default is false
# Include approved translations only in exported files. If not combined with --skip-untranslated-strings option, strings without approval are fulfilled with the source language
export_only_approved: false # optional, default is false
# Download translations with pushing to branch
push_translations: true # optional, default is true
# To download translations to the specified version branch
localization_branch_name: l10n_${{ github.ref }} # optional, default is l10n_crowdin_action
# Create pull request after pushing to branch
create_pull_request: false # optional, default is true
# Option to upload or download files to the specified version branch in your Crowdin project
crowdin_branch_name: ${{ github.ref }} # optional
# Option to specify a path to user-specific credentials
# identity: # optional
# Option to specify a path to the configuration file
config: crowdin.yml # optional
# Option to preview the list of managed files
# dryrun_action: true # optional, default is false
# Numerical ID of the project
project_id: 304950 # optional
# Personal access token required for authentication
token: ${{ secrets.CROWDIN_TOKEN }} # optional
# Base URL of Crowdin server for API requests execution
# base_url: # optional
# Path to your project directory on a local machine
# base_path: # optional
# Path to the source files
# source: # optional
# Path to the translation files
# translation: # optional
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: 304950
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
15 changes: 9 additions & 6 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
- source: /docs/en_US/**/*
ignore:
- /docs/zh_CN/**/*
translation: /docs/%locale_with_underscore%/**/%original_file_name%
- source: '/**/*.[mM][dD]'
ignore:
- '*_%locale_with_underscore%.md'
- '/**/*_%locale_with_underscore%.md'
- /docs
- /%locale_with_underscore%
- '**/ISSUE_TEMPLATE/**'
- /.github
translation: /%original_path%/%file_name%_%locale_with_underscore%.md
- source: /docs/en_US/**/*
ignore:
- /docs/%locale_with_underscore%/**/*.*
translation: /docs/%locale_with_underscore%/**/%original_file_name%