Skip to content

Commit dde72db

Browse files
authored
Merge pull request #99 from Ubiwhere/feat/translations
added translation in portuguese
2 parents 87bb13f + 65ed15a commit dde72db

File tree

6 files changed

+190
-2
lines changed

6 files changed

+190
-2
lines changed

import_export_celery/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
class JobWithStatusMixin:
12+
@admin.display(description=_("Job status info"))
1213
def job_status_info(self, obj):
1314
job_status = cache.get(self.direction + "_job_status_%s" % obj.pk)
1415
if job_status:
@@ -18,7 +19,6 @@ def job_status_info(self, obj):
1819

1920

2021
class ImportJobForm(forms.ModelForm):
21-
2222
model = forms.ChoiceField(label=_("Name of model to import to"))
2323

2424
class Meta:
Binary file not shown.
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2+
# This file is distributed under the same license as the PACKAGE package.
3+
#
4+
# Dan <[email protected]>, 2020.
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: \n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2023-05-17 20:55+0000\n"
10+
"PO-Revision-Date: 2023-05-17 21:56+0100\n"
11+
"Last-Translator: Daniel Pluth <[email protected]>\n"
12+
"Language-Team: \n"
13+
"Language: pt_BR\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
18+
"X-Generator: Poedit 3.3.1\n"
19+
20+
#: import_export_celery/admin.py:12
21+
msgid "Job status info"
22+
msgstr "Informação do estado do trabalho"
23+
24+
#: import_export_celery/admin.py:22 import_export_celery/models/importjob.py:62
25+
msgid "Name of model to import to"
26+
msgstr "Nome do modelo a importar"
27+
28+
#: import_export_celery/admin_actions.py:20
29+
msgid "Perform import"
30+
msgstr "Confirmar importação"
31+
32+
#: import_export_celery/admin_actions.py:29
33+
msgid "Perform dry import"
34+
msgstr "Confirmar importação"
35+
36+
#: import_export_celery/admin_actions.py:39
37+
msgid "Run export job"
38+
msgstr "Correr trabalho de exportação"
39+
40+
#: import_export_celery/admin_actions.py:67
41+
msgid "Export with celery"
42+
msgstr "Exportar com o celery"
43+
44+
#: import_export_celery/apps.py:7
45+
msgid "Import Export Celery"
46+
msgstr "Importar ou Exportar com o celery"
47+
48+
#: import_export_celery/models/exportjob.py:27
49+
msgid "exported file"
50+
msgstr "ficheiro exportado"
51+
52+
#: import_export_celery/models/exportjob.py:35
53+
#: import_export_celery/models/importjob.py:30
54+
msgid "Have we started processing the file? If so when?"
55+
msgstr "Começou a processar o ficheiro? Se sim, quando?"
56+
57+
#: import_export_celery/models/exportjob.py:42
58+
#: import_export_celery/models/importjob.py:67
59+
msgid "Status of the job"
60+
msgstr "Estado do trabalho"
61+
62+
#: import_export_celery/models/exportjob.py:48
63+
msgid "Format of file to be exported"
64+
msgstr "Formato do ficheiro a ser exportado"
65+
66+
#: import_export_celery/models/exportjob.py:55
67+
msgid "App label of model to export from"
68+
msgstr "Nome da aplicação do modelo para exportar de"
69+
70+
#: import_export_celery/models/exportjob.py:60
71+
msgid "Name of model to export from"
72+
msgstr "Nome do modelo a exportar de"
73+
74+
#: import_export_celery/models/exportjob.py:65
75+
msgid "Resource to use when exporting"
76+
msgstr "Recurso a utilizar aquando da exportação"
77+
78+
#: import_export_celery/models/exportjob.py:71
79+
msgid "JSON list of pks to export"
80+
msgstr "Lista de ids em formato json para exportar"
81+
82+
#: import_export_celery/models/exportjob.py:76
83+
msgid "Send me an email when this export job is complete"
84+
msgstr "Enviar um email quando o trabalho de exportação estiver completo"
85+
86+
#: import_export_celery/models/exportjob.py:81
87+
msgid "Site of origin"
88+
msgstr "Site de origem"
89+
90+
#: import_export_celery/models/exportjob.py:87
91+
msgid "Export job"
92+
msgstr "Trabalho de exportação"
93+
94+
#: import_export_celery/models/exportjob.py:88
95+
msgid "Export jobs"
96+
msgstr "Trabalhos de exportação"
97+
98+
#: import_export_celery/models/importjob.py:22
99+
msgid "File to be imported"
100+
msgstr "Arquivo a ser importado"
101+
102+
#: import_export_celery/models/importjob.py:37
103+
msgid "Has the import been completed? If so when?"
104+
msgstr "A importação foi completa? Se sim, quando?"
105+
106+
#: import_export_celery/models/importjob.py:44
107+
msgid "Format of file to be imported"
108+
msgstr "Formato do ficheiro a ser importado"
109+
110+
#: import_export_celery/models/importjob.py:49
111+
msgid "Summary of changes made by this import"
112+
msgstr "Resumo das alterações feitas por esta importação"
113+
114+
#: import_export_celery/models/importjob.py:56
115+
msgid "Errors"
116+
msgstr "Erros"
117+
118+
#: import_export_celery/models/importjob.py:73
119+
msgid "Import job"
120+
msgstr "Trabalho de importação"
121+
122+
#: import_export_celery/models/importjob.py:74
123+
msgid "Import jobs"
124+
msgstr "Trabalhos de importação"
125+
126+
#: import_export_celery/tasks.py:61
127+
#, python-format
128+
msgid "Imported file has a wrong encoding: %s"
129+
msgstr "O arquivo importado tem uma codificação errada: %s"
130+
131+
#: import_export_celery/tasks.py:68
132+
#, python-format
133+
msgid "Error reading file: %s"
134+
msgstr "Erro a ler o ficheiro: %s"
135+
136+
#: import_export_celery/tasks.py:101
137+
#, python-format
138+
msgid ""
139+
"Line: %s - %s\n"
140+
"\t%s\n"
141+
"%s"
142+
msgstr ""
143+
"Linha: %s - %s\n"
144+
"\t%s\n"
145+
"%s"
146+
147+
#: import_export_celery/tasks.py:190
148+
#, python-format
149+
msgid "Import error %s"
150+
msgstr "Erro de importação %s"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 4.0.6 on 2023-05-15 16:34
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('import_export_celery', '0007_auto_20210210_1831'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='exportjob',
15+
name='id',
16+
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
17+
),
18+
migrations.AlterField(
19+
model_name='importjob',
20+
name='id',
21+
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
22+
),
23+
]

