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 6835b96 commit 4ecdf8c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ jobs:
run: pip install sphinx-intl
- 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
current_date=$(date '+%Y-%m-%d %H:%M%z')
find locales -type f -name '*.po' -exec sed -i "s/POT-Creation-Date: .*/POT-Creation-Date: $current_date/" {} \;
- name: Dynamically update .po files for all languages
run: |
for lang_dir in $(find locales -type d -name LC_MESSAGES); do
echo "Processing language directory: $lang_dir"
lang_code=$(basename $(dirname "$lang_dir"))
for po_file in $(find "$lang_dir" -type f -name "*.po"); do
echo "Processing .po file: $po_file"
done
sphinx-intl update -p . -l "$lang_code"
done
- name: Run msgmerge
Expand Down

0 comments on commit 4ecdf8c

Please sign in to comment.