Commit 30f93fc0ea37e6053ce49c91c806368a9f228c17

Authored by Zambom
1 parent 3dd858c7

Aplicando i18n nos formulários de categoria, curso e módulo

app/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: 2016-08-12 19:40-0300\n"
  11 +"POT-Creation-Date: 2016-08-25 13:03-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"
... ... @@ -73,14 +73,22 @@ msgstr &quot;&quot;
73 73 msgid "Gerenciar Categorias"
74 74 msgstr ""
75 75  
76   -#: app/templates/app/index.html:64
  76 +#: app/templates/app/index.html:45
  77 +msgid "Your course(s):"
  78 +msgstr ""
  79 +
  80 +#: app/templates/app/index.html:46
  81 +msgid "No courses subscribed yet"
  82 +msgstr ""
  83 +
  84 +#: app/templates/app/index.html:56
77 85 msgid "Search course:"
78 86 msgstr ""
79 87  
80   -#: app/templates/app/index.html:70
  88 +#: app/templates/app/index.html:62
81 89 msgid "Search"
82 90 msgstr ""
83 91  
84   -#: app/templates/app/index.html:75
  92 +#: app/templates/app/index.html:67
85 93 msgid "Most popular keywords:"
86 94 msgstr ""
... ...
core/locale/pt_br/LC_MESSAGES/django.po
... ... @@ -8,7 +8,7 @@ msgid &quot;&quot;
8 8 msgstr ""
9 9 "Project-Id-Version: PACKAGE VERSION\n"
10 10 "Report-Msgid-Bugs-To: \n"
11   -"POT-Creation-Date: 2016-08-12 19:40-0300\n"
  11 +"POT-Creation-Date: 2016-08-25 13:03-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"
... ...
courses/forms.py
1 1 from django import forms
  2 +from django.utils.translation import ugettext_lazy as _
2 3 from .models import Category, Course, Module
3 4  
4 5 class CategoryForm(forms.ModelForm):
... ... @@ -7,10 +8,10 @@ class CategoryForm(forms.ModelForm):
7 8 model = Category
8 9 fields = ('name',)
9 10 labels = {
10   - 'name': 'Nome'
  11 + 'name': _('Name')
11 12 }
12 13 help_texts = {
13   - 'name': 'Nome da categoria'
  14 + 'name': _('Category name')
14 15 }
15 16  
16 17  
... ... @@ -21,28 +22,28 @@ class CourseForm(forms.ModelForm):
21 22 fields = ('name', 'objectivies', 'content', 'max_students', 'init_register_date', 'end_register_date',
22 23 'init_date', 'end_date', 'image', 'category',)
23 24 labels = {
24   - 'name': 'Nome',
25   - 'objectivies': 'Objetivos',
26   - 'content': 'Programa',
27   - 'max_students': 'Número máximo de alunos',
28   - 'init_register_date': 'Data de início da inscrição do curso',
29   - 'end_register_date': 'Data de término da inscrição do curso',
30   - 'init_date': 'Data de início do curso',
31   - 'end_date': 'Data de término do curso',
32   - 'image': 'Imagem',
33   - 'category': 'Categoria',
  25 + 'name': _('Name'),
  26 + 'objectivies': _('Objectives'),
  27 + 'content': _('Content'),
  28 + 'max_students': _('Number of studets maximum'),
  29 + 'init_register_date': _('Course registration start date'),
  30 + 'end_register_date': _('Course registration end date'),
  31 + 'init_date': _('Course start date'),
  32 + 'end_date': _('Course end date'),
  33 + 'image': _('Image'),
  34 + 'category': _('Category'),
34 35 }
35 36 help_texts = {
36   - 'name': 'Nome do curso',
37   - 'objectivies': 'Objetivo do curso',
38   - 'content': 'Módulos presentes no curso',
39   - 'max_students': 'Número máximo de alunos que uma turma do curso pode ter',
40   - 'init_register_date': 'Data em que começam as inscrições para o curso (dd/mm/yyyy)',
41   - 'end_register_date': 'Data em que terminam as inscrições para o curso (dd/mm/yyyy)',
42   - 'init_date': 'Data em que começa o curso (dd/mm/yyyy)',
43   - 'end_date': 'Data em que termina o curso (dd/mm/yyyy)',
44   - 'image': 'Imagem representativa do curso',
45   - 'category': 'Categoria em que o curso se enquadra',
  37 + 'name': _('Course name'),
  38 + 'objectivies': _('Course objective'),
  39 + 'content': _('COurse modules'),
  40 + 'max_students': _('Max number of students that a class can have'),
  41 + 'init_register_date': _('Date that starts the registration period of the course (dd/mm/yyyy)'),
  42 + 'end_register_date': _('Date that ends the registration period of the course (dd/mm/yyyy)'),
  43 + 'init_date': _('Date that the course starts (dd/mm/yyyy)'),
  44 + 'end_date': _('Date that the course ends (dd/mm/yyyy)'),
  45 + 'image': _('Representative image of the course'),
  46 + 'category': _('Category which the course belongs'),
46 47 }
47 48  
48 49 class ModuleForm(forms.ModelForm):
... ... @@ -51,12 +52,12 @@ class ModuleForm(forms.ModelForm):
51 52 model = Module
52 53 fields = ('name', 'description', 'visible',)
53 54 labels = {
54   - 'name': 'Nome',
55   - 'description': 'Descrição',
56   - 'visible': 'Está visível?',
  55 + 'name': _('Name'),
  56 + 'description': _('Description'),
  57 + 'visible': _('Is it visible?'),
57 58 }
58 59 help_texts = {
59   - 'name': 'Nome do módulo',
60   - 'description': 'Descrição do módulo',
61   - 'visible': 'O módulo está visível?',
  60 + 'name': _("Module's name"),
  61 + 'description': _("Modules's description"),
  62 + 'visible': _('Is the module visible?'),
62 63 }
63 64 \ No newline at end of file
... ...
courses/locale/pt_br/LC_MESSAGES/django.po
... ... @@ -8,7 +8,7 @@ msgid &quot;&quot;
8 8 msgstr ""
9 9 "Project-Id-Version: PACKAGE VERSION\n"
10 10 "Report-Msgid-Bugs-To: \n"
11   -"POT-Creation-Date: 2016-08-12 19:40-0300\n"
  11 +"POT-Creation-Date: 2016-08-25 13:03-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"
