🌐(action) create a workflow to download translation

A new workflow is added responsible todownload new translated strings
and then create a pull request to update the code.
This commit is contained in:
Manuel Raynaud
2025-01-16 18:43:27 +01:00
parent ce6cfc22ef
commit 95515fd460
2 changed files with 478 additions and 0 deletions

84
.github/workflows/crowdin_download.yml vendored Normal file
View File

@@ -0,0 +1,84 @@
name: Download translations from Crowdin
on:
workflow_dispatch:
push:
branches:
- 'release/**'
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create empty source files
run: |
touch src/backend/locale/django.pot
mkdir -p src/frontend/packages/i18n/locales/impress/
touch src/frontend/packages/i18n/locales/impress/translations-crowdin.json
# crowdin workflow
- name: crowdin action
uses: crowdin/github-action@v2
with:
config: crowdin/config.yml
upload_sources: false
upload_translations: false
download_translations: true
create_pull_request: false
push_translations: false
push_sources: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_BASE_PATH: "../src/"
# frontend i18n
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Restore the frontend cache
uses: actions/cache@v4
id: front-node_modules
with:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
- name: Install dependencies
if: steps.front-node_modules.outputs.cache-hit != 'true'
run: cd src/frontend/ && yarn install --frozen-lockfile
- name: Cache install frontend
if: steps.front-node_modules.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
- name: generate translations files
working-directory: src/frontend
run: yarn i18n:deploy
# Create a new PR
- name: Create a new Pull Request with new translated strings
uses: peter-evans/create-pull-request@v7
with:
commit-message: |
🌐(i18n) update translated strings
Update translated files with new translations
title: 🌐(i18n) update translated strings
body: |
## Purpose
update translated strings
## Proposal
- [x] update translated strings
branch: i18n/update-translations
labels: i18n

View File

@@ -0,0 +1,394 @@
msgid ""
msgstr ""
"Project-Id-Version: lasuite-people\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-17 15:50+0000\n"
"PO-Revision-Date: 2024-12-17 15:53\n"
"Last-Translator: \n"
"Language-Team: English\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: lasuite-people\n"
"X-Crowdin-Project-ID: 637934\n"
"X-Crowdin-Language: en\n"
"X-Crowdin-File: backend-impress.pot\n"
"X-Crowdin-File-ID: 8\n"
#: core/admin.py:33
msgid "Personal info"
msgstr ""
#: core/admin.py:46
msgid "Permissions"
msgstr ""
#: core/admin.py:58
msgid "Important dates"
msgstr ""
#: core/api/filters.py:16
msgid "Creator is me"
msgstr ""
#: core/api/filters.py:19
msgid "Favorite"
msgstr ""
#: core/api/filters.py:22
msgid "Title"
msgstr ""
#: core/api/serializers.py:307
msgid "A new document was created on your behalf!"
msgstr ""
#: core/api/serializers.py:311
msgid "You have been granted ownership of a new document:"
msgstr ""
#: core/api/serializers.py:414
msgid "Body"
msgstr ""
#: core/api/serializers.py:417
msgid "Body type"
msgstr ""
#: core/api/serializers.py:423
msgid "Format"
msgstr ""
#: core/authentication/backends.py:57
msgid "Invalid response format or token verification failed"
msgstr ""
#: core/authentication/backends.py:81
msgid "User info contained no recognizable user identification"
msgstr ""
#: core/authentication/backends.py:88
msgid "User account is disabled"
msgstr ""
#: core/models.py:62 core/models.py:69
msgid "Reader"
msgstr ""
#: core/models.py:63 core/models.py:70
msgid "Editor"
msgstr ""
#: core/models.py:71
msgid "Administrator"
msgstr ""
#: core/models.py:72
msgid "Owner"
msgstr ""
#: core/models.py:83
msgid "Restricted"
msgstr ""
#: core/models.py:87
msgid "Authenticated"
msgstr ""
#: core/models.py:89
msgid "Public"
msgstr ""
#: core/models.py:101
msgid "id"
msgstr ""
#: core/models.py:102
msgid "primary key for the record as UUID"
msgstr ""
#: core/models.py:108
msgid "created on"
msgstr ""
#: core/models.py:109
msgid "date and time at which a record was created"
msgstr ""
#: core/models.py:114
msgid "updated on"
msgstr ""
#: core/models.py:115
msgid "date and time at which a record was last updated"
msgstr ""
#: core/models.py:135
msgid "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/_/: characters."
msgstr ""
#: core/models.py:141
msgid "sub"
msgstr ""
#: core/models.py:143
msgid "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_/: characters only."
msgstr ""
#: core/models.py:152
msgid "full name"
msgstr ""
#: core/models.py:153
msgid "short name"
msgstr ""
#: core/models.py:155
msgid "identity email address"
msgstr ""
#: core/models.py:160
msgid "admin email address"
msgstr ""
#: core/models.py:167
msgid "language"
msgstr ""
#: core/models.py:168
msgid "The language in which the user wants to see the interface."
msgstr ""
#: core/models.py:174
msgid "The timezone in which the user wants to see times."
msgstr ""
#: core/models.py:177
msgid "device"
msgstr ""
#: core/models.py:179
msgid "Whether the user is a device or a real user."
msgstr ""
#: core/models.py:182
msgid "staff status"
msgstr ""
#: core/models.py:184
msgid "Whether the user can log into this admin site."
msgstr ""
#: core/models.py:187
msgid "active"
msgstr ""
#: core/models.py:190
msgid "Whether this user should be treated as active. Unselect this instead of deleting accounts."
msgstr ""
#: core/models.py:202
msgid "user"
msgstr ""
#: core/models.py:203
msgid "users"
msgstr ""
#: core/models.py:342 core/models.py:718
msgid "title"
msgstr ""
#: core/models.py:364
msgid "Document"
msgstr ""
#: core/models.py:365
msgid "Documents"
msgstr ""
#: core/models.py:368
msgid "Untitled Document"
msgstr ""
#: core/models.py:593
#, python-brace-format
msgid "{name} shared a document with you!"
msgstr ""
#: core/models.py:597
#, python-brace-format
msgid "{name} invited you with the role \"{role}\" on the following document:"
msgstr ""
#: core/models.py:600
#, python-brace-format
msgid "{name} shared a document with you: {title}"
msgstr ""
#: core/models.py:623
msgid "Document/user link trace"
msgstr ""
#: core/models.py:624
msgid "Document/user link traces"
msgstr ""
#: core/models.py:630
msgid "A link trace already exists for this document/user."
msgstr ""
#: core/models.py:653
msgid "Document favorite"
msgstr ""
#: core/models.py:654
msgid "Document favorites"
msgstr ""
#: core/models.py:660
msgid "This document is already targeted by a favorite relation instance for the same user."
msgstr ""
#: core/models.py:682
msgid "Document/user relation"
msgstr ""
#: core/models.py:683
msgid "Document/user relations"
msgstr ""
#: core/models.py:689
msgid "This user is already in this document."
msgstr ""
#: core/models.py:695
msgid "This team is already in this document."
msgstr ""
#: core/models.py:701 core/models.py:890
msgid "Either user or team must be set, not both."
msgstr ""
#: core/models.py:719
msgid "description"
msgstr ""
#: core/models.py:720
msgid "code"
msgstr ""
#: core/models.py:721
msgid "css"
msgstr ""
#: core/models.py:723
msgid "public"
msgstr ""
#: core/models.py:725
msgid "Whether this template is public for anyone to use."
msgstr ""
#: core/models.py:731
msgid "Template"
msgstr ""
#: core/models.py:732
msgid "Templates"
msgstr ""
#: core/models.py:871
msgid "Template/user relation"
msgstr ""
#: core/models.py:872
msgid "Template/user relations"
msgstr ""
#: core/models.py:878
msgid "This user is already in this template."
msgstr ""
#: core/models.py:884
msgid "This team is already in this template."
msgstr ""
#: core/models.py:907
msgid "email address"
msgstr ""
#: core/models.py:926
msgid "Document invitation"
msgstr ""
#: core/models.py:927
msgid "Document invitations"
msgstr ""
#: core/models.py:944
msgid "This email is already associated to a registered user."
msgstr ""
#: core/templates/mail/html/hello.html:159 core/templates/mail/text/hello.txt:3
msgid "Company logo"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
#, python-format
msgid "Hello %(name)s"
msgstr ""
#: core/templates/mail/html/hello.html:188 core/templates/mail/text/hello.txt:5
msgid "Hello"
msgstr ""
#: core/templates/mail/html/hello.html:189 core/templates/mail/text/hello.txt:6
msgid "Thank you very much for your visit!"
msgstr ""
#: core/templates/mail/html/hello.html:221
#, python-format
msgid "This mail has been sent to %(email)s by <a href=\"%(href)s\">%(name)s</a>"
msgstr ""
#: core/templates/mail/html/invitation.html:162
#: core/templates/mail/text/invitation.txt:3
msgid "Logo email"
msgstr ""
#: core/templates/mail/html/invitation.html:209
#: core/templates/mail/text/invitation.txt:10
msgid "Open"
msgstr ""
#: core/templates/mail/html/invitation.html:226
#: core/templates/mail/text/invitation.txt:14
msgid " Docs, your new essential tool for organizing, sharing and collaborating on your documents as a team. "
msgstr ""
#: core/templates/mail/html/invitation.html:233
#: core/templates/mail/text/invitation.txt:16
#, python-format
msgid " Brought to you by %(brandname)s "
msgstr ""
#: core/templates/mail/text/hello.txt:8
#, python-format
msgid "This mail has been sent to %(email)s by %(name)s [%(href)s]"
msgstr ""
#: impress/settings.py:236
msgid "English"
msgstr ""
#: impress/settings.py:237
msgid "French"
msgstr ""
#: impress/settings.py:238
msgid "German"
msgstr ""