Compare commits

..
Author SHA1 Message Date
shamoon 56673256a8 Need to use a PAT for protected branch 2025-03-22 23:38:55 -07:00
shamoon 0980e4a3b6 Chore: auto-translate strings 2025-03-22 23:27:06 -07:00
3 changed files with 92 additions and 23 deletions
+69
View File
@@ -0,0 +1,69 @@
name: Generate Translation Strings
on:
push:
branches:
- dev
jobs:
generate-translate-strings:
name: Generate Translation Strings
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.PNGX_BOT_PAT }}
ref: ${{ github.head_ref }}
- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends gettext
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install backend python dependencies
run: |
uv sync \
--group dev \
--frozen
- name: Generate backend translation strings
run: cd src/ && uv run manage.py makemessages -l en_US -i "samples*"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
cache-dependency-path: 'src-ui/pnpm-lock.yaml'
- name: Cache frontend dependencies
id: cache-frontend-deps
uses: actions/cache@v4
with:
path: |
~/.pnpm-store
~/.cache
key: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }}
- name: Install frontend dependencies
if: steps.cache-frontend-deps.outputs.cache-hit != 'true'
run: cd src-ui && pnpm install
- name: Re-link Angular cli
run: cd src-ui && pnpm link @angular/cli
- name: Generate frontend translation strings
run: |
cd src-ui
pnpm run ng extract-i18n
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: 'src-ui/messages.xlf src/locale/en_US/LC_MESSAGES/django.po'
commit_message: "Auto translate strings"
commit_user_name: "GitHub Actions"
commit_author: "GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>"
+2 -2
View File
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: paperless-ngx\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-11 13:33-0700\n"
"PO-Revision-Date: 2025-03-26 12:12\n"
"PO-Revision-Date: 2025-03-18 12:12\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Language: de_DE\n"
@@ -1184,7 +1184,7 @@ msgstr "Ungültige Variable erkannt."
#: documents/templates/account/account_inactive.html:5
msgid "Paperless-ngx account inactive"
msgstr "Paperless-ngx Konto inaktiv"
msgstr "Papierlos-ngx-Konto inaktiv"
#: documents/templates/account/account_inactive.html:9
msgid "Account inactive."
+21 -21
View File
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: paperless-ngx\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-11 13:33-0700\n"
"PO-Revision-Date: 2025-03-24 12:13\n"
"PO-Revision-Date: 2025-03-11 20:35\n"
"Last-Translator: \n"
"Language-Team: Norwegian\n"
"Language: no_NO\n"
@@ -55,7 +55,7 @@ msgstr ""
#: documents/filters.py:827
msgid "Custom field not found"
msgstr "Egendefinert felt ble ikke funnet"
msgstr ""
#: documents/models.py:36 documents/models.py:710
msgid "owner"
@@ -196,11 +196,11 @@ msgstr "Sjekksummen av det arkiverte dokumentet."
#: documents/models.py:205
msgid "page count"
msgstr "antall sider"
msgstr ""
#: documents/models.py:212
msgid "The number of pages of the document."
msgstr "Antall sider i dokumentet."
msgstr ""
#: documents/models.py:216 documents/models.py:630 documents/models.py:668
#: documents/models.py:739 documents/models.py:797
@@ -318,7 +318,7 @@ msgstr "ASN"
#: documents/models.py:395
msgid "Pages"
msgstr "Sider"
msgstr ""
#: documents/models.py:401
msgid "show on dashboard"
@@ -526,7 +526,7 @@ msgstr "har ikke egendefinert felt"
#: documents/models.py:489
msgid "custom fields query"
msgstr "egendefinerte felt spørring"
msgstr ""
#: documents/models.py:490
msgid "created to"
@@ -566,15 +566,15 @@ msgstr "filtrer regler"
#: documents/models.py:534
msgid "Auto Task"
msgstr "Automatisk oppgave"
msgstr ""
#: documents/models.py:535
msgid "Scheduled Task"
msgstr "Planlagt oppgave"
msgstr ""
#: documents/models.py:536
msgid "Manual Task"
msgstr "Manuell oppgave"
msgstr ""
#: documents/models.py:539
msgid "Consume File"
@@ -590,7 +590,7 @@ msgstr ""
#: documents/models.py:542
msgid "Index Optimize"
msgstr "index optimalisering"
msgstr ""
#: documents/models.py:547
msgid "Task ID"
@@ -622,7 +622,7 @@ msgstr "Oppgavenavn"
#: documents/models.py:569
msgid "Name of the task that was run"
msgstr "Navn på oppgaven som ble kjørt"
msgstr ""
#: documents/models.py:576
msgid "Task State"
@@ -666,11 +666,11 @@ msgstr "Dataene returnert av oppgaven"
#: documents/models.py:614
msgid "Task Type"
msgstr "Oppgave type"
msgstr ""
#: documents/models.py:615
msgid "The type of task that was run"
msgstr "Type oppgave som ble utført"
msgstr ""
#: documents/models.py:626
msgid "Note for the document"
@@ -722,7 +722,7 @@ msgstr "URL"
#: documents/models.py:730
msgid "Date"
msgstr "Dato"
msgstr ""
#: documents/models.py:731
msgid "Boolean"
@@ -746,7 +746,7 @@ msgstr "Dokument lenke"
#: documents/models.py:736
msgid "Select"
msgstr "Velg"
msgstr ""
#: documents/models.py:748
msgid "data type"
@@ -790,7 +790,7 @@ msgstr "Dokument oppdatert"
#: documents/models.py:932
msgid "Scheduled"
msgstr "Planlagt"
msgstr ""
#: documents/models.py:935
msgid "Consume Folder"
@@ -806,15 +806,15 @@ msgstr "Epost-henting"
#: documents/models.py:938
msgid "Web UI"
msgstr "Web UI"
msgstr ""
#: documents/models.py:943
msgid "Modified"
msgstr "Endret"
msgstr ""
#: documents/models.py:944
msgid "Custom Field"
msgstr "Egendefinerte felt"
msgstr ""
#: documents/models.py:947
msgid "Workflow Trigger Type"
@@ -898,7 +898,7 @@ msgstr ""
#: documents/models.py:1075
msgid "email subject"
msgstr "e-post emne"
msgstr ""
#: documents/models.py:1079
msgid "The subject of the email, can include some placeholders, see documentation."
@@ -906,7 +906,7 @@ msgstr ""
#: documents/models.py:1085
msgid "email body"
msgstr "epost innhold"
msgstr ""
#: documents/models.py:1088
msgid "The body (message) of the email, can include some placeholders, see documentation."