... ... @@ -17,25 +17,122 @@ msgstr &quot;&quot;
17 17 "Content-Type: text/plain; charset=UTF-8\n"
18 18 "Content-Transfer-Encoding: 8bit\n"
19 19  
20   -#: courses/models.py:6 courses/models.py:19 courses/models.py:42
  20 +#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:55
  21 +#: courses/models.py:7 courses/models.py:20 courses/models.py:44
21 22 #: courses/templates/category/index.html:38
22 23 msgid "Name"
23 24 msgstr ""
24 25  
25   -#: courses/models.py:7 courses/models.py:20 courses/models.py:43
26   -#: courses/templates/category/index.html:39
27   -msgid "Slug"
  26 +#: courses/forms.py:14
  27 +msgid "Category name"
28 28 msgstr ""
29 29  
30   -#: courses/models.py:8 courses/models.py:24 courses/models.py:46
31   -msgid "Creation Date"
  30 +#: courses/forms.py:26
  31 +msgid "Objectives"
  32 +msgstr ""
  33 +
  34 +#: courses/forms.py:27 courses/models.py:23
  35 +msgid "Content"
  36 +msgstr ""
  37 +
  38 +#: courses/forms.py:28
  39 +msgid "Number of studets maximum"
  40 +msgstr ""
  41 +
  42 +#: courses/forms.py:29
  43 +msgid "Course registration start date"
  44 +msgstr ""
  45 +
  46 +#: courses/forms.py:30
  47 +msgid "Course registration end date"
  48 +msgstr ""
  49 +
  50 +#: courses/forms.py:31
  51 +msgid "Course start date"
32 52 msgstr ""
33 53  
34   -#: courses/models.py:11 courses/models.py:30
  54 +#: courses/forms.py:32
  55 +msgid "Course end date"
  56 +msgstr ""
  57 +
  58 +#: courses/forms.py:33 courses/models.py:30
  59 +msgid "Image"
  60 +msgstr ""
  61 +
  62 +#: courses/forms.py:34 courses/models.py:12 courses/models.py:31