import_export_celery/models/exportjob.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,15 @@ def __init__(self, *args, **kwargs):
7878
)
7979

8080
site_of_origin = models.TextField(
81+
verbose_name=_("Site of origin"),
8182
max_length=255,
8283
default="",
8384
)
8485

86+
class Meta:
87+
verbose_name = _("Export job")
88+
verbose_name_plural = _("Export jobs")
89+
8590
def get_resource_class(self):
8691
if self.resource:
8792
return (

import_export_celery/models/importjob.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class ImportJob(models.Model):
5353
)
5454

5555
errors = models.TextField(
56+
verbose_name=_("Errors"),
5657
default="",
5758
blank=True,
5859
)
@@ -68,6 +69,10 @@ class ImportJob(models.Model):
6869
blank=True,
6970
)
7071

72+
class Meta:
73+
verbose_name = _("Import job")
74+
verbose_name_plural = _("Import jobs")
75+
7176
@staticmethod
7277
def get_format_choices():
7378
"""returns choices of available import formats"""
@@ -83,4 +88,9 @@ def importjob_post_save(sender, instance, **kwargs):
8388
if not instance.processing_initiated:
8489
instance.processing_initiated = timezone.now()
8590
instance.save()
86-
transaction.on_commit(lambda: run_import_job.delay(instance.pk, dry_run=getattr(settings, "IMPORT_DRY_RUN_FIRST_TIME", True)))
91+
transaction.on_commit(
92+
lambda: run_import_job.delay(
93+
instance.pk,
94+
dry_run=getattr(settings, "IMPORT_DRY_RUN_FIRST_TIME", True),
95+
)
96+
)

0 commit comments

Comments
 (0)