Files
PocketMine-MP/.github/workflows/upload-translations.yml
Dylan K. Taylor 87afd545fd Merge the Language repo into the main PM repo
the separated language repository has long been a source of inconvenience and annoyance,
particularly for PR contributors, because having to sync two PRs across different repos
for no reason adds unnecessary friction.

In addition, having the language files separate creates unnecessary requirements for
versioning and branching, which could all be avoided if the language strings were managed
directly in this repository.

This change will make it much easier to do new features that require adding new translation
strings, as well as getting rid of the inconvenience of cleaning up older strings.
Translation updates from Crowdin should also be able to be merged more quickly, since they
will have higher visibility on this repository.
2025-10-18 15:55:24 +01:00

39 lines
1019 B
YAML

name: Upload translations to Crowdin
on:
push:
paths:
- resources/translations/eng.ini
branches:
- stable
- minor-next
- major-next
workflow_dispatch:
jobs:
upload:
name: Upload translations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Preprocess eng.ini placeholders so Crowdin can understand them
working-directory: resources/translations
run: |
sed -i -r 's/\{%([A-Za-z0-9]+)\}/\{\1\}/g' eng.ini
cat eng.ini
- name: Upload eng.ini to Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
create_pull_request: false
crowdin_branch_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}