Commit 8b79b8d103f75eb3316d9d853328c3f300f7e401
1 parent
62dbbc11
Exists in
master
and in
2 other branches
finally solved translation problem on reports webpage
Showing
2 changed files
with
58 additions
and
12 deletions
Show diff stats
reports/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 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 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -196,24 +196,67 @@ msgid "Number of access to mural between 0 a.m to 6a.m. ." | @@ -196,24 +196,67 @@ msgid "Number of access to mural between 0 a.m to 6a.m. ." | ||
196 | msgstr "" | 196 | msgstr "" |
197 | "Número de acessos ao ambiente virtual da disciplina no horário de 24h às 06h." | 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 | msgid "Number of access to the subject on " | 230 | msgid "Number of access to the subject on " |
201 | msgstr "Número de acessos ao assunto na(o) " | 231 | msgstr "Número de acessos ao assunto na(o) " |
202 | 232 | ||
203 | -#: views.py:298 | 233 | +#: views.py:300 |
204 | msgid "Number of distinct days the user access the subject. " | 234 | msgid "Number of distinct days the user access the subject. " |
205 | msgstr "Número de dias distintos que acessou o ambiente virtual da disciplina." | 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 | msgid "Class" | 238 | msgid "Class" |
209 | msgstr "Classe" | 239 | msgstr "Classe" |
210 | 240 | ||
211 | -#: views.py:300 | 241 | +#: views.py:302 |
212 | msgid "Performance" | 242 | msgid "Performance" |
213 | msgstr "Desempenho" | 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 | #~ msgid "Topics to select data from" | 261 | #~ msgid "Topics to select data from" |
219 | #~ msgstr "Tópico do qual os dados serão retirados" | 262 | #~ msgstr "Tópico do qual os dados serão retirados" |
reports/views.py
@@ -286,7 +286,8 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): | @@ -286,7 +286,8 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): | ||
286 | 286 | ||
287 | #VAR24 through 30 | 287 | #VAR24 through 30 |
288 | day_numbers = [0, 1, 2, 3, 4, 5, 6] | 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 | distinct_days = 0 | 291 | distinct_days = 0 |
291 | for day_num in day_numbers: | 292 | for day_num in day_numbers: |
292 | #day+1 is because the days are started on 1 instead of the lists, which index starts at 0 | 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,13 +408,15 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): | ||
407 | if count > 0: | 408 | if count > 0: |
408 | distinct_resources += 1 | 409 | distinct_resources += 1 |
409 | total_count += count | 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 | if resources_types[i].lower() in ["ytvideo", "webconference"]: | 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 | """data["distinct" + str(resources[i]) + " with tag " + Tag.objects.get(id=int(tags[i])).name] = Log.objects.filter(action="view", resource=resources[i].lower(), | 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 | user_id = student.id, context__contains = {'subject_id': subject.id}).distinct().count()""" | 422 | user_id = student.id, context__contains = {'subject_id': subject.id}).distinct().count()""" |