35 63 msgid "Category"
36 64 msgstr ""
37 65  
38   -#: courses/models.py:12 courses/templates/category/create.html:16
  66 +#: courses/forms.py:37
  67 +msgid "Course name"
  68 +msgstr ""
  69 +
  70 +#: courses/forms.py:38
  71 +msgid "Course objective"
  72 +msgstr ""
  73 +
  74 +#: courses/forms.py:39
  75 +msgid "COurse modules"
  76 +msgstr ""
  77 +
  78 +#: courses/forms.py:40
  79 +msgid "Max number of students that a class can have"
  80 +msgstr ""
  81 +
  82 +#: courses/forms.py:41
  83 +msgid "Date that starts the registration period of the course (dd/mm/yyyy)"
  84 +msgstr ""
  85 +
  86 +#: courses/forms.py:42
  87 +msgid "Date that ends the registration period of the course (dd/mm/yyyy)"
  88 +msgstr ""
  89 +
  90 +#: courses/forms.py:43
  91 +msgid "Date that the course starts (dd/mm/yyyy)"
  92 +msgstr ""
  93 +
  94 +#: courses/forms.py:44
  95 +msgid "Date that the course ends (dd/mm/yyyy)"
  96 +msgstr ""
  97 +
  98 +#: courses/forms.py:45
  99 +msgid "Representative image of the course"
  100 +msgstr ""
  101 +
  102 +#: courses/forms.py:46
  103 +msgid "Category which the course belongs"
  104 +msgstr ""
  105 +
  106 +#: courses/forms.py:56 courses/models.py:46
  107 +msgid "Description"
  108 +msgstr ""
  109 +
  110 +#: courses/forms.py:57
  111 +msgid "Is it visible?"
  112 +msgstr ""
  113 +
  114 +#: courses/forms.py:60
  115 +msgid "Module's name"
  116 +msgstr ""
  117 +
  118 +#: courses/forms.py:61
  119 +msgid "Modules's description"
  120 +msgstr ""
  121 +
  122 +#: courses/forms.py:62
  123 +msgid "Is the module visible?"
  124 +msgstr ""
  125 +
  126 +#: courses/models.py:8 courses/models.py:21 courses/models.py:45
  127 +#: courses/templates/category/index.html:39
  128 +msgid "Slug"
  129 +msgstr ""
  130 +
  131 +#: courses/models.py:9 courses/models.py:25 courses/models.py:48
  132 +msgid "Creation Date"
  133 +msgstr ""
  134 +
  135 +#: courses/models.py:13 courses/templates/category/create.html:16
39 136 #: courses/templates/category/delete.html:15
40 137 #: courses/templates/category/index.html:15
41 138 #: courses/templates/category/update.html:16
... ... @@ -43,43 +140,39 @@ msgstr &quot;&quot;
43 140 msgid "Categories"
44 141 msgstr ""
45 142  
46   -#: courses/models.py:21
47   -msgid "Objectivies"
48   -msgstr ""
49   -
50 143 #: courses/models.py:22
51   -msgid "Content"
  144 +msgid "Objectivies"
52 145 msgstr ""
53 146  
54   -#: courses/models.py:23
  147 +#: courses/models.py:24
55 148 msgid "Maximum Students"
56 149 msgstr ""
57 150  
58   -#: courses/models.py:25
  151 +#: courses/models.py:26
59 152 msgid "Register Date (Begin)"
60 153 msgstr ""
61 154  
62   -#: courses/models.py:26
  155 +#: courses/models.py:27
63 156 msgid "Register Date (End)"
64 157 msgstr ""
65 158  
66   -#: courses/models.py:27
  159 +#: courses/models.py:28
67 160 msgid "Begin of Course Date"
68 161 msgstr ""
69 162  
70   -#: courses/models.py:28
  163 +#: courses/models.py:29
71 164 msgid "End of Course Date"
72 165 msgstr ""
73 166  
74   -#: courses/models.py:29
75   -msgid "Image"
  167 +#: courses/models.py:32
  168 +msgid "User"
76 169 msgstr ""
77 170  
78   -#: courses/models.py:34 courses/models.py:47
  171 +#: courses/models.py:36 courses/models.py:49
79 172 msgid "Course"
80 173 msgstr ""
81 174  
82   -#: courses/models.py:35 courses/templates/course/create.html:16
  175 +#: courses/models.py:37 courses/templates/course/create.html:16
83 176 #: courses/templates/course/delete.html:15
84 177 #: courses/templates/course/filtered.html:6
85 178 #: courses/templates/course/index.html:15
... ... @@ -92,19 +185,15 @@ msgstr &quot;&quot;
92 185 msgid "Courses"
93 186 msgstr ""
94 187  
95   -#: courses/models.py:44
96   -msgid "Description"
97   -msgstr ""
98   -
99   -#: courses/models.py:45 courses/templates/module/index.html:103
  188 +#: courses/models.py:47 courses/templates/module/index.html:107
