Fix: Only open/update issue when translations are needed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-10-05 16:20:07 +02:00
parent 0f544d9ac7
commit ef9df1683e
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5
2 changed files with 6 additions and 2 deletions

View file

@ -71,9 +71,13 @@ jobs:
- name: Generate (and validate) translations - name: Generate (and validate) translations
run: make translate run: make translate
- name: Delete issue template when no languages require translation
run: |
grep -q "### Language" translate-issue.md || rm -f translate-issue.md
- name: Update Translations Issue - name: Update Translations Issue
uses: JasonEtco/create-an-issue@v2 uses: JasonEtco/create-an-issue@v2
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' && hashFiles('translate-issue.md') != ''
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:

View file

@ -5,7 +5,7 @@ title: Missing Translations
**In order to achieve this we need to fix the following missing translations.** **In order to achieve this we need to fix the following missing translations.**
To do so please either **create a pull-request** updating the `i18n.yaml` in the root of the repository and add the missing translations to the corresponding language or **just leave a comment** below and ping @Luzifer in your comment. He then will integrate the new translation strings and mark your comment hidden after this issue has been automatically updated (kind of a to-do list for translations until we have something better in place). To help translating please either **create a pull-request** updating the `i18n.yaml` in the root of the repository and add the missing translations to the corresponding language or **just leave a comment** below and ping @Luzifer in your comment. He then will integrate the new translation strings and mark your comment hidden after this issue has been automatically updated (kind of a to-do list for translations until we have something better in place).
{{ range $lang, $translation := .Translations -}} {{ range $lang, $translation := .Translations -}}
{{ if MissingTranslations $lang -}} {{ if MissingTranslations $lang -}}