Commit 8b79b8d103f75eb3316d9d853328c3f300f7e401

Authored by fbormann
1 parent 62dbbc11

finally solved translation problem on reports webpage

reports/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -8,7 +8,7 @@ msgid ""
8 8 msgstr ""
9 9 "Project-Id-Version: PACKAGE VERSION\n"
10 10 "Report-Msgid-Bugs-To: \n"
11   -"POT-Creation-Date: 2017-03-24 18:33-0300\n"
  11 +"POT-Creation-Date: 2017-03-28 20:11-0300\n"
12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 14 "Language-Team: LANGUAGE <LL@li.org>\n"
... ... @@ -196,24 +196,67 @@ msgid &quot;Number of access to mural between 0 a.m to 6a.m. .&quot;
196 196 msgstr ""
197 197 "Número de acessos ao ambiente virtual da disciplina no horário de 24h às 06h."
198 198  
199   -#: views.py:292 views.py:295
  199 +#: views.py:289
  200 +msgid "sunday"
  201 +msgstr "domingo"
  202 +
  203 +#: views.py:289
  204 +#, fuzzy
  205 +#| msgid "sunday"
  206 +msgid "monday"
  207 +msgstr "domingo"
  208 +
  209 +#: views.py:289
  210 +msgid "tuesday"
  211 +msgstr "terça-feira"
  212 +
  213 +#: views.py:289
  214 +msgid "wednesday"
  215 +msgstr "quarta"
  216 +
  217 +#: views.py:289
  218 +msgid "thursday"
  219 +msgstr "quinta-feira"
  220 +
  221 +#: views.py:290
  222 +msgid "friday"
  223 +msgstr "sexta"
  224 +
  225 +#: views.py:290
  226 +msgid "saturday"
  227 +msgstr "sábado"
  228 +
  229 +#: views.py:294 views.py:297
200 230 msgid "Number of access to the subject on "
201 231 msgstr "Número de acessos ao assunto na(o) "
202 232  
203   -#: views.py:298
  233 +#: views.py:300
204 234 msgid "Number of distinct days the user access the subject. "
205 235 msgstr "Número de dias distintos que acessou o ambiente virtual da disciplina."
206 236  
207   -#: views.py:299
  237 +#: views.py:301
208 238 msgid "Class"
209 239 msgstr "Classe"
210 240  
211   -#: views.py:300
  241 +#: views.py:302
212 242 msgid "Performance"
213 243 msgstr "Desempenho"
214 244  
215   -#~ msgid "sunday"
216   -#~ msgstr "domingo"
  245 +#: views.py:414 views.py:415 views.py:416 views.py:419
  246 +msgid " with tag "
  247 +msgstr " com a tag "
  248 +
  249 +#: views.py:415
  250 +msgid "distintic "
  251 +msgstr "distintos "
  252 +
  253 +#: views.py:416
  254 +msgid "distintic days "
  255 +msgstr "dias distintos "
  256 +
  257 +#: views.py:419
  258 +msgid "hours viewed of "
  259 +msgstr "quantidade de horas vistas "
217 260  
218 261 #~ msgid "Topics to select data from"
219 262 #~ msgstr "Tópico do qual os dados serão retirados"
... ...
reports/views.py
... ... @@ -286,7 +286,8 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView):
286 286  
287 287 #VAR24 through 30
288 288 day_numbers = [0, 1, 2, 3, 4, 5, 6]
289   - day_names = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]
  289 + day_names = [str(_("sunday")), str(_("monday")), str(_("tuesday")), str(_("wednesday")), str(_("thursday")),
  290 + str(_("friday")), str(_("saturday"))]
290 291 distinct_days = 0
291 292 for day_num in day_numbers:
292 293 #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):
407 408 if count > 0:
408 409 distinct_resources += 1
409 410 total_count += count
  411 +
  412 +
410 413  
411   - data[str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = total_count
412   - data["distintic " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = distinct_resources
413   - data["distintic days " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = distinct_days
  414 + data[str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = total_count
  415 + data[str(_("distintic ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = distinct_resources
  416 + data[str(_("distintic days ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = distinct_days
414 417  
415 418 if resources_types[i].lower() in ["ytvideo", "webconference"]:
416   - data["hours viewed of " + str(resources_types[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = hours_viewed
  419 + data[str(_("hours viewed of ")) + str(resources_types[i]) + str(_(" with tag ")) + Tag.objects.get(id=int(tags[i])).name] = hours_viewed
417 420  
418 421 """data["distinct" + str(resources[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = Log.objects.filter(action="view", resource=resources[i].lower(),
419 422 user_id = student.id, context__contains = {'subject_id': subject.id}).distinct().count()"""
... ...