Skip to content

Commit

Permalink
Here goes nothin
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Sep 10, 2023
1 parent 74af16e commit 1a6780a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/generate-mo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
- name: Remove translations with low completion
working-directory: translations
run: |
now=$(date)
echo "## FOSSBilling Translations" >>translations.md
echo "Dated: $now" >>translations.md
for po_file in $(find . -name "*.po"); do
dirname=$(dirname "$po_file")
translation=$(dirname "$dirname")
Expand Down Expand Up @@ -88,11 +92,25 @@ jobs:
if [ "$completion_percentage" -lt 25 ] && [ "$dirname" != "./en_US/LC_MESSAGES" ]; then
rm -rf "$translation"
echo "Removing $translation from the final translation as it is only $completion_percentage% complete."
else
else
if [ "$dirname" != "./en_US/LC_MESSAGES" ]; then
echo " - \`$translation\` is $completion_percentage% translated" >>translations.md
fi
rm -f "$dirname/messages.po"
fi
done
rm -f messages.mo
- name: Display the new file structure
run: ls -R
- name: Create a zip of the translations
run: zip -r ./translations.zip .
working-directory: translations

- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
name: Latest Translations
tag: latest
commit: main
bodyFile: translations/translations.md
artifacts: translations/translations.zip
allowUpdates: true

0 comments on commit 1a6780a

Please sign in to comment.