mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-13 02:37:18 +03:00
feat(ci): add updated language names to the POEditor PR title (#3566)
* refactor(ci): add updated languages to the POEditor PR title Signed-off-by: Deluan <deluan@navidrome.org> * refactor(ci): add an author to the PR Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
3e47819f7a
commit
c11fd9ce28
9
.github/workflows/update-translations.sh
vendored
9
.github/workflows/update-translations.sh
vendored
@ -42,3 +42,12 @@ for file in ${I18N_DIR}/*.json; do
|
||||
echo "Downloading $lang ($code)"
|
||||
check_lang_diff "$code"
|
||||
done
|
||||
|
||||
|
||||
# List changed languages to stderr
|
||||
languages=""
|
||||
for file in $(git diff --name-only --exit-code | grep json); do
|
||||
lang=$(jq -r .languageName < "$file")
|
||||
languages="${languages}$(echo $lang | tr -d '\n'), "
|
||||
done
|
||||
echo "${languages%??}" 1>&2
|
9
.github/workflows/update-translations.yml
vendored
9
.github/workflows/update-translations.yml
vendored
@ -10,11 +10,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get updated translations
|
||||
id: poeditor
|
||||
env:
|
||||
POEDITOR_PROJECTID: ${{ secrets.POEDITOR_PROJECTID }}
|
||||
POEDITOR_APIKEY: ${{ secrets.POEDITOR_APIKEY }}
|
||||
run: |
|
||||
.github/workflows/update-translations.sh
|
||||
.github/workflows/update-translations.sh 2> title.tmp
|
||||
title=$(cat title.tmp)
|
||||
echo "::set-output name=title::$title"
|
||||
rm title.tmp
|
||||
- name: Show changes, if any
|
||||
run: |
|
||||
git status --porcelain
|
||||
@ -23,6 +27,7 @@ jobs:
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
author: "navidrome-bot <navidrome-bot@navidrome.org>"
|
||||
commit-message: "fix(ui): update translations from POEditor"
|
||||
title: "fix(ui): update translations from POEditor"
|
||||
title: "fix(ui): update ${{ steps.poeditor.outputs.title }} translations from POEditor"
|
||||
branch: update-translations
|
||||
|
Loading…
x
Reference in New Issue
Block a user