|
49 | 49 | - name: Install dependencies |
50 | 50 | run: | |
51 | 51 | sudo apt-get update |
52 | | - sudo apt-get install -y hunspell hunspell-pl |
| 52 | + sudo apt-get install -y curl hunspell hunspell-pl unzip |
53 | 53 | make venv |
54 | 54 | # Pospell needs newer Docutils than the Sphinx used by older branches. |
55 | 55 | uv venv "$RUNNER_TEMP/spellcheck-venv" |
|
64 | 64 | sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_PL.aff" |
65 | 65 | iconv -f "$dictionary_encoding" -t UTF-8 /usr/share/hunspell/pl_PL.dic \ |
66 | 66 | > "$RUNNER_TEMP/hunspell-utf8/pl_PL.dic" |
| 67 | + - name: Download SJP Polish dictionary |
| 68 | + run: | |
| 69 | + curl --fail --location --retry 3 \ |
| 70 | + https://sjp.pl/sl/ort/sjp-hunspell-pl-20260901.zip \ |
| 71 | + --output "$RUNNER_TEMP/sjp-hunspell.zip" |
| 72 | + echo "47a5ab02cf3def374994b1b03efd9fed2de868349b8ddcebac281b484353d157 $RUNNER_TEMP/sjp-hunspell.zip" \ |
| 73 | + | sha256sum --check --strict |
| 74 | + # SJP wraps the dictionary files in a second ZIP archive. |
| 75 | + unzip -p "$RUNNER_TEMP/sjp-hunspell.zip" pl_PL.zip \ |
| 76 | + > "$RUNNER_TEMP/sjp-pl_PL.zip" |
| 77 | + unzip -p "$RUNNER_TEMP/sjp-pl_PL.zip" pl_PL.aff \ |
| 78 | + > "$RUNNER_TEMP/sjp-pl_PL.aff" |
| 79 | + unzip -p "$RUNNER_TEMP/sjp-pl_PL.zip" pl_PL.dic \ |
| 80 | + > "$RUNNER_TEMP/sjp-pl_PL.dic" |
| 81 | + dictionary_encoding=$(sed -n 's/^SET //p' "$RUNNER_TEMP/sjp-pl_PL.aff") |
| 82 | + iconv -f "$dictionary_encoding" -t UTF-8 "$RUNNER_TEMP/sjp-pl_PL.aff" \ |
| 83 | + > "$RUNNER_TEMP/hunspell-utf8/pl_SJP.aff" |
| 84 | + sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_SJP.aff" |
| 85 | + iconv -f "$dictionary_encoding" -t UTF-8 "$RUNNER_TEMP/sjp-pl_PL.dic" \ |
| 86 | + > "$RUNNER_TEMP/hunspell-utf8/pl_SJP.dic" |
67 | 87 | - name: Download Polish terminology glossary |
68 | 88 | working-directory: cpython/Doc/locales/pl/LC_MESSAGES |
69 | 89 | env: |
|
90 | 110 | env: |
91 | 111 | DICPATH: ${{ runner.temp }}/hunspell-utf8 |
92 | 112 | run: > |
93 | | - "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL |
| 113 | + "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL,pl_SJP |
94 | 114 | --personal-dict "$RUNNER_TEMP/hunspell-glossary.dic" |
95 | 115 | --glob 'locales/pl/LC_MESSAGES/**/*.po' |
96 | 116 | # PO updates exist only in this disposable checkout; nothing is committed. |
0 commit comments