Skip to content

Commit

Permalink
Update sphinx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiangirlea committed Jun 23, 2023
1 parent a4a5803 commit 6835b96
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Update POT file

on:
workflow_dispatch:
push:
paths:
- 'docs/index.rst'
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,11 +25,11 @@ jobs:
- name: Update POT-Creation-Date in .po files
run: |
find locales -type f -name '*.po' | while read -r file; do
if grep -q 'POT-Creation-Date:' "$file" && ! grep -q 'POT-Creation-Date: .\+' "$file"; then
current_date=$(date '+%Y-%m-%d %H:%M')
sed -i "s/POT-Creation-Date:/POT-Creation-Date: $current_date/" "$file"
fi
done
if grep -q 'POT-Creation-Date:' "$file" && ! grep -q 'POT-Creation-Date: .\+' "$file"; then
current_date=$(date '+%Y-%m-%d %H:%M')
sed -i "s/POT-Creation-Date:/POT-Creation-Date: $current_date/" "$file"
fi
done
- name: Dynamically update .po files for all languages
run: |
for lang_dir in $(find locales -type d -name LC_MESSAGES); do
Expand Down

0 comments on commit 6835b96

Please sign in to comment.