From 8b79b8d103f75eb3316d9d853328c3f300f7e401 Mon Sep 17 00:00:00 2001 From: fbormann Date: Tue, 28 Mar 2017 20:12:07 -0300 Subject: [PATCH] finally solved translation problem on reports webpage --- reports/locale/pt_BR/LC_MESSAGES/django.po | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++------- reports/views.py | 13 ++++++++----- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/reports/locale/pt_BR/LC_MESSAGES/django.po b/reports/locale/pt_BR/LC_MESSAGES/django.po index 08ac713..4abf355 100644 --- a/reports/locale/pt_BR/LC_MESSAGES/django.po +++ b/reports/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-24 18:33-0300\n" +"POT-Creation-Date: 2017-03-28 20:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -196,24 +196,67 @@ msgid "Number of access to mural between 0 a.m to 6a.m. ." msgstr "" "Número de acessos ao ambiente virtual da disciplina no horário de 24h às 06h." -#: views.py:292 views.py:295 +#: views.py:289 +msgid "sunday" +msgstr "domingo" + +#: views.py:289 +#, fuzzy +#| msgid "sunday" +msgid "monday" +msgstr "domingo" + +#: views.py:289 +msgid "tuesday" +msgstr "terça-feira" + +#: views.py:289 +msgid "wednesday" +msgstr "quarta" + +#: views.py:289 +msgid "thursday" +msgstr "quinta-feira" + +#: views.py:290 +msgid "friday" +msgstr "sexta" + +#: views.py:290 +msgid "saturday" +msgstr "sábado" + +#: views.py:294 views.py:297 msgid "Number of access to the subject on " msgstr "Número de acessos ao assunto na(o) " -#: views.py:298 +#: views.py:300 msgid "Number of distinct days the user access the subject. " msgstr "Número de dias distintos que acessou o ambiente virtual da disciplina." -#: views.py:299 +#: views.py:301 msgid "Class" msgstr "Classe" -#: views.py:300 +#: views.py:302 msgid "Performance" msgstr "Desempenho" -#~ msgid "sunday" -#~ msgstr "domingo" +#: views.py:414 views.py:415 views.py:416 views.py:419 +msgid " with tag " +msgstr " com a tag " + +#: views.py:415 +msgid "distintic " +msgstr "distintos " + +#: views.py:416 +msgid "distintic days " +msgstr "dias distintos " + +#: views.py:419 +msgid "hours viewed of " +msgstr "quantidade de horas vistas " #~ msgid "Topics to select data from" #~ msgstr "Tópico do qual os dados serão retirados" diff --git a/reports/views.py b/reports/views.py index 7de17bc..a0d4397 100644 --- a/reports/views.py +++ b/reports/views.py @@ -286,7 +286,8 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): #VAR24 through 30 day_numbers = [0, 1, 2, 3, 4, 5, 6] - day_names = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"] + day_names = [str(_("sunday")), str(_("monday")), str(_("tuesday")), str(_("wednesday")), str(_("thursday")), + str(_("friday")), str(_("saturday"))] distinct_days = 0 for day_num in day_numbers: #day+1 is because the days are started on 1 instead of the lists, which index starts at 0 @@ -407,13 +408,15 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): if count > 0: distinct_resources += 1 total_count += count + + - data[str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = total_count - data["distintic " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = distinct_resources - data["distintic days " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = distinct_days + data[str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = total_count + data[str(_("distintic ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = distinct_resources + data[str(_("distintic days ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = distinct_days if resources_types[i].lower() in ["ytvideo", "webconference"]: - data["hours viewed of " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = hours_viewed + data[str(_("hours viewed of ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = hours_viewed """data["distinct" + str(resources[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = Log.objects.filter(action="view", resource=resources[i].lower(), user_id = student.id, context__contains = {'subject_id': subject.id}).distinct().count()""" -- libgit2 0.21.2