Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action for upload the localisation to crowdin. #1369

Merged
Merged
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Crowdin Action

on:
push:
branches: [ master ]
paths:
- 'osu.Game.Rulesets.Karaoke/Localisation/**'

jobs:
generate-localization-file:
name: Generate the localization file
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: dotnet restore
- name: Install the localization tools.
run: dotnet tool restore
- name: Generate the localization file
run: dotnet localisation to-resx ./osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj --output ${{github.workspace}}\crowdin

synchronize-with-crowdin:
name: Upload the localization into crowdin
runs-on: ubuntu-latest
needs: [generate-localization-file]
steps:
- name: crowdin action
uses: crowdin/[email protected]
with:
upload_translations: true
download_translations: false
source: ${{github.workspace}}\crowdin\*.resx
translation: ${{github.workspace}}\crowdin\%file_name%.%locale%.%file_extension%
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}