100 189 msgid "Visible"
101 190 msgstr ""
102 191  
103   -#: courses/models.py:51
  192 +#: courses/models.py:53
104 193 msgid "Module"
105 194 msgstr ""
106 195  
107   -#: courses/models.py:52 courses/templates/module/index.html:88
  196 +#: courses/models.py:54 courses/templates/module/index.html:92
108 197 msgid "Modules"
109 198 msgstr ""
110 199  
... ... @@ -196,10 +285,10 @@ msgstr &quot;&quot;
196 285 #: courses/templates/course/create.html:9
197 286 #: courses/templates/course/delete.html:18
198 287 #: courses/templates/course/filtered.html:9
199   -#: courses/templates/course/index.html:18 courses/templates/course/view.html:18
  288 +#: courses/templates/course/index.html:18 courses/templates/course/view.html:25
200 289 #: courses/templates/module/create.html:20
201 290 #: courses/templates/module/delete.html:19
202   -#: courses/templates/module/index.html:19
  291 +#: courses/templates/module/index.html:26
203 292 #: courses/templates/module/update.html:20
204 293 msgid "Create Course"
205 294 msgstr ""
... ... @@ -217,88 +306,100 @@ msgstr &quot;&quot;
217 306 msgid "Manage Courses"
218 307 msgstr ""
219 308  
220   -#: courses/templates/course/index.html:84 courses/templates/course/view.html:54
221   -msgid "Subscribes:"
  309 +#: courses/templates/course/index.html:80
  310 +msgid "students tops"
  311 +msgstr ""
  312 +
  313 +#: courses/templates/course/index.html:86
  314 +msgid "Subscribe Period:"
222 315 msgstr ""
223 316  
224   -#: courses/templates/course/index.html:86 courses/templates/course/view.html:57
225   -#: courses/templates/module/index.html:79
  317 +#: courses/templates/course/index.html:88 courses/templates/course/view.html:59
  318 +#: courses/templates/module/index.html:83
226 319 msgid "Period:"
227 320 msgstr ""
228 321  
229   -#: courses/templates/course/index.html:102
  322 +#: courses/templates/course/index.html:96
  323 +msgid "Subscribe"
  324 +msgstr ""
  325 +
  326 +#: courses/templates/course/index.html:114
230 327 msgid "No courses found"
231 328 msgstr ""
232 329  
233   -#: courses/templates/course/update.html:9 courses/templates/course/view.html:24
  330 +#: courses/templates/course/update.html:9 courses/templates/course/view.html:28
234 331 #: courses/templates/module/create.html:26
235 332 #: courses/templates/module/delete.html:25
236   -#: courses/templates/module/index.html:25
  333 +#: courses/templates/module/index.html:29
237 334 #: courses/templates/module/update.html:26
238 335 msgid "Edit Course"
239 336 msgstr ""
240 337  
241 338 #: courses/templates/course/update.html:19
242   -#: courses/templates/course/view.html:27
  339 +#: courses/templates/course/view.html:21
243 340 #: courses/templates/module/create.html:29
244 341 #: courses/templates/module/delete.html:9
245 342 #: courses/templates/module/delete.html:28
246   -#: courses/templates/module/index.html:9 courses/templates/module/index.html:28
  343 +#: courses/templates/module/index.html:9 courses/templates/module/index.html:22
247 344 #: courses/templates/module/update.html:29
248 345 msgid "Manage Modules"
249 346 msgstr ""
250 347  
251 348 #: courses/templates/course/update.html:22
252   -#: courses/templates/course/view.html:30
  349 +#: courses/templates/course/view.html:31
253 350 #: courses/templates/module/create.html:32
254 351 #: courses/templates/module/delete.html:31
255   -#: courses/templates/module/index.html:31
  352 +#: courses/templates/module/index.html:32
256 353 #: courses/templates/module/update.html:32
257 354 msgid "Participants"
258 355 msgstr ""
259 356  
260   -#: courses/templates/course/view.html:21
  357 +#: courses/templates/course/view.html:18
261 358 #: courses/templates/module/create.html:23
262 359 #: courses/templates/module/delete.html:22
263   -#: courses/templates/module/index.html:22
  360 +#: courses/templates/module/index.html:19
264 361 #: courses/templates/module/update.html:23
265 362 msgid "Course Info"
266 363 msgstr ""
267 364  
268   -#: courses/templates/course/view.html:33
  365 +#: courses/templates/course/view.html:34
269 366 #: courses/templates/module/create.html:35
270 367 #: courses/templates/module/delete.html:34
271   -#: courses/templates/module/index.html:34
  368 +#: courses/templates/module/index.html:35
