Skip to content

Merge pull request #2253 from andy840119/translate-to-translation #35

Merge pull request #2253 from andy840119/translate-to-translation

Merge pull request #2253 from andy840119/translate-to-translation #35

Workflow file for this run

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 ./crowdin
- name: Upload the localization into crowdin
uses: crowdin/[email protected]
with:
# 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 }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Send notification after upload success or failed.
uses: mshick/add-pr-comment@v2
with:
if: always()
message: |
πŸš€πŸš€πŸš€ New localization string has been successfully uploaded to the crowdin πŸš€πŸš€πŸš€
Go to https://crowdin.com/project/karaoke-dev to fill the translation.
message-failure: |
πŸ’₯πŸ’₯πŸ’₯ New localization string uploaded failed to the crowdin. πŸ’₯πŸ’₯πŸ’₯
You can ignore this message or contact to the developer if you want to translate it now.