From d2f012d5c65cf08b96b44ffb26a316a575129498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Mar 2024 19:51:03 +0100 Subject: [PATCH 1/3] Translations spelling --- .github/workflows/spelling-gettext.yml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/spelling-gettext.yml diff --git a/.github/workflows/spelling-gettext.yml b/.github/workflows/spelling-gettext.yml new file mode 100644 index 0000000..8667450 --- /dev/null +++ b/.github/workflows/spelling-gettext.yml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow + +name: "Translations spelling" + +on: + workflow_dispatch: null + +jobs: + hunspell_check: + name: "Hunspell" + runs-on: "ubuntu-latest" + timeout-minutes: 5 + steps: + - + name: "Checkout repository" + uses: "actions/checkout@v4" + - + name: "Install Hunspell" + run: "sudo -- apt-get install -y hunspell" + - + name: "Checkout dictionaries" + #run: "git clone --depth=1 https://anongit.freedesktop.org/git/libreoffice/dictionaries.git dictionaries" + uses: "actions/checkout@v4" + with: + repository: "LibreOffice/dictionaries" + path: "dictionaries" + - + name: "Search for misspellings" + run: | + MISSPELLED_WORDS="$( + sed -n -e 's#^msgstr "\(.\+\)"$#\1#p' languages/*hu_HU.po \ + | hunspell -d ./dictionaries/hu_HU/hu_HU -p hunspell.txt -l + )" + echo "${MISSPELLED_WORDS}" + test -z "${MISSPELLED_WORDS}" From 7c88751789b35e79361b65c32282f7d8f70595d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Mar 2024 20:07:07 +0100 Subject: [PATCH 2/3] Update spelling-gettext.yml --- .github/workflows/spelling-gettext.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spelling-gettext.yml b/.github/workflows/spelling-gettext.yml index 8667450..3cc075a 100644 --- a/.github/workflows/spelling-gettext.yml +++ b/.github/workflows/spelling-gettext.yml @@ -2,8 +2,21 @@ name: "Translations spelling" -on: - workflow_dispatch: null +on: # yamllint disable-line rule:truthy + pull_request: null + push: + branches: + - "master" + workflow_call: null + +permissions: {} # yamllint disable-line rule:braces +#permissions: "read-all" +#permissions: +# contents: "read" # Private repositories need read permission + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true jobs: hunspell_check: @@ -23,13 +36,13 @@ jobs: uses: "actions/checkout@v4" with: repository: "LibreOffice/dictionaries" - path: "dictionaries" + path: "libreoffice-dictionaries" - name: "Search for misspellings" run: | MISSPELLED_WORDS="$( sed -n -e 's#^msgstr "\(.\+\)"$#\1#p' languages/*hu_HU.po \ - | hunspell -d ./dictionaries/hu_HU/hu_HU -p hunspell.txt -l + | hunspell -d ./libreoffice-dictionaries/hu_HU/hu_HU -p hunspell.txt -l )" echo "${MISSPELLED_WORDS}" test -z "${MISSPELLED_WORDS}" From aeee0dc727139ed82736fed440d0b08cbf824904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 9 Apr 2024 13:04:28 +0200 Subject: [PATCH 3/3] Update spelling-gettext.yml --- .github/workflows/spelling-gettext.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spelling-gettext.yml b/.github/workflows/spelling-gettext.yml index 3cc075a..b038be4 100644 --- a/.github/workflows/spelling-gettext.yml +++ b/.github/workflows/spelling-gettext.yml @@ -29,7 +29,7 @@ jobs: uses: "actions/checkout@v4" - name: "Install Hunspell" - run: "sudo -- apt-get install -y hunspell" + run: "sudo -- apt-get install -y hunspell gettext" - name: "Checkout dictionaries" #run: "git clone --depth=1 https://anongit.freedesktop.org/git/libreoffice/dictionaries.git dictionaries" @@ -41,7 +41,8 @@ jobs: name: "Search for misspellings" run: | MISSPELLED_WORDS="$( - sed -n -e 's#^msgstr "\(.\+\)"$#\1#p' languages/*hu_HU.po \ + msgcat --no-wrap languages/*hu_HU.po \ + | sed -n -e 's#^msgstr "\(.\+\)"$#\1#p' \ | hunspell -d ./libreoffice-dictionaries/hu_HU/hu_HU -p hunspell.txt -l )" echo "${MISSPELLED_WORDS}"