From 65ed15a0612560ab9ec990039c051b1e9b1dcbc5 Mon Sep 17 00:00:00 2001 From: MPinto Date: Wed, 17 May 2023 22:44:08 +0100 Subject: [PATCH] added translation in portuguese --- import_export_celery/admin.py | 2 +- .../locale/pt/LC_MESSAGES/django.mo | Bin 0 -> 2679 bytes .../locale/pt/LC_MESSAGES/django.po | 150 ++++++++++++++++++ ...8_alter_exportjob_id_alter_importjob_id.py | 23 +++ import_export_celery/models/exportjob.py | 5 + import_export_celery/models/importjob.py | 12 +- 6 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 import_export_celery/locale/pt/LC_MESSAGES/django.mo create mode 100644 import_export_celery/locale/pt/LC_MESSAGES/django.po create mode 100644 import_export_celery/migrations/0008_alter_exportjob_id_alter_importjob_id.py diff --git a/import_export_celery/admin.py b/import_export_celery/admin.py index 52807c7..3e1ea08 100644 --- a/import_export_celery/admin.py +++ b/import_export_celery/admin.py @@ -9,6 +9,7 @@ class JobWithStatusMixin: + @admin.display(description=_("Job status info")) def job_status_info(self, obj): job_status = cache.get(self.direction + "_job_status_%s" % obj.pk) if job_status: @@ -18,7 +19,6 @@ def job_status_info(self, obj): class ImportJobForm(forms.ModelForm): - model = forms.ChoiceField(label=_("Name of model to import to")) class Meta: diff --git a/import_export_celery/locale/pt/LC_MESSAGES/django.mo b/import_export_celery/locale/pt/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..52405db1d731a7c13b37bd28e2dc1783df46713e GIT binary patch literal 2679 zcmaKtyKfvt9LEP@NOHtHf_WtYe!L=Ms1t z^P6B5{0bZbe*~Wae*szEA0W&72RsQL7!cwZcpBt$b0FWl4zj%)e*bfj^?waM4c-G^ z10VSLL$HSV-+un~6GA+P`54H0=D>RXW($* z_c4&qp9eWFA9=PxzV|7}IsF!#0e=EHE`ta%$LR#fdPe*_1mU(gf`PU^#J87{D6el-Keb;Mu zc}u%CHB_YRwwT9FmR(n*V-~MMF>h=v9jj)!ez#D*-){Hr6`7K2m%<=cCDbr+CsL3+ zMGH+z4Q;hmG9|9aO+{OZQYTq0b*yQqG-ZES0_*O-u#g)_-nrSr0l%p7cpw6P&aU@f z%VlWEU24NhNn6%Hmr5FjgP6zf>e{tsigcQL-?<52%CL*8rp~6iEG3;Zjabx49&-v1 z_{w2C(7r5VwQtV$Z0f=xXT*xKO+=kSyY2JPT`CTVRh62|Hu7|2DFTNW`ig+@Vl^vg z#ICQYBqW$3u^LMq6~|p$r)3r46k%58MyzRp`!XWjzE&Pv#gUm&|<}!4b^bLLKxgoHq|B>r^>40LJOACmJWlNtd$1q2Fokg zf>pJt`A~3KIs|vLIyx3q&jz*gG+G-!d+xnzty--t%G3qxRwijAow4I|Stc4^$V!x< zu0QB7!b>f7dl>Fr#D%1l$(9P%m5iaNoR3q-eKNCJSz1_{>zP*@u2yDE;#2}H+Z~wU z)NMD?iKI>@*mavKH+g-1KDf|3$JR8J4d%MVbfK>n4LFG}=mAgx5ERR3LJ78MPrpmG^R)-Hmk5PVvP-Ji-Z~zI9C7TbbT8 z(3L`0k$xE(-#&61OZEOtQ5*k%rYC2*lv%jkG`g%-IYn#e8#+Eiw=$W8W=hN=NIQ2; z22H+?z}%kydoL{H-yR>zd`EfIKW?!c3U5(i1;V&HfV=m)8+icxcCL~1!Sc(nu4awYq5MOOf+#paNw2_*mKkZ@x4GEjw+EBO&6|BW)o7+`8 zm)qa3^4jVaQ-38Dg|}oA#oD_E}z4jm)C$OUj&%^c`H2Mc%lqeNmJW ztVJ=ER`0FEWK-jM7W=m5#q|7q^addmdJ`gjqccULLt44fDg2S{4Ha5#79)E6ClNV( bl(6j{+Fes=hcz@WmMZ%SLv%~MSLFWz6)g9t literal 0 HcmV?d00001 diff --git a/import_export_celery/locale/pt/LC_MESSAGES/django.po b/import_export_celery/locale/pt/LC_MESSAGES/django.po new file mode 100644 index 0000000..268d022 --- /dev/null +++ b/import_export_celery/locale/pt/LC_MESSAGES/django.po @@ -0,0 +1,150 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Dan , 2020. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-05-17 20:55+0000\n" +"PO-Revision-Date: 2023-05-17 21:56+0100\n" +"Last-Translator: Daniel Pluth \n" +"Language-Team: \n" +"Language: pt_BR\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-Generator: Poedit 3.3.1\n" + +#: import_export_celery/admin.py:12 +msgid "Job status info" +msgstr "Informação do estado do trabalho" + +#: import_export_celery/admin.py:22 import_export_celery/models/importjob.py:62 +msgid "Name of model to import to" +msgstr "Nome do modelo a importar" + +#: import_export_celery/admin_actions.py:20 +msgid "Perform import" +msgstr "Confirmar importação" + +#: import_export_celery/admin_actions.py:29 +msgid "Perform dry import" +msgstr "Confirmar importação" + +#: import_export_celery/admin_actions.py:39 +msgid "Run export job" +msgstr "Correr trabalho de exportação" + +#: import_export_celery/admin_actions.py:67 +msgid "Export with celery" +msgstr "Exportar com o celery" + +#: import_export_celery/apps.py:7 +msgid "Import Export Celery" +msgstr "Importar ou Exportar com o celery" + +#: import_export_celery/models/exportjob.py:27 +msgid "exported file" +msgstr "ficheiro exportado" + +#: import_export_celery/models/exportjob.py:35 +#: import_export_celery/models/importjob.py:30 +msgid "Have we started processing the file? If so when?" +msgstr "Começou a processar o ficheiro? Se sim, quando?" + +#: import_export_celery/models/exportjob.py:42 +#: import_export_celery/models/importjob.py:67 +msgid "Status of the job" +msgstr "Estado do trabalho" + +#: import_export_celery/models/exportjob.py:48 +msgid "Format of file to be exported" +msgstr "Formato do ficheiro a ser exportado" + +#: import_export_celery/models/exportjob.py:55 +msgid "App label of model to export from" +msgstr "Nome da aplicação do modelo para exportar de" + +#: import_export_celery/models/exportjob.py:60 +msgid "Name of model to export from" +msgstr "Nome do modelo a exportar de" + +#: import_export_celery/models/exportjob.py:65 +msgid "Resource to use when exporting" +msgstr "Recurso a utilizar aquando da exportação" + +#: import_export_celery/models/exportjob.py:71 +msgid "JSON list of pks to export" +msgstr "Lista de ids em formato json para exportar" + +#: import_export_celery/models/exportjob.py:76 +msgid "Send me an email when this export job is complete" +msgstr "Enviar um email quando o trabalho de exportação estiver completo" + +#: import_export_celery/models/exportjob.py:81 +msgid "Site of origin" +msgstr "Site de origem" + +#: import_export_celery/models/exportjob.py:87 +msgid "Export job" +msgstr "Trabalho de exportação" + +#: import_export_celery/models/exportjob.py:88 +msgid "Export jobs" +msgstr "Trabalhos de exportação" + +#: import_export_celery/models/importjob.py:22 +msgid "File to be imported" +msgstr "Arquivo a ser importado" + +#: import_export_celery/models/importjob.py:37 +msgid "Has the import been completed? If so when?" +msgstr "A importação foi completa? Se sim, quando?" + +#: import_export_celery/models/importjob.py:44 +msgid "Format of file to be imported" +msgstr "Formato do ficheiro a ser importado" + +#: import_export_celery/models/importjob.py:49 +msgid "Summary of changes made by this import" +msgstr "Resumo das alterações feitas por esta importação" + +#: import_export_celery/models/importjob.py:56 +msgid "Errors" +msgstr "Erros" + +#: import_export_celery/models/importjob.py:73 +msgid "Import job" +msgstr "Trabalho de importação" + +#: import_export_celery/models/importjob.py:74 +msgid "Import jobs" +msgstr "Trabalhos de importação" + +#: import_export_celery/tasks.py:61 +#, python-format +msgid "Imported file has a wrong encoding: %s" +msgstr "O arquivo importado tem uma codificação errada: %s" + +#: import_export_celery/tasks.py:68 +#, python-format +msgid "Error reading file: %s" +msgstr "Erro a ler o ficheiro: %s" + +#: import_export_celery/tasks.py:101 +#, python-format +msgid "" +"Line: %s - %s\n" +"\t%s\n" +"%s" +msgstr "" +"Linha: %s - %s\n" +"\t%s\n" +"%s" + +#: import_export_celery/tasks.py:190 +#, python-format +msgid "Import error %s" +msgstr "Erro de importação %s" diff --git a/import_export_celery/migrations/0008_alter_exportjob_id_alter_importjob_id.py b/import_export_celery/migrations/0008_alter_exportjob_id_alter_importjob_id.py new file mode 100644 index 0000000..d8eab09 --- /dev/null +++ b/import_export_celery/migrations/0008_alter_exportjob_id_alter_importjob_id.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.6 on 2023-05-15 16:34 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('import_export_celery', '0007_auto_20210210_1831'), + ] + + operations = [ + migrations.AlterField( + model_name='exportjob', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + migrations.AlterField( + model_name='importjob', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + ] diff --git a/import_export_celery/models/exportjob.py b/import_export_celery/models/exportjob.py index c7324c0..0ec9c03 100644 --- a/import_export_celery/models/exportjob.py +++ b/import_export_celery/models/exportjob.py @@ -78,10 +78,15 @@ def __init__(self, *args, **kwargs): ) site_of_origin = models.TextField( + verbose_name=_("Site of origin"), max_length=255, default="", ) + class Meta: + verbose_name = _("Export job") + verbose_name_plural = _("Export jobs") + def get_resource_class(self): if self.resource: return ( diff --git a/import_export_celery/models/importjob.py b/import_export_celery/models/importjob.py index 7a4f56b..a9bef5b 100644 --- a/import_export_celery/models/importjob.py +++ b/import_export_celery/models/importjob.py @@ -53,6 +53,7 @@ class ImportJob(models.Model): ) errors = models.TextField( + verbose_name=_("Errors"), default="", blank=True, ) @@ -68,6 +69,10 @@ class ImportJob(models.Model): blank=True, ) + class Meta: + verbose_name = _("Import job") + verbose_name_plural = _("Import jobs") + @staticmethod def get_format_choices(): """returns choices of available import formats""" @@ -83,4 +88,9 @@ def importjob_post_save(sender, instance, **kwargs): if not instance.processing_initiated: instance.processing_initiated = timezone.now() instance.save() - transaction.on_commit(lambda: run_import_job.delay(instance.pk, dry_run=getattr(settings, "IMPORT_DRY_RUN_FIRST_TIME", True))) + transaction.on_commit( + lambda: run_import_job.delay( + instance.pk, + dry_run=getattr(settings, "IMPORT_DRY_RUN_FIRST_TIME", True), + ) + )