Commit 7134e6991e84c566425cfa941c0dfdca29c811b9
1 parent
646fcd8b
Exists in
master
and in
2 other branches
Resolvendo problemas de texto nos modais do mural
Showing
5 changed files
with
142 additions
and
393 deletions
Show diff stats
mural/forms.py
1 | 1 | # coding=utf-8 |
2 | 2 | from django import forms |
3 | -from django.utils.translation import ugettext_lazy as _ | |
3 | +from django.utils.translation import ugettext_lazy as _, pgettext_lazy | |
4 | 4 | from django.utils.html import strip_tags |
5 | 5 | from django.db.models import Q |
6 | 6 | |
... | ... | @@ -13,6 +13,11 @@ from .models import GeneralPost, CategoryPost, SubjectPost, Comment |
13 | 13 | class Validation(forms.ModelForm): |
14 | 14 | MAX_UPLOAD_SIZE = 5*1024*1024 |
15 | 15 | |
16 | + def __init__(self, *args, **kwargs): | |
17 | + super(Validation, self).__init__(*args, **kwargs) | |
18 | + CHOICES = (("comment", pgettext_lazy("form","Comment")), ("help", pgettext_lazy("form","Ask for Help"))) | |
19 | + self.fields['action'].choices = CHOICES | |
20 | + | |
16 | 21 | def clean_post(self): |
17 | 22 | post = self.cleaned_data.get('post', '') |
18 | 23 | cleaned_post = strip_tags(post) |
... | ... | @@ -38,9 +43,11 @@ class Validation(forms.ModelForm): |
38 | 43 | |
39 | 44 | |
40 | 45 | class GeneralPostForm(Validation): |
46 | + | |
41 | 47 | class Meta: |
42 | 48 | model = GeneralPost |
43 | 49 | fields = ['action', 'post', 'image'] |
50 | + | |
44 | 51 | widgets = { |
45 | 52 | 'action': forms.RadioSelect, |
46 | 53 | 'post': forms.Textarea, | ... | ... |
mural/locale/pt-br/LC_MESSAGES/django.po
... | ... | @@ -1,241 +0,0 @@ |
1 | -# SOME DESCRIPTIVE TITLE. | |
2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | -# This file is distributed under the same license as the PACKAGE package. | |
4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | -# | |
6 | -#, fuzzy | |
7 | -msgid "" | |
8 | -msgstr "" | |
9 | -"Project-Id-Version: PACKAGE VERSION\n" | |
10 | -"Report-Msgid-Bugs-To: \n" | |
11 | -"POT-Creation-Date: 2017-02-09 18:40-0300\n" | |
12 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | -"Language: \n" | |
16 | -"MIME-Version: 1.0\n" | |
17 | -"Content-Type: text/plain; charset=UTF-8\n" | |
18 | -"Content-Transfer-Encoding: 8bit\n" | |
19 | - | |
20 | -#: mural/forms.py:16 mural/forms.py:51 | |
21 | -msgid "This field is required." | |
22 | -msgstr "" | |
23 | - | |
24 | -#: mural/forms.py:28 mural/forms.py:63 | |
25 | -msgid "The image is too large. It should have less than 5MB." | |
26 | -msgstr "" | |
27 | - | |
28 | -#: mural/models.py:18 | |
29 | -msgid "File not supported." | |
30 | -msgstr "" | |
31 | - | |
32 | -#: mural/models.py:21 | |
33 | -msgid "Action" | |
34 | -msgstr "" | |
35 | - | |
36 | -#: mural/models.py:21 mural/models.py:66 mural/models.py:79 | |
37 | -#: mural/templates/mural/_view_comment.html:14 | |
38 | -msgid "Comment" | |
39 | -msgstr "" | |
40 | - | |
41 | -#: mural/models.py:21 | |
42 | -msgid "Ask for Help" | |
43 | -msgstr "" | |
44 | - | |
45 | -#: mural/models.py:22 mural/models.py:68 mural/models.py:78 mural/models.py:86 | |
46 | -msgid "Post" | |
47 | -msgstr "" | |
48 | - | |
49 | -#: mural/models.py:23 mural/models.py:67 | |
50 | -msgid "Image" | |
51 | -msgstr "" | |
52 | - | |
53 | -#: mural/models.py:24 mural/models.py:69 mural/models.py:80 mural/models.py:87 | |
54 | -msgid "User" | |
55 | -msgstr "" | |
56 | - | |
57 | -#: mural/models.py:25 mural/models.py:70 | |
58 | -msgid "Create Date" | |
59 | -msgstr "" | |
60 | - | |
61 | -#: mural/models.py:26 mural/models.py:71 | |
62 | -msgid "Last Update" | |
63 | -msgstr "" | |
64 | - | |
65 | -#: mural/models.py:27 | |
66 | -msgid "Edited" | |
67 | -msgstr "" | |
68 | - | |
69 | -#: mural/models.py:38 | |
70 | -msgid "Space" | |
71 | -msgstr "" | |
72 | - | |
73 | -#: mural/models.py:56 | |
74 | -msgid "Subject" | |
75 | -msgstr "" | |
76 | - | |
77 | -#: mural/models.py:57 | |
78 | -msgid "Resource" | |
79 | -msgstr "" | |
80 | - | |
81 | -#: mural/models.py:77 | |
82 | -msgid "Viewed" | |
83 | -msgstr "" | |
84 | - | |
85 | -#: mural/templates/mural/_form.html:54 | |
86 | -#: mural/templates/mural/_form_comment.html:33 | |
87 | -msgid "Choose your photo..." | |
88 | -msgstr "" | |
89 | - | |
90 | -#: mural/templates/mural/_form.html:63 | |
91 | -#: mural/templates/mural/_form_comment.html:42 | |
92 | -msgid "Click or drop the file here" | |
93 | -msgstr "" | |
94 | - | |
95 | -#: mural/templates/mural/_form.html:65 | |
96 | -#: mural/templates/mural/_form_comment.html:44 | |
97 | -msgid "The file could not exceed 5MB." | |
98 | -msgstr "" | |
99 | - | |
100 | -#: mural/templates/mural/_form.html:87 | |
101 | -#: mural/templates/mural/_form_comment.html:66 | |
102 | -msgid "Save" | |
103 | -msgstr "" | |
104 | - | |
105 | -#: mural/templates/mural/_form.html:88 | |
106 | -#: mural/templates/mural/_form_comment.html:67 | |
107 | -#: mural/templates/mural/_form_comment.html:91 | |
108 | -msgid "Cancel" | |
109 | -msgstr "" | |
110 | - | |
111 | -#: mural/templates/mural/_form_comment.html:77 | |
112 | -msgid "Mark user in comment" | |
113 | -msgstr "" | |
114 | - | |
115 | -#: mural/templates/mural/_form_comment.html:80 | |
116 | -msgid "Type the user name in the field below" | |
117 | -msgstr "" | |
118 | - | |
119 | -#: mural/templates/mural/_form_comment.html:90 | |
120 | -msgid "Mark" | |
121 | -msgstr "" | |
122 | - | |
123 | -#: mural/templates/mural/_form_comment.html:106 | |
124 | -msgid "Mark User" | |
125 | -msgstr "" | |
126 | - | |
127 | -#: mural/templates/mural/_user_suggestions_list.html:16 | |
128 | -msgid "No results found." | |
129 | -msgstr "" | |
130 | - | |
131 | -#: mural/templates/mural/_view.html:21 | |
132 | -#: mural/templates/mural/_view_comment.html:22 | |
133 | -msgid "Edit" | |
134 | -msgstr "" | |
135 | - | |
136 | -#: mural/templates/mural/_view.html:23 | |
137 | -#: mural/templates/mural/_view_comment.html:24 | |
138 | -msgid "Remove" | |
139 | -msgstr "" | |
140 | - | |
141 | -#: mural/templates/mural/_view.html:35 | |
142 | -#: mural/templates/mural/_view_comment.html:31 | |
143 | -msgid "In" | |
144 | -msgstr "" | |
145 | - | |
146 | -#: mural/templates/mural/_view.html:59 | |
147 | -msgid "Make a comment..." | |
148 | -msgstr "" | |
149 | - | |
150 | -#: mural/templates/mural/delete.html:8 | |
151 | -msgid "Are you sure you want to delete this post" | |
152 | -msgstr "" | |
153 | - | |
154 | -#: mural/templates/mural/delete.html:13 | |
155 | -msgid "Close" | |
156 | -msgstr "" | |
157 | - | |
158 | -#: mural/templates/mural/delete.html:16 | |
159 | -msgid "Delete" | |
160 | -msgstr "" | |
161 | - | |
162 | -#: mural/templates/mural/list.html:9 | |
163 | -msgid "Mural: General" | |
164 | -msgstr "" | |
165 | - | |
166 | -#: mural/templates/mural/list.html:17 | |
167 | -msgid "General" | |
168 | -msgstr "" | |
169 | - | |
170 | -#: mural/templates/mural/list.html:18 | |
171 | -msgid "Per Category" | |
172 | -msgstr "" | |
173 | - | |
174 | -#: mural/templates/mural/list.html:19 | |
175 | -msgid "Per Subject" | |
176 | -msgstr "" | |
177 | - | |
178 | -#: mural/templates/mural/list.html:32 | |
179 | -msgid "Wish to make a new post?" | |
180 | -msgstr "" | |
181 | - | |
182 | -#: mural/templates/mural/list.html:50 | |
183 | -msgid "There are no posts in this mural yet." | |
184 | -msgstr "" | |
185 | - | |
186 | -#: mural/templates/mural/list.html:54 mural/templates/mural/list.html:67 | |
187 | -msgid "Filter" | |
188 | -msgstr "" | |
189 | - | |
190 | -#: mural/templates/mural/list.html:59 | |
191 | -msgid "Favorite posts" | |
192 | -msgstr "" | |
193 | - | |
194 | -#: mural/templates/mural/list.html:64 | |
195 | -msgid "Only my posts" | |
196 | -msgstr "" | |
197 | - | |
198 | -#: mural/templates/mural/list.html:68 | |
199 | -msgid "Clean Filters" | |
200 | -msgstr "" | |
201 | - | |
202 | -#: mural/templatetags/mural_filters.py:11 | |
203 | -msgid "(Edited)" | |
204 | -msgstr "" | |
205 | - | |
206 | -#: mural/templatetags/mural_filters.py:29 mural/views.py:231 | |
207 | -msgid "Unfavorite" | |
208 | -msgstr "" | |
209 | - | |
210 | -#: mural/templatetags/mural_filters.py:31 mural/views.py:235 | |
211 | -msgid "Favorite" | |
212 | -msgstr "" | |
213 | - | |
214 | -#: mural/views.py:71 | |
215 | -msgid "Mural" | |
216 | -msgstr "" | |
217 | - | |
218 | -#: mural/views.py:115 mural/views.py:267 | |
219 | -#, python-format | |
220 | -msgid "%s has made a post in General" | |
221 | -msgstr "" | |
222 | - | |
223 | -#: mural/views.py:212 | |
224 | -msgid "Your post was published successfully!" | |
225 | -msgstr "" | |
226 | - | |
227 | -#: mural/views.py:214 | |
228 | -msgid "Your post was edited successfully!" | |
229 | -msgstr "" | |
230 | - | |
231 | -#: mural/views.py:221 | |
232 | -msgid "Post deleted successfully!" | |
233 | -msgstr "" | |
234 | - | |
235 | -#: mural/views.py:299 | |
236 | -msgid "Your comment was published successfully!" | |
237 | -msgstr "" | |
238 | - | |
239 | -#: mural/views.py:301 | |
240 | -msgid "Your comment was edited successfully!" | |
241 | -msgstr "" |
mural/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-28 22:35-0300\n" | |
11 | +"POT-Creation-Date: 2017-03-29 17:22-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" |
... | ... | @@ -18,357 +18,340 @@ msgstr "" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | |
21 | -#: mural/forms.py:21 mural/forms.py:104 | |
21 | +#: forms.py:18 | |
22 | +#| msgid "Comment" | |
23 | +msgctxt "form" | |
24 | +msgid "Comment" | |
25 | +msgstr "Comentar" | |
26 | + | |
27 | +#: forms.py:18 | |
28 | +#| msgctxt "modal" | |
29 | +#| msgid "Ask for Help" | |
30 | +msgctxt "form" | |
31 | +msgid "Ask for Help" | |
32 | +msgstr "Pedir ajuda" | |
33 | + | |
34 | +#: forms.py:26 forms.py:111 | |
22 | 35 | msgid "This field is required." |
23 | 36 | msgstr "Esse campo é obrigatório." |
24 | 37 | |
25 | -#: mural/forms.py:33 mural/forms.py:116 | |
38 | +#: forms.py:38 forms.py:123 | |
26 | 39 | msgid "The image is too large. It should have less than 5MB." |
27 | 40 | msgstr "A imagem é muito grande. Ela deve possuir 5MB ou menos." |
28 | 41 | |
29 | -#: mural/forms.py:75 | |
42 | +#: forms.py:82 | |
30 | 43 | msgid "Choose an especific resource" |
31 | 44 | msgstr "Escolha um recurso específico" |
32 | 45 | |
33 | -#: mural/models.py:18 | |
46 | +#: models.py:18 | |
34 | 47 | msgid "File not supported." |
35 | 48 | msgstr "Arquivo não suportado." |
36 | 49 | |
37 | -#: mural/models.py:21 | |
50 | +#: models.py:21 | |
38 | 51 | msgid "Action" |
39 | 52 | msgstr "Ação" |
40 | 53 | |
41 | -#: mural/models.py:21 mural/models.py:105 mural/models.py:119 | |
42 | -#: mural/templates/mural/_form_comment.html:66 | |
43 | -#: mural/templates/mural/_view_comment.html:14 | |
54 | +#: models.py:21 | |
55 | +msgctxt "modal" | |
44 | 56 | msgid "Comment" |
45 | -msgstr "Comentar" | |
57 | +msgstr "Comentou" | |
46 | 58 | |
47 | -#: mural/models.py:21 | |
59 | +#: models.py:21 | |
60 | +msgctxt "modal" | |
48 | 61 | msgid "Ask for Help" |
49 | -msgstr "Pedir ajuda" | |
62 | +msgstr "Pediu ajuda" | |
50 | 63 | |
51 | -#: mural/models.py:22 mural/models.py:107 mural/models.py:118 | |
52 | -#: mural/models.py:127 | |
64 | +#: models.py:22 models.py:107 models.py:118 models.py:127 | |
53 | 65 | msgid "Post" |
54 | 66 | msgstr "Postagem" |
55 | 67 | |
56 | -#: mural/models.py:23 mural/models.py:106 | |
68 | +#: models.py:23 models.py:106 | |
57 | 69 | msgid "Image" |
58 | 70 | msgstr "Imagem" |
59 | 71 | |
60 | -#: mural/models.py:24 mural/models.py:108 mural/models.py:120 | |
61 | -#: mural/models.py:128 | |
72 | +#: models.py:24 models.py:108 models.py:120 models.py:128 | |
62 | 73 | msgid "User" |
63 | 74 | msgstr "Usuário" |
64 | 75 | |
65 | -#: mural/models.py:25 mural/models.py:109 | |
76 | +#: models.py:25 models.py:109 | |
66 | 77 | msgid "Create Date" |
67 | 78 | msgstr "Data de criação" |
68 | 79 | |
69 | -#: mural/models.py:26 mural/models.py:110 | |
80 | +#: models.py:26 models.py:110 | |
70 | 81 | msgid "Last Update" |
71 | 82 | msgstr "Última atualização" |
72 | 83 | |
73 | -#: mural/models.py:27 mural/models.py:111 | |
84 | +#: models.py:27 models.py:111 | |
74 | 85 | msgid "Edited" |
75 | 86 | msgstr "Editado" |
76 | 87 | |
77 | -#: mural/models.py:50 | |
88 | +#: models.py:50 | |
78 | 89 | msgid "Space" |
79 | 90 | msgstr "Espaço" |
80 | 91 | |
81 | -#: mural/models.py:86 | |
92 | +#: models.py:86 | |
82 | 93 | msgid "Subject" |
83 | 94 | msgstr "Assunto" |
84 | 95 | |
85 | -#: mural/models.py:87 | |
96 | +#: models.py:87 | |
86 | 97 | msgid "Resource" |
87 | 98 | msgstr "Recurso" |
88 | 99 | |
89 | -#: mural/models.py:117 | |
100 | +#: models.py:105 models.py:119 templates/mural/_form_comment.html:66 | |
101 | +msgid "Comment" | |
102 | +msgstr "Comentar" | |
103 | + | |
104 | +#: models.py:117 | |
90 | 105 | msgid "Viewed" |
91 | 106 | msgstr "Visualizado" |
92 | 107 | |
93 | -#: mural/models.py:121 | |
108 | +#: models.py:121 | |
94 | 109 | msgid "Date/Time Viewed" |
95 | 110 | msgstr "" |
96 | 111 | |
97 | -#: mural/templates/mural/_form.html:76 | |
98 | -#: mural/templates/mural/_form_comment.html:42 | |
99 | -#, fuzzy | |
100 | -#| msgid "Click or drop the file here" | |
112 | +#: templates/mural/_form.html:76 templates/mural/_form_comment.html:42 | |
101 | 113 | msgid "Click or drop the picture here" |
102 | 114 | msgstr "Clique ou solte a imagem aqui" |
103 | 115 | |
104 | -#: mural/templates/mural/_form.html:78 | |
105 | -#: mural/templates/mural/_form_comment.html:44 | |
106 | -#, fuzzy | |
107 | -#| msgid "The file could not exceed 5MB." | |
116 | +#: templates/mural/_form.html:78 templates/mural/_form_comment.html:44 | |
108 | 117 | msgid "The picture could not exceed 5MB." |
109 | 118 | msgstr "A imagem não pode exceder 5MB." |
110 | 119 | |
111 | -#: mural/templates/mural/_form.html:100 | |
112 | -#, fuzzy | |
113 | -#| msgid "Post" | |
120 | +#: templates/mural/_form.html:100 | |
114 | 121 | msgctxt "button" |
115 | 122 | msgid "Post" |
116 | 123 | msgstr "Postar" |
117 | 124 | |
118 | -#: mural/templates/mural/_form.html:101 | |
119 | -#: mural/templates/mural/_form_comment.html:67 | |
120 | -#: mural/templates/mural/_form_comment.html:85 | |
125 | +#: templates/mural/_form.html:101 templates/mural/_form_comment.html:67 | |
126 | +#: templates/mural/_form_comment.html:85 | |
121 | 127 | msgid "Cancel" |
122 | 128 | msgstr "Cancelar" |
123 | 129 | |
124 | -#: mural/templates/mural/_form_comment.html:33 | |
130 | +#: templates/mural/_form_comment.html:33 | |
125 | 131 | msgid "Choose your photo..." |
126 | 132 | msgstr "Escolha sua foto..." |
127 | 133 | |
128 | -#: mural/templates/mural/_form_comment.html:78 | |
134 | +#: templates/mural/_form_comment.html:78 | |
129 | 135 | msgid "Insert here the name of the user you wish to mark in this comment" |
130 | 136 | msgstr "Insira aqui o nome do usuário que você quer marcar nesse comentário" |
131 | 137 | |
132 | -#: mural/templates/mural/_form_comment.html:84 | |
138 | +#: templates/mural/_form_comment.html:84 | |
133 | 139 | msgid "Mark" |
134 | 140 | msgstr "Marcar" |
135 | 141 | |
136 | -#: mural/templates/mural/_form_comment.html:100 | |
142 | +#: templates/mural/_form_comment.html:100 | |
137 | 143 | msgid "Mark User" |
138 | 144 | msgstr "Marcar Usuário" |
139 | 145 | |
140 | -#: mural/templates/mural/_user_suggestions_list.html:16 | |
146 | +#: templates/mural/_user_suggestions_list.html:16 | |
141 | 147 | msgid "No results found." |
142 | 148 | msgstr "Nenhum resultado encontrado." |
143 | 149 | |
144 | -#: mural/templates/mural/_view.html:22 | |
145 | -#: mural/templates/mural/_view_comment.html:22 | |
146 | -#: mural/templates/mural/list_category.html:59 | |
147 | -#: mural/templates/mural/list_subject.html:58 | |
148 | -#: mural/templates/mural/subject_view.html:39 | |
150 | +#: templates/mural/_view.html:22 templates/mural/_view_comment.html:22 | |
151 | +#: templates/mural/list_category.html:59 templates/mural/list_subject.html:58 | |
152 | +#: templates/mural/subject_view.html:39 | |
149 | 153 | msgid "Edit" |
150 | 154 | msgstr "Editar" |
151 | 155 | |
152 | -#: mural/templates/mural/_view.html:24 | |
153 | -#: mural/templates/mural/_view_comment.html:24 | |
154 | -#: mural/templates/mural/list_category.html:61 | |
155 | -#: mural/templates/mural/list_subject.html:60 | |
156 | -#: mural/templates/mural/subject_view.html:41 | |
156 | +#: templates/mural/_view.html:24 templates/mural/_view_comment.html:24 | |
157 | +#: templates/mural/list_category.html:61 templates/mural/list_subject.html:60 | |
158 | +#: templates/mural/subject_view.html:41 | |
157 | 159 | msgid "Remove" |
158 | 160 | msgstr "Remover" |
159 | 161 | |
160 | -#: mural/templates/mural/_view.html:36 | |
161 | -#: mural/templates/mural/_view_comment.html:31 | |
162 | +#: templates/mural/_view.html:36 templates/mural/_view_comment.html:31 | |
162 | 163 | msgid "In" |
163 | 164 | msgstr "Em" |
164 | 165 | |
165 | -#: mural/templates/mural/_view.html:47 | |
166 | +#: templates/mural/_view.html:47 | |
166 | 167 | msgid "See complete post" |
167 | 168 | msgstr "Ver postagem completa" |
168 | 169 | |
169 | -#: mural/templates/mural/_view.html:50 | |
170 | +#: templates/mural/_view.html:50 | |
170 | 171 | msgid "See more comments..." |
171 | 172 | msgstr "Ver mais comentários..." |
172 | 173 | |
173 | -#: mural/templates/mural/_view.html:61 | |
174 | +#: templates/mural/_view.html:61 | |
174 | 175 | msgid "Make a comment..." |
175 | 176 | msgstr "Faça um comentário..." |
176 | 177 | |
177 | -#: mural/templates/mural/delete.html:13 | |
178 | +#: templates/mural/_view_comment.html:14 | |
179 | +#| msgid "Comment" | |
180 | +msgctxt "view" | |
181 | +msgid "Comment" | |
182 | +msgstr "Comentou" | |
183 | + | |
184 | +#: templates/mural/delete.html:13 | |
178 | 185 | msgid "Close" |
179 | 186 | msgstr "Fechar" |
180 | 187 | |
181 | -#: mural/templates/mural/delete.html:16 | |
188 | +#: templates/mural/delete.html:16 | |
182 | 189 | msgid "Delete" |
183 | 190 | msgstr "Deletar" |
184 | 191 | |
185 | -#: mural/templates/mural/list.html:9 | |
192 | +#: templates/mural/list.html:9 | |
186 | 193 | msgid "Mural: General" |
187 | 194 | msgstr "Mural: Geral" |
188 | 195 | |
189 | -#: mural/templates/mural/list.html:17 | |
190 | -#: mural/templates/mural/list_category.html:19 | |
191 | -#: mural/templates/mural/list_subject.html:19 | |
196 | +#: templates/mural/list.html:17 templates/mural/list_category.html:19 | |
197 | +#: templates/mural/list_subject.html:19 | |
192 | 198 | msgid "General" |
193 | 199 | msgstr "Geral" |
194 | 200 | |
195 | -#: mural/templates/mural/list.html:18 | |
196 | -#: mural/templates/mural/list_category.html:20 | |
197 | -#: mural/templates/mural/list_subject.html:20 | |
201 | +#: templates/mural/list.html:18 templates/mural/list_category.html:20 | |
202 | +#: templates/mural/list_subject.html:20 | |
198 | 203 | msgid "Per Category" |
199 | 204 | msgstr "Por Categoria" |
200 | 205 | |
201 | -#: mural/templates/mural/list.html:19 | |
202 | -#: mural/templates/mural/list_category.html:21 | |
203 | -#: mural/templates/mural/list_subject.html:21 | |
206 | +#: templates/mural/list.html:19 templates/mural/list_category.html:21 | |
207 | +#: templates/mural/list_subject.html:21 | |
204 | 208 | msgid "Per Subject" |
205 | 209 | msgstr "Por Assunto" |
206 | 210 | |
207 | -#: mural/templates/mural/list.html:26 mural/templates/mural/list.html:39 | |
208 | -#: mural/templates/mural/list.html:74 mural/templates/mural/list.html:87 | |
209 | -#: mural/templates/mural/list_category.html:75 | |
210 | -#: mural/templates/mural/list_category.html:88 | |
211 | -#: mural/templates/mural/list_category.html:126 | |
212 | -#: mural/templates/mural/list_category.html:139 | |
213 | -#: mural/templates/mural/list_subject.html:74 | |
214 | -#: mural/templates/mural/list_subject.html:87 | |
215 | -#: mural/templates/mural/list_subject.html:125 | |
216 | -#: mural/templates/mural/list_subject.html:138 | |
217 | -#: mural/templates/mural/resource_view.html:73 | |
218 | -#: mural/templates/mural/resource_view.html:86 | |
219 | -#: mural/templates/mural/subject_view.html:85 | |
220 | -#: mural/templates/mural/subject_view.html:98 | |
211 | +#: templates/mural/list.html:26 templates/mural/list.html:39 | |
212 | +#: templates/mural/list.html:74 templates/mural/list.html:87 | |
213 | +#: templates/mural/list_category.html:75 templates/mural/list_category.html:88 | |
214 | +#: templates/mural/list_category.html:126 | |
215 | +#: templates/mural/list_category.html:139 templates/mural/list_subject.html:74 | |
216 | +#: templates/mural/list_subject.html:87 templates/mural/list_subject.html:125 | |
217 | +#: templates/mural/list_subject.html:138 templates/mural/resource_view.html:73 | |
218 | +#: templates/mural/resource_view.html:86 templates/mural/subject_view.html:85 | |
219 | +#: templates/mural/subject_view.html:98 | |
221 | 220 | msgid "Filter" |
222 | 221 | msgstr "Filtrar" |
223 | 222 | |
224 | -#: mural/templates/mural/list.html:31 mural/templates/mural/list.html:79 | |
225 | -#: mural/templates/mural/list_category.html:80 | |
226 | -#: mural/templates/mural/list_category.html:131 | |
227 | -#: mural/templates/mural/list_subject.html:79 | |
228 | -#: mural/templates/mural/list_subject.html:130 | |
229 | -#: mural/templates/mural/resource_view.html:78 | |
230 | -#: mural/templates/mural/subject_view.html:90 | |
223 | +#: templates/mural/list.html:31 templates/mural/list.html:79 | |
224 | +#: templates/mural/list_category.html:80 templates/mural/list_category.html:131 | |
225 | +#: templates/mural/list_subject.html:79 templates/mural/list_subject.html:130 | |
226 | +#: templates/mural/resource_view.html:78 templates/mural/subject_view.html:90 | |
231 | 227 | msgid "Favorite posts" |
232 | 228 | msgstr "Postagens favoritas" |
233 | 229 | |
234 | -#: mural/templates/mural/list.html:36 mural/templates/mural/list.html:84 | |
235 | -#: mural/templates/mural/list_category.html:85 | |
236 | -#: mural/templates/mural/list_category.html:136 | |
237 | -#: mural/templates/mural/list_subject.html:84 | |
238 | -#: mural/templates/mural/list_subject.html:135 | |
239 | -#: mural/templates/mural/resource_view.html:83 | |
240 | -#: mural/templates/mural/subject_view.html:95 | |
230 | +#: templates/mural/list.html:36 templates/mural/list.html:84 | |
231 | +#: templates/mural/list_category.html:85 templates/mural/list_category.html:136 | |
232 | +#: templates/mural/list_subject.html:84 templates/mural/list_subject.html:135 | |
233 | +#: templates/mural/resource_view.html:83 templates/mural/subject_view.html:95 | |
241 | 234 | msgid "Only my posts" |
242 | 235 | msgstr "Apenas minhas postagens" |
243 | 236 | |
244 | -#: mural/templates/mural/list.html:40 mural/templates/mural/list.html:88 | |
245 | -#: mural/templates/mural/list_category.html:89 | |
246 | -#: mural/templates/mural/list_category.html:140 | |
247 | -#: mural/templates/mural/list_subject.html:88 | |
248 | -#: mural/templates/mural/list_subject.html:139 | |
249 | -#: mural/templates/mural/resource_view.html:87 | |
250 | -#: mural/templates/mural/subject_view.html:99 | |
237 | +#: templates/mural/list.html:40 templates/mural/list.html:88 | |
238 | +#: templates/mural/list_category.html:89 templates/mural/list_category.html:140 | |
239 | +#: templates/mural/list_subject.html:88 templates/mural/list_subject.html:139 | |
240 | +#: templates/mural/resource_view.html:87 templates/mural/subject_view.html:99 | |
251 | 241 | msgid "Clean Filters" |
252 | 242 | msgstr "Limpar Filtros" |
253 | 243 | |
254 | -#: mural/templates/mural/list.html:52 | |
255 | -#: mural/templates/mural/list_category.html:101 | |
256 | -#: mural/templates/mural/list_subject.html:100 | |
257 | -#: mural/templates/mural/resource_view.html:51 | |
258 | -#: mural/templates/mural/subject_view.html:63 | |
244 | +#: templates/mural/list.html:52 templates/mural/list_category.html:101 | |
245 | +#: templates/mural/list_subject.html:100 templates/mural/resource_view.html:51 | |
246 | +#: templates/mural/subject_view.html:63 | |
259 | 247 | msgid "Wish to make a new post?" |
260 | 248 | msgstr "Deseja fazer uma nova postagem?" |
261 | 249 | |
262 | -#: mural/templates/mural/list.html:70 | |
263 | -#: mural/templates/mural/list_category.html:122 | |
264 | -#: mural/templates/mural/list_subject.html:121 | |
265 | -#: mural/templates/mural/resource_view.html:69 | |
266 | -#: mural/templates/mural/subject_view.html:81 | |
250 | +#: templates/mural/list.html:70 templates/mural/list_category.html:122 | |
251 | +#: templates/mural/list_subject.html:121 templates/mural/resource_view.html:69 | |
252 | +#: templates/mural/subject_view.html:81 | |
267 | 253 | msgid "There are no posts in this mural yet." |
268 | 254 | msgstr "Ainda não existe nenhuma postagem nesse mural." |
269 | 255 | |
270 | -#: mural/templates/mural/list_category.html:9 | |
256 | +#: templates/mural/list_category.html:9 | |
271 | 257 | msgid "Mural: Per Category" |
272 | 258 | msgstr "Mural: Por Categoria" |
273 | 259 | |
274 | -#: mural/templates/mural/list_category.html:57 | |
275 | -#: mural/templates/mural/list_subject.html:56 | |
276 | -#: mural/templates/mural/subject_view.html:37 | |
260 | +#: templates/mural/list_category.html:57 templates/mural/list_subject.html:56 | |
261 | +#: templates/mural/subject_view.html:37 | |
277 | 262 | msgid "Replicate" |
278 | 263 | msgstr "Replicar" |
279 | 264 | |
280 | -#: mural/templates/mural/list_category.html:111 | |
281 | -#: mural/templates/mural/list_subject.html:110 | |
265 | +#: templates/mural/list_category.html:111 templates/mural/list_subject.html:110 | |
282 | 266 | msgid "See more posts" |
283 | 267 | msgstr "Ver mais postagens" |
284 | 268 | |
285 | -#: mural/templates/mural/list_subject.html:9 | |
269 | +#: templates/mural/list_subject.html:9 | |
286 | 270 | msgid "Mural: Per Subject" |
287 | 271 | msgstr "Mural: Por Assunto" |
288 | 272 | |
289 | -#: mural/templates/mural/list_subject.html:59 | |
290 | -#: mural/templates/mural/subject_view.html:40 | |
273 | +#: templates/mural/list_subject.html:59 templates/mural/subject_view.html:40 | |
291 | 274 | msgid "Groups" |
292 | 275 | msgstr "Grupos" |
293 | 276 | |
294 | -#: mural/templates/mural/resource_view.html:12 | |
295 | -#: mural/templates/mural/subject_view.html:9 mural/views.py:101 | |
277 | +#: templates/mural/resource_view.html:12 templates/mural/subject_view.html:9 | |
278 | +#: views.py:101 | |
296 | 279 | msgid "Mural" |
297 | 280 | msgstr "Mural" |
298 | 281 | |
299 | -#: mural/templatetags/mural_filters.py:12 | |
282 | +#: templatetags/mural_filters.py:12 | |
300 | 283 | msgid "(Edited)" |
301 | 284 | msgstr "(Editado)" |
302 | 285 | |
303 | -#: mural/templatetags/mural_filters.py:30 mural/views.py:1226 | |
286 | +#: templatetags/mural_filters.py:30 views.py:1226 | |
304 | 287 | msgid "Unfavorite" |
305 | 288 | msgstr "Desfavoritar" |
306 | 289 | |
307 | -#: mural/templatetags/mural_filters.py:32 mural/views.py:1230 | |
290 | +#: templatetags/mural_filters.py:32 views.py:1230 | |
308 | 291 | msgid "Favorite" |
309 | 292 | msgstr "Favoritar" |
310 | 293 | |
311 | -#: mural/templatetags/mural_filters.py:106 | |
294 | +#: templatetags/mural_filters.py:106 | |
312 | 295 | msgid "about" |
313 | 296 | msgstr "sobre" |
314 | 297 | |
315 | -#: mural/views.py:154 | |
298 | +#: views.py:154 | |
316 | 299 | #, python-format |
317 | 300 | msgid "%s has made a post in General" |
318 | 301 | msgstr "%s postou em Geral" |
319 | 302 | |
320 | -#: mural/views.py:258 mural/views.py:522 mural/views.py:858 | |
303 | +#: views.py:258 views.py:522 views.py:858 | |
321 | 304 | msgid "Are you sure you want to delete this post?" |
322 | 305 | msgstr "Você tem certeza que deseja deletar essa postagem?" |
323 | 306 | |
324 | -#: mural/views.py:366 | |
307 | +#: views.py:366 | |
325 | 308 | msgid "Mural - Per Category" |
326 | 309 | msgstr "Mural - Por Categoria" |
327 | 310 | |
328 | -#: mural/views.py:411 mural/views.py:717 mural/views.py:1152 | |
311 | +#: views.py:411 views.py:717 views.py:1152 | |
329 | 312 | #, python-format |
330 | 313 | msgid "%s has made a post in %s" |
331 | 314 | msgstr "%s postou em %s" |
332 | 315 | |
333 | -#: mural/views.py:655 | |
316 | +#: views.py:655 | |
334 | 317 | msgid "Mural - Per Subject" |
335 | 318 | msgstr "Mural - Por Assunto" |
336 | 319 | |
337 | -#: mural/views.py:969 mural/views.py:1085 | |
320 | +#: views.py:969 views.py:1085 | |
338 | 321 | #, python-format |
339 | 322 | msgid "%s - Mural" |
340 | 323 | msgstr "%s - Mural" |
341 | 324 | |
342 | -#: mural/views.py:1207 | |
325 | +#: views.py:1207 | |
343 | 326 | msgid "Your post was published successfully!" |
344 | 327 | msgstr "Sua postagem foi publicada com sucesso!" |
345 | 328 | |
346 | -#: mural/views.py:1209 | |
329 | +#: views.py:1209 | |
347 | 330 | msgid "Your post was edited successfully!" |
348 | 331 | msgstr "Sua postagem foi editada com sucesso!" |
349 | 332 | |
350 | -#: mural/views.py:1216 | |
333 | +#: views.py:1216 | |
351 | 334 | msgid "Post deleted successfully!" |
352 | 335 | msgstr "Postagem deletada com sucesso!" |
353 | 336 | |
354 | -#: mural/views.py:1284 | |
337 | +#: views.py:1284 | |
355 | 338 | #, python-format |
356 | 339 | msgid "%s has commented in a post" |
357 | 340 | msgstr "%s comentou em um postagem" |
358 | 341 | |
359 | -#: mural/views.py:1443 | |
342 | +#: views.py:1443 | |
360 | 343 | msgid "Are you sure you want to delete this comment?" |
361 | 344 | msgstr "Você tem certeza que deseja deletar esse comentário?" |
362 | 345 | |
363 | -#: mural/views.py:1510 | |
346 | +#: views.py:1510 | |
364 | 347 | msgid "Your comment was published successfully!" |
365 | 348 | msgstr "Seu comentário foi publicado com sucesso!" |
366 | 349 | |
367 | -#: mural/views.py:1512 | |
350 | +#: views.py:1512 | |
368 | 351 | msgid "Your comment was edited successfully!" |
369 | 352 | msgstr "Seu comentário foi editado com sucesso!" |
370 | 353 | |
371 | -#: mural/views.py:1519 | |
354 | +#: views.py:1519 | |
372 | 355 | msgid "Comment deleted successfully!" |
373 | 356 | msgstr "Comentário deletado com sucesso!" |
374 | 357 | ... | ... |
mural/models.py
1 | 1 | from django.db import models |
2 | 2 | from django.core import validators |
3 | 3 | from django.core.exceptions import ValidationError |
4 | -from django.utils.translation import ugettext_lazy as _ | |
4 | +from django.utils.translation import ugettext_lazy as _, pgettext_lazy | |
5 | 5 | |
6 | 6 | from topics.decorators import always_as_child |
7 | 7 | |
... | ... | @@ -12,13 +12,13 @@ from users.models import User |
12 | 12 | |
13 | 13 | def validate_img_extension(value): |
14 | 14 | valid_formats = ['image/jpeg','image/x-citrix-jpeg','image/png','image/x-citrix-png','image/x-png'] |
15 | - | |
15 | + | |
16 | 16 | if hasattr(value.file, 'content_type'): |
17 | 17 | if not value.file.content_type in valid_formats: |
18 | 18 | raise ValidationError(_('File not supported.')) |
19 | 19 | |
20 | 20 | class Mural(KnowsChild): |
21 | - action = models.CharField(_('Action'), max_length = 100, default = "comment", choices = (("comment", _("Comment")), ("help", _("Ask for Help")))) | |
21 | + action = models.CharField(_('Action'), max_length = 100, default = "comment", choices = (("comment", pgettext_lazy("modal","Comment")), ("help", pgettext_lazy("modal","Ask for Help")))) | |
22 | 22 | post = models.TextField(_('Post'), blank = True) |
23 | 23 | image = models.ImageField(verbose_name = _('Image'), null=True, blank = True, upload_to = 'posts/', validators = [validate_img_extension]) |
24 | 24 | user = models.ForeignKey(User, verbose_name = _('User'), related_name = "post_user", null = True) |
... | ... | @@ -125,4 +125,4 @@ class MuralVisualizations(models.Model): |
125 | 125 | """ |
126 | 126 | class MuralFavorites(models.Model): |
127 | 127 | post = models.ForeignKey(Mural, verbose_name = _('Post'), related_name = 'favorites_post', null = True) |
128 | - user = models.ForeignKey(User, verbose_name = _('User'), related_name = "favorites_user", null = True) | |
129 | 128 | \ No newline at end of file |
129 | + user = models.ForeignKey(User, verbose_name = _('User'), related_name = "favorites_user", null = True) | ... | ... |
mural/templates/mural/_view_comment.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | {{ comment.user }} |
12 | 12 | <span class="user-action"> |
13 | 13 | <i class="fa fa-commenting-o"></i> |
14 | - {% trans 'Comment' %} | |
14 | + {% trans 'Comment' context "view" %} | |
15 | 15 | </span> |
16 | 16 | {% if comment|show_settings_comment:request.user %} |
17 | 17 | <span class="btn-group pull-right"> |
... | ... | @@ -39,4 +39,4 @@ |
39 | 39 | <img src="{{ comment.image.url }}" class="img-responsive center-block" /> |
40 | 40 | {% endif %} |
41 | 41 | </div> |
42 | -</div> | |
43 | 42 | \ No newline at end of file |
43 | +</div> | ... | ... |