272 369 #: courses/templates/module/update.html:35
273 370 msgid "Course avaliations"
274 371 msgstr ""
275 372  
276   -#: courses/templates/course/view.html:36
  373 +#: courses/templates/course/view.html:37
277 374 #: courses/templates/module/create.html:38
278 375 #: courses/templates/module/delete.html:37
279   -#: courses/templates/module/index.html:37
  376 +#: courses/templates/module/index.html:38
280 377 #: courses/templates/module/update.html:38
281 378 msgid "Duplicate Course"
282 379 msgstr ""
283 380  
284   -#: courses/templates/course/view.html:39
  381 +#: courses/templates/course/view.html:40
285 382 #: courses/templates/module/create.html:41
286 383 #: courses/templates/module/delete.html:40
287   -#: courses/templates/module/index.html:40
  384 +#: courses/templates/module/index.html:41
288 385 #: courses/templates/module/update.html:41
289 386 msgid "Delete Course"
290 387 msgstr ""
291 388  
292   -#: courses/templates/course/view.html:64
  389 +#: courses/templates/course/view.html:56
  390 +msgid "Subscribes:"
  391 +msgstr ""
  392 +
  393 +#: courses/templates/course/view.html:66
293 394 msgid "Objectives:"
294 395 msgstr ""
295 396  
296   -#: courses/templates/course/view.html:67
  397 +#: courses/templates/course/view.html:69
297 398 msgid "Work Plan:"
298 399 msgstr ""
299 400  
300 401 #: courses/templates/module/create.html:10
301   -#: courses/templates/module/index.html:67
  402 +#: courses/templates/module/index.html:70
302 403 msgid "Create Module"
303 404 msgstr ""
304 405  
... ... @@ -306,11 +407,15 @@ msgstr &quot;&quot;
306 407 msgid "Are you sure you want to delete the module"
307 408 msgstr ""
308 409  
309   -#: courses/templates/module/index.html:105
  410 +#: courses/templates/module/index.html:80
  411 +msgid "students maximum"
  412 +msgstr ""
  413 +
  414 +#: courses/templates/module/index.html:109
310 415 msgid "Invisible"
311 416 msgstr ""
312 417  
313   -#: courses/templates/module/index.html:121
  418 +#: courses/templates/module/index.html:125
314 419 msgid "No modules found"
315 420 msgstr ""
316 421  
... ... @@ -318,38 +423,38 @@ msgstr &quot;&quot;
318 423 msgid "Edit Module"
319 424 msgstr ""
320 425  
321   -#: courses/views.py:48
  426 +#: courses/views.py:49
322 427 msgid "Course created successfully!"
323 428 msgstr ""
324 429  
325   -#: courses/views.py:70
  430 +#: courses/views.py:71
326 431 msgid "Course edited successfully!"
327 432 msgstr ""
328 433  
329   -#: courses/views.py:92
  434 +#: courses/views.py:93
330 435 msgid "Course deleted successfully!"
331 436 msgstr ""
332 437  
333   -#: courses/views.py:142
  438 +#: courses/views.py:143
334 439 msgid "Category created successfully!"
335 440 msgstr ""
336 441  
337   -#: courses/views.py:164
  442 +#: courses/views.py:165
338 443 msgid "Category edited successfully!"
339 444 msgstr ""
340 445  
341   -#: courses/views.py:185
  446 +#: courses/views.py:186
342 447 msgid "Category deleted successfully!"
343 448 msgstr ""
344 449  
345   -#: courses/views.py:237
  450 +#: courses/views.py:238
346 451 msgid "Module created successfully!"
347 452 msgstr ""
348 453  
349   -#: courses/views.py:268
  454 +#: courses/views.py:269
350 455 msgid "Module edited successfully!"
351 456 msgstr ""
352 457  
353   -#: courses/views.py:291
  458 +#: courses/views.py:292
354 459 msgid "Module deleted successfully!"
355 460 msgstr ""
... ...
users/locale/pt_br/LC_MESSAGES/django.po
... ... @@ -8,7 +8,7 @@ msgid &quot;&quot;
8 8 msgstr ""
9 9 "Project-Id-Version: PACKAGE VERSION\n"
10 10 "Report-Msgid-Bugs-To: \n"
11   -"POT-Creation-Date: 2016-08-12 19:40-0300\n"
  11 +"POT-Creation-Date: 2016-08-25 13:03-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"
... ...