From 1eb79b1cf1b8fd5b4bda2d1e2d83f874d6f5e2fa Mon Sep 17 00:00:00 2001 From: Jonas Metzener Date: Tue, 18 Feb 2025 14:34:20 +0100 Subject: [PATCH] fix(i18n): add italian translations --- .gitignore | 1 - Makefile | 8 ++ alexandria/locale/de/LC_MESSAGES/django.mo | Bin 0 -> 2583 bytes alexandria/locale/de/LC_MESSAGES/django.po | 54 ++++----- alexandria/locale/en/LC_MESSAGES/django.mo | Bin 0 -> 380 bytes alexandria/locale/en/LC_MESSAGES/django.po | 54 ++++----- alexandria/locale/it/LC_MESSAGES/django.mo | Bin 0 -> 2568 bytes alexandria/locale/it/LC_MESSAGES/django.po | 132 +++++++++++++++++++++ alexandria/settings/django.py | 5 +- 9 files changed, 196 insertions(+), 58 deletions(-) create mode 100644 alexandria/locale/de/LC_MESSAGES/django.mo create mode 100644 alexandria/locale/en/LC_MESSAGES/django.mo create mode 100644 alexandria/locale/it/LC_MESSAGES/django.mo create mode 100644 alexandria/locale/it/LC_MESSAGES/django.po diff --git a/.gitignore b/.gitignore index d5f5cbe7..2ea7251b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ coverage.xml .hypothesis/ # Translations -*.mo *.pot # Django stuff: diff --git a/Makefile b/Makefile index 9d939192..a2da4778 100644 --- a/Makefile +++ b/Makefile @@ -67,3 +67,11 @@ flush: ## Flush the database .PHONY: dump dump: ## dump alexandria data @docker compose run --rm alexandria ./manage.py dumpdata alexandria_core | jq > initial_data.json + +.PHONY: makemessages +makemessages: ## Update translation files for all languages + @docker compose run --rm --no-deps alexandria ./manage.py makemessages -a --add-location file + +.PHONY: compilemessages +compilemessages: ## Generate compiled translation files + @docker compose run --rm --no-deps alexandria ./manage.py compilemessages diff --git a/alexandria/locale/de/LC_MESSAGES/django.mo b/alexandria/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..d99c58d934b95f91ee408b8ad0e46bb820f19fb2 GIT binary patch literal 2583 zcmb7_&u<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M#b=ZmUZlUC;PhB!d*r-_r(|ssdFZz&2 zM%k2+4I0E`E0bnq(erUdkmmdsn74=arFl}ei;AEJ^m}N2qTskq1xtCG@=%J?!zvaP zqBgzWV*ScuUbBaJBzbU!uX)#k&)l~fIG(!}hf&UpdR)z;;zs9kQe|!=*(SFwM?+=# z1Q==IU{=h?ymQGeVLTv{w=jy)!n#yc>U1^jHzqH8yZ7)vL6d{E@%4Bxl\n" "Language-Team: LANGUAGE \n" @@ -18,79 +18,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: alexandria/core/api.py:25 +#: alexandria/core/api.py msgid "(copy)" msgstr "(Kopie)" -#: alexandria/core/models.py:44 +#: alexandria/core/models.py msgid "Created by user" msgstr "Erstellt durch Benutzer" -#: alexandria/core/models.py:47 +#: alexandria/core/models.py msgid "Created by group" msgstr "Erstellt durch Gruppe" -#: alexandria/core/models.py:51 +#: alexandria/core/models.py msgid "Modified by user" msgstr "Bearbeitet durch Benutzer" -#: alexandria/core/models.py:54 +#: alexandria/core/models.py msgid "Modified by group" msgstr "Bearbeitet durch Gruppe" -#: alexandria/core/models.py:56 +#: alexandria/core/models.py msgid "Metainfo" msgstr "Metainformationen" -#: alexandria/core/models.py:91 +#: alexandria/core/models.py msgid "Please enter a valid HEX color code." msgstr "Bitte geben Sie einen validen HEX Farbcode ein." -#: alexandria/core/models.py:96 alexandria/core/models.py:129 -#: alexandria/core/models.py:143 alexandria/core/models.py:233 +#: alexandria/core/models.py msgid "Name" msgstr "Name" -#: alexandria/core/models.py:98 alexandria/core/models.py:131 -#: alexandria/core/models.py:145 alexandria/core/models.py:151 +#: alexandria/core/models.py msgid "Description" msgstr "Beschreibung" -#: alexandria/core/models.py:104 +#: alexandria/core/models.py msgid "Allowed mime types" msgstr "Erlaubte Dateitypen" -#: alexandria/core/models.py:150 +#: alexandria/core/models.py msgid "Title" msgstr "Titel" -#: alexandria/core/models.py:237 +#: alexandria/core/models.py msgid "Checksum" msgstr "Checksumme" -#: alexandria/core/validations.py:31 +#: alexandria/core/validations.py msgid "File is infected with malware." msgstr "Datei ist mit Malware infiziert" -#: alexandria/core/validations.py:35 +#: alexandria/core/validations.py msgid "Malware scan had an error: " msgstr "Malware-Scan hatte einen Fehler:" -#: alexandria/core/validations.py:53 +#: alexandria/core/validations.py #, python-format msgid "File type %(mime_type)s is not allowed in category %(category)s." msgstr "" "Dateityp %(mime_type)s ist in der Kategorie %(category)s nicht erlaubt." -#: alexandria/core/validations.py:71 +#: alexandria/core/validations.py msgid "Missing Content-Type header" msgstr "Fehlender Content-Type header" -#: alexandria/core/validations.py:73 +#: alexandria/core/validations.py msgid "Unknown file extension" msgstr "Unbekannte Dateiendung" -#: alexandria/core/validations.py:80 +#: alexandria/core/validations.py #, python-format msgid "" "Content-Type %(content_type)s does not match file extension %(extension)s." @@ -98,7 +96,7 @@ msgstr "" "Content-Type %(content_type) stimmt nicht mit der Dateiendung %(extension)s " "überein." -#: alexandria/core/validations.py:92 +#: alexandria/core/validations.py #, python-format msgid "" "Content-Type %(content_type)s does not match detected file content " @@ -107,29 +105,29 @@ msgstr "" "Content-Type %(content_type)s stimmt nicht mit dem erkannten Dateityp " "%(file_content_type)s überein." -#: alexandria/core/views.py:149 +#: alexandria/core/views.py msgid "PDF conversion is not enabled." msgstr "PDF-Konvertierung ist nicht aktiviert." -#: alexandria/core/views.py:246 +#: alexandria/core/views.py msgid "\"files\" filter is mandatory!" msgstr "Der Filter \"files\" ist obligatorisch!" -#: alexandria/core/views.py:258 +#: alexandria/core/views.py msgid "The \"files\" filter must consist of a comma delimited list of UUIDs!" msgstr "" "Der \"files\" Filter muss aus einer kommaseparierten Liste von UUIDs " "bestehen!" -#: alexandria/core/views.py:276 +#: alexandria/core/views.py msgid "For downloading a file use the presigned download URL." msgstr "" "Zum Herunterladen einer Datei verwenden Sie die vorgegebene Download-URL." -#: alexandria/core/views.py:301 +#: alexandria/core/views.py msgid "WebDAV is not enabled." msgstr "WebDAV ist nicht aktiviert." -#: alexandria/core/views.py:311 +#: alexandria/core/views.py msgid "WebDAV is not enabled for this mime type." msgstr "WebDAV ist für diesen Dateityp nicht aktiviert" diff --git a/alexandria/locale/en/LC_MESSAGES/django.mo b/alexandria/locale/en/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845 GIT binary patch literal 380 zcmYL@K~KUk7=|%=+R?Lz&%}d9i{c3jGZa>EvE7z2Nc2{r&Y96JZ6W$Y{CoZuJ5A(G zp7i_Dx9RhJeDu}vIq;l#&OC>nD^HugXY4QU{MmN?lNtRkR}RH%w3NnHT4Bh@vF%H^(V-=Ii1iQ$Qo9Pt!I1Rhe%oml#`f^NEGFCKEL->Rc=KoQ6a?!10%_7(V7ey8`V`;n{war z20Z3;uifk31QV^CRQ|iq#``$=;jWunRB8aLH({)F;i8zL{=V00y-I_qTIqGAN(}v% i$^}`yHKImSZ8jEzYJOK6-VWez49^vuhS0kh1f3tbb!oc* literal 0 HcmV?d00001 diff --git a/alexandria/locale/en/LC_MESSAGES/django.po b/alexandria/locale/en/LC_MESSAGES/django.po index f5d5ddfc..88d6f361 100644 --- a/alexandria/locale/en/LC_MESSAGES/django.po +++ b/alexandria/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-18 13:29+0000\n" +"POT-Creation-Date: 2025-02-18 14:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,110 +18,108 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: alexandria/core/api.py:25 +#: alexandria/core/api.py msgid "(copy)" msgstr "" -#: alexandria/core/models.py:44 +#: alexandria/core/models.py msgid "Created by user" msgstr "" -#: alexandria/core/models.py:47 +#: alexandria/core/models.py msgid "Created by group" msgstr "" -#: alexandria/core/models.py:51 +#: alexandria/core/models.py msgid "Modified by user" msgstr "" -#: alexandria/core/models.py:54 +#: alexandria/core/models.py msgid "Modified by group" msgstr "" -#: alexandria/core/models.py:56 +#: alexandria/core/models.py msgid "Metainfo" msgstr "" -#: alexandria/core/models.py:91 +#: alexandria/core/models.py msgid "Please enter a valid HEX color code." msgstr "" -#: alexandria/core/models.py:96 alexandria/core/models.py:129 -#: alexandria/core/models.py:143 alexandria/core/models.py:233 +#: alexandria/core/models.py msgid "Name" msgstr "" -#: alexandria/core/models.py:98 alexandria/core/models.py:131 -#: alexandria/core/models.py:145 alexandria/core/models.py:151 +#: alexandria/core/models.py msgid "Description" msgstr "" -#: alexandria/core/models.py:104 +#: alexandria/core/models.py msgid "Allowed mime types" msgstr "" -#: alexandria/core/models.py:150 +#: alexandria/core/models.py msgid "Title" msgstr "" -#: alexandria/core/models.py:237 +#: alexandria/core/models.py msgid "Checksum" msgstr "" -#: alexandria/core/validations.py:31 +#: alexandria/core/validations.py msgid "File is infected with malware." msgstr "" -#: alexandria/core/validations.py:35 +#: alexandria/core/validations.py msgid "Malware scan had an error: " msgstr "" -#: alexandria/core/validations.py:53 +#: alexandria/core/validations.py #, python-format msgid "File type %(mime_type)s is not allowed in category %(category)s." msgstr "" -#: alexandria/core/validations.py:71 +#: alexandria/core/validations.py msgid "Missing Content-Type header" msgstr "" -#: alexandria/core/validations.py:73 +#: alexandria/core/validations.py msgid "Unknown file extension" msgstr "" -#: alexandria/core/validations.py:80 +#: alexandria/core/validations.py #, python-format msgid "" "Content-Type %(content_type)s does not match file extension %(extension)s." msgstr "" -#: alexandria/core/validations.py:92 +#: alexandria/core/validations.py #, python-format msgid "" "Content-Type %(content_type)s does not match detected file content " "%(file_content_type)s." msgstr "" -#: alexandria/core/views.py:149 +#: alexandria/core/views.py msgid "PDF conversion is not enabled." msgstr "" -#: alexandria/core/views.py:246 +#: alexandria/core/views.py msgid "\"files\" filter is mandatory!" msgstr "" -#: alexandria/core/views.py:258 +#: alexandria/core/views.py msgid "The \"files\" filter must consist of a comma delimited list of UUIDs!" msgstr "" -#: alexandria/core/views.py:276 +#: alexandria/core/views.py msgid "For downloading a file use the presigned download URL." msgstr "" -#: alexandria/core/views.py:301 +#: alexandria/core/views.py msgid "WebDAV is not enabled." msgstr "" -#: alexandria/core/views.py:311 +#: alexandria/core/views.py msgid "WebDAV is not enabled for this mime type." msgstr "" diff --git a/alexandria/locale/it/LC_MESSAGES/django.mo b/alexandria/locale/it/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..863e87d5414c142e2a532d5caa3b3ca0fc35eb19 GIT binary patch literal 2568 zcmbW2JB%Ae7{`YYAeeW6@DxlAqQrtVNsyw*mqX{AeTl()XYS4kL5OI)JGO_6cb1u1 zAD1!}1q}rf1r-#4C@7H-5=A6RXsM{63I&uV zXpf^miT*445%h0v!3SD*UornGcss@kco59M1K_*hCGdUlW$*@gKX~d^#_j{pfp>uy z!Kc6oTn4X!r@-sr6X2g9op)$|F@73+0OLiF&I>{Ou{ZINp94ON@ilM-{1m(mya65p ze+R4J0Zh{PBzP7+wZR39--9!EfM0@-fM0=h{|{gv{1JQuT*M-}|HG1>gXGWGAldO9 z7=pim%ixPRBmg}~=Y5P1y6+3{VeotKA@FAqCbB=kXTZO}BjCcFjBSGFL72ck0x3S9 zfXBgaL9+KZkWxf>qjnEELdY=9?nR$AvYq01cRBGWNcp2ic1#<>k~gx6;zf<_fmyk~ zaF0EPUO|5leIGjcLyhuGjqGI$1Er-~;DDEwE62woiG??I=P)}KnRKVh8d{re8S}9k zOYV14>DbChMps-mW-BJ~GV#F{ruh+U$cL9{Rn_s>NXHZ7aj1_*JeFQY9w*VIyj+W2 zG`zfbYwf?CoF6FPfhkUz1V_&PuR0uMrJ!s3JA7zOmd;OPPFmKKF0v~1*vnSQHpD?C zgTmNtE}?)-UBwP^RFtt&36F5+5OJiil>d@3tHvTO+le+JR>_cy zA{wxR`;p|Sl}-&4SUX+BdmEh^3kw6di$ualBIba!*4R2{q4Wag8Wt+&=*&G?8A%bt z$I!%Tpys16Ka+=HO^hY$HdiS%6KV5MmVU`Z^tFs@tgEGfsmM9XMevExD(2@~uVIgd zXOW2!q%AmdQ)P`a=jmLhKr_JB$c)DVHKEm5QFe6sO|RE(y2ETsc`aElxso7QMT}-i zWfx_?*|*syH~C4PCHh>b%lj4>sgPQFMYP5?kk&T8)h$To0NJetx|kwx4@_eXUjL z2#0rJMdCEQr#fHlbvk^l5w`f5R@i8FmK)9HMr(8PB`i&bnHb7oONw!wcN%NwdSuC& zPG?!Gnz6&(HLxIThpk<+Pt=ZA<`Z7$9)Wrx)u@R@9*u-`(l7P4R)f>K>&UEuv_UID z#!xbKe!8!GrK>Y5bbuNiyE;$OeCU==F7o2vrDF*{yu?pb7b~o-bJehBmg?)DantW> zH6(wPDFj4`Dsq`B9;?~AcPJm_)vk=-EU!{SYfvM2#+f(tZuZJaf~OrBYn4k)5=%U` zxz#A7;{1QnlmB~#J}Ow0CQDOOC`>+)kv_^&Vy>cSWEnZh z5ie314_~o!CNXoC=DN05XebESNKYw`qTz|u8qcZF7$t7fn=aldM8hg{$+O}qJxfbE~L$Nlz zc3$Kj?-eBc!a&3jlR|)CxZ!i5o0~;c%J8ijNE0l9+odu|PD)iqLwK(y!iyTNg`lg# zQ!4F, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-02-18 14:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \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" + +#: alexandria/core/api.py +msgid "(copy)" +msgstr "(copia)" + +#: alexandria/core/models.py +msgid "Created by user" +msgstr "Creato da utente" + +#: alexandria/core/models.py +msgid "Created by group" +msgstr "Creato da gruppo" + +#: alexandria/core/models.py +msgid "Modified by user" +msgstr "Modificato da utente" + +#: alexandria/core/models.py +msgid "Modified by group" +msgstr "Modificato da gruppo" + +#: alexandria/core/models.py +msgid "Metainfo" +msgstr "Metadati" + +#: alexandria/core/models.py +msgid "Please enter a valid HEX color code." +msgstr "Inserire un codice colore HEX valido." + +#: alexandria/core/models.py +msgid "Name" +msgstr "Nome" + +#: alexandria/core/models.py +msgid "Description" +msgstr "Descrizione" + +#: alexandria/core/models.py +msgid "Allowed mime types" +msgstr "Tipi di file consentiti" + +#: alexandria/core/models.py +msgid "Title" +msgstr "Titolo" + +#: alexandria/core/models.py +msgid "Checksum" +msgstr "Checksum" + +#: alexandria/core/validations.py +msgid "File is infected with malware." +msgstr "Il file è infetto da malware." + +#: alexandria/core/validations.py +msgid "Malware scan had an error: " +msgstr "La scansione del malware ha avuto un errore: " + +#: alexandria/core/validations.py +#, python-format +msgid "File type %(mime_type)s is not allowed in category %(category)s." +msgstr "" +"Il tipo di file %(mime_type)s non è consentito nella categoria %(category)s." + +#: alexandria/core/validations.py +msgid "Missing Content-Type header" +msgstr "Intestazione Content-Type mancante" + +#: alexandria/core/validations.py +msgid "Unknown file extension" +msgstr "Estensione file sconosciuta" + +#: alexandria/core/validations.py +#, python-format +msgid "" +"Content-Type %(content_type)s does not match file extension %(extension)s." +msgstr "" +"Il tipo di contenuto %(content_type)s non corrisponde all'estensione " +"%(extension)s del file." + +#: alexandria/core/validations.py +#, python-format +msgid "" +"Content-Type %(content_type)s does not match detected file content " +"%(file_content_type)s." +msgstr "" +"Il tipo di contenuto %(content_type)s non corrisponde al contenuto del file " +"%(file_content_type)s." + +#: alexandria/core/views.py +msgid "PDF conversion is not enabled." +msgstr "La conversione PDF non è attivata." + +#: alexandria/core/views.py +msgid "\"files\" filter is mandatory!" +msgstr "Il filtro \"files\" è obbligatorio!" + +#: alexandria/core/views.py +msgid "The \"files\" filter must consist of a comma delimited list of UUIDs!" +msgstr "" +"Il filtro \"file\" deve essere costituito da un elenco di UUID delimitato da " +"virgole!" + +#: alexandria/core/views.py +msgid "For downloading a file use the presigned download URL." +msgstr "Per scaricare un file, utilizzare l'URL di download predefinito." + +#: alexandria/core/views.py +msgid "WebDAV is not enabled." +msgstr "WebDAV non è attivato." + +#: alexandria/core/views.py +msgid "WebDAV is not enabled for this mime type." +msgstr "WebDAV non è abilitato per questo tipo di file." diff --git a/alexandria/settings/django.py b/alexandria/settings/django.py index 85e82a58..8d1d76d7 100644 --- a/alexandria/settings/django.py +++ b/alexandria/settings/django.py @@ -1,4 +1,5 @@ import re +from pathlib import Path from django.conf import global_settings @@ -74,9 +75,11 @@ def parse_languages(languages): LANGUAGE_CODE = env.str("LANGUAGE_CODE", "en") LANGUAGES = ( - parse_languages(env.list("LANGUAGES", default=["en", "de"])) + parse_languages(env.list("LANGUAGES", default=["en", "de", "it"])) or global_settings.LANGUAGES ) +PROJECT_ROOT = (Path(__file__) / Path("../..")).resolve() +LOCALE_PATHS = [str(PROJECT_ROOT / Path("locale"))] TIME_ZONE = env.str("TIME_ZONE", "UTC") USE_I18N = True