Skip to content

Commit 85f00f0

Browse files
committed
Adjust translation build on CI
1 parent c84e386 commit 85f00f0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/rbe.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,7 @@ jobs:
5555
- name: Build all translations
5656
run: |
5757
for po_lang in ${{ env.LANGUAGES }}; do
58-
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
59-
if [[ $POT_CREATION_DATE == "" ]]; then
60-
POT_CREATION_DATE=now
61-
fi
62-
63-
echo "::group::Building $po_lang translation as of $POT_CREATION_DATE"
64-
rm -r src/
65-
git restore --source "$(git rev-list -n 1 --before "$POT_CREATION_DATE" @)" src/
66-
58+
echo "::group::Building $po_lang translation"
6759
# Set language and adjust site URL. Clear the redirects
6860
# since they are in sync with the source files, not the
6961
# translation.
@@ -74,6 +66,15 @@ jobs:
7466
echo "::endgroup::"
7567
done
7668
69+
- name: Check all translations for broken links
70+
run: |
71+
for po_lang in ${{ env.LANGUAGES }}; do
72+
MDBOOK_BOOK__LANGUAGE=$po_lang \
73+
MDBOOK_OUTPUT__HTML__SITE_URL=/rust-by-example/$po_lang/ \
74+
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
75+
sh linkcheck.sh --all rust-by-example
76+
done
77+
7778
- name: Upload Artifact
7879
uses: actions/upload-artifact@v3
7980
with:

0 commit comments

Comments
 (0)