From c98c25542f2efdbd719aeb2af1b7cb11659ac360 Mon Sep 17 00:00:00 2001 From: fbormann Date: Sun, 2 Apr 2017 23:53:01 -0300 Subject: [PATCH] added mapping for resource subclasses create reports and listing reports pages --- reports/locale/pt_BR/LC_MESSAGES/django.po | 83 +++++++++++++++++++++++++++++++++++++++++++++-------------------------------------- reports/views.py | 30 +++++++++++++++++++++++------- 2 files changed, 68 insertions(+), 45 deletions(-) diff --git a/reports/locale/pt_BR/LC_MESSAGES/django.po b/reports/locale/pt_BR/LC_MESSAGES/django.po index 653f41e..f2aaac0 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-28 20:11-0300\n" +"POT-Creation-Date: 2017-04-02 23:42-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,20 +27,16 @@ msgid "Tag" msgstr "Tag" #: forms.py:36 -#, fuzzy -#| msgid "Topic" msgid "Topics" -msgstr "Tópico" +msgstr "Tópicos" #: forms.py:37 templates/reports/view.html:58 msgid "Initial Date" msgstr "Data inicial" #: forms.py:38 -#, fuzzy -#| msgid "Initial Date" msgid "Final Date" -msgstr "Data inicial" +msgstr "Data Final" #: forms.py:40 msgid "From Mural" @@ -50,7 +46,7 @@ msgstr "Mural da disciplina" msgid "Messages" msgstr "Mensagens" -#: forms.py:52 views.py:133 views.py:200 +#: forms.py:52 views.py:134 views.py:205 msgid "All" msgstr "Todos" @@ -134,128 +130,139 @@ msgstr "Dados de interação (.csv)" msgid "Interactions Data (.xls)" msgstr "Dados de interação (.xls)" -#: views.py:70 +#: views.py:71 msgid "Report created successfully" msgstr "Relatório criado com sucesso!" -#: views.py:224 +#: views.py:209 +msgid "User" +msgstr "" + +#: views.py:229 msgid "Number of help posts created by the user." msgstr "Número de postagens de dúvidas criadas no mural da disciplina." -#: views.py:230 +#: views.py:235 msgid "Amount of comments on help posts created by the student." msgstr "" "Número de comentários criados para as próprias postagens de dúvidas no mural " "da disciplina." -#: views.py:235 +#: views.py:240 msgid "Amount of comments made by the student on teachers help posts." msgstr "" "Número de comentários às postagens de dúvidas no mural da disciplina criadas " "pelo professor." -#: views.py:239 +#: views.py:244 msgid "Amount of comments made by the student on other students help posts." msgstr "" "Número de comentários às postagens de dúvidas no mural da disciplina criadas " "por outros estudantes." -#: views.py:250 +#: views.py:255 msgid "Number of help posts created by the user that the teacher commented on." msgstr "" "Número de comentários às postagens de dúvidas no mural da disciplina criadas " "por outros estudantes" -#: views.py:258 +#: views.py:263 msgid "Number of help posts created by the user others students commented on." msgstr "" " Número de postagens de dúvidas criadas no mural da disciplina que foram " "comentadas por outros estudantes." -#: views.py:261 +#: views.py:266 msgid "Number of student visualizations on the mural of the subject." msgstr "Número de visualizações do mural da disciplina." -#: views.py:273 +#: views.py:278 msgid "Number of access to mural between 6 a.m to 12a.m. ." msgstr "" "Número de acessos ao ambiente virtual da disciplina no horário de 06h às 12h." -#: views.py:277 +#: views.py:282 msgid "Number of access to mural between 0 p.m to 6p.m. ." msgstr "" "Número de acessos ao ambiente virtual da disciplina no horário de 12h às 18h." -#: views.py:280 +#: views.py:285 msgid "Number of access to mural between 6 p.m to 12p.m. ." msgstr "" "Número de acessos ao ambiente virtual da disciplina no horário de 18h às 24h." -#: views.py:284 +#: views.py:289 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:289 +#: views.py:294 msgid "sunday" msgstr "domingo" -#: views.py:289 +#: views.py:294 msgid "monday" msgstr "segunda" -#: views.py:289 +#: views.py:294 msgid "tuesday" msgstr "terça-feira" -#: views.py:289 +#: views.py:294 msgid "wednesday" msgstr "quarta" -#: views.py:289 +#: views.py:294 msgid "thursday" msgstr "quinta-feira" -#: views.py:290 +#: views.py:295 msgid "friday" msgstr "sexta" -#: views.py:290 +#: views.py:295 msgid "saturday" msgstr "sábado" -#: views.py:294 views.py:297 +#: views.py:299 views.py:302 msgid "Number of access to the subject on " msgstr "Número de acessos ao assunto na(o) " -#: views.py:300 +#: views.py:305 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:301 +#: views.py:306 msgid "Class" msgstr "Classe" -#: views.py:302 +#: views.py:307 msgid "Performance" msgstr "Desempenho" -#: views.py:414 views.py:415 views.py:416 views.py:419 +#: views.py:419 +msgid "number of visualizations of " +msgstr "Número de visualizações do(e) " + +#: views.py:419 views.py:420 views.py:421 views.py:424 msgid " with tag " msgstr " com a tag " -#: views.py:415 -msgid "distintic " -msgstr "distintos " +#: views.py:420 +msgid "number of visualizations of distintic " +msgstr "Número de visualizações dos distintos " -#: views.py:416 +#: views.py:421 msgid "distintic days " -msgstr "dias distintos " +msgstr "número de dias distintos " -#: views.py:419 +#: views.py:424 msgid "hours viewed of " msgstr "quantidade de horas vistas " +#~ msgid "distintic " +#~ msgstr "distintos " + #~ 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 507a2bc..4bb7021 100644 --- a/reports/views.py +++ b/reports/views.py @@ -415,10 +415,19 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): total_count += count - - 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 + + #mapping to translate class names + mapping = {} + mapping['pdffile'] = str(_('PDF File')) + mapping['goals'] = str(_('Topic Goals')) + mapping['link'] = str(_('Link to Website')) + mapping['filelink'] = str(_('File Link')) + mapping['webconference'] = str(_('Web Conference')) + mapping['ytvideo'] = str(_('YouTube Video')) + mapping['webpage'] = str(_('WebPage')) + data[str(_("number of visualizations of ")) + mapping[str(resources_types[i])] + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = total_count + data[str(_("number of visualizations of distintic ")) + mapping[str(resources_types[i])] + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = distinct_resources + data[str(_("distintic days ")) + mapping[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[str(_("hours viewed of ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = hours_viewed @@ -436,7 +445,6 @@ def get_resources(request): #get all possible resources classes = Resource.__subclasses__() - data = {} subject = Subject.objects.get(id=request.GET['subject_id']) @@ -454,8 +462,16 @@ def get_resources(request): #remove duplicates resources = set(resources_class_names) - - data['resources']= [ {'id':resource_type, 'name':resource_type} for resource_type in resources] + mapping = {} + mapping['pdffile'] = str(_('PDF File')) + mapping['goals'] = str(_('Topic Goals')) + mapping['link'] = str(_('Link to Website')) + mapping['filelink'] = str(_('File Link')) + mapping['webconference'] = str(_('Web Conference')) + mapping['ytvideo'] = str(_('YouTube Video')) + mapping['webpage'] = str(_('WebPage')) + + data['resources']= [ {'id':resource_type, 'name':mapping[resource_type]} for resource_type in resources] return JsonResponse(data) -- libgit2 0.21.2