Skip to content

Commit

Permalink
Merge pull request #1370 from karaoke-dev/test-upload-localization
Browse files Browse the repository at this point in the history
Trigger the upload localization string.
  • Loading branch information
andy840119 authored Jun 10, 2022
2 parents fe146ee + a9a6466 commit 3015aef
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ jobs:
- 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
run: dotnet localisation to-resx ./osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj --output ./crowdin

synchronize-with-crowdin:
name: Upload the localization into crowdin
runs-on: ubuntu-latest
needs: [generate-localization-file]
steps:
- name: crowdin action
- name: Upload the localization into crowdin
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%
# upload the source to the target path of the https://github.com/karaoke-dev/karaoke-resources
# see the document in the https://support.crowdin.com/configuration-file/?q=dest
upload_sources: true
upload_sources_args: '--dest master/osu.Game.Rulesets.Karaoke.Resources/Localisation/%file_name%.%file_extension%'
source: crowdin/*.resx
# there's no translation can be uploaded in this repo, but we still need to give it a value.
translation: crowdin/%file_name%.%locale%.%file_extension%
# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string.
# See "API v2" on https://crowdin.com/project/<your-project>/settings#api
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
# A personal access token, not to be confused with Crowdin API v1 "API key".
# See https://crowdin.com/settings#api-key to generate a token.
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
Expand Down

0 comments on commit 3015aef

Please sign in to comment.