Commit eb210a1cb9b804c53963252e778031162788e0b9
1 parent
e7bd3b32
Exists in
master
and in
2 other branches
Resolvendo problemas com a verificação de data atual dos resourses
Showing
2 changed files
with
48 additions
and
64 deletions
Show diff stats
pendencies/forms.py
... | ... | @@ -68,20 +68,20 @@ class PendenciesForm(forms.ModelForm): |
68 | 68 | self.add_error('begin_date', _("This input should be filled with a date equal or after today's date.")) |
69 | 69 | |
70 | 70 | if begin_date.date() < subject.init_date: |
71 | - self.add_error('begin_date', _('This input should be filled with a date equal or after the subject begin date.')) | |
71 | + self.add_error('begin_date', _('This input should be filled with a date equal or after the subject begin date.("%s")')%(subject.init_date)) | |
72 | 72 | |
73 | 73 | if begin_date.date() > subject.end_date: |
74 | - self.add_error('begin_date', _('This input should be filled with a date equal or after the subject end date.')) | |
74 | + self.add_error('begin_date', _('This input should be filled with a date equal or before the subject end date.("%s")')%(subject.end_date)) | |
75 | 75 | |
76 | 76 | if not end_date == ValueError and end_date: |
77 | 77 | if not self.instance.id and end_date.date() < datetime.datetime.today().date(): |
78 | 78 | self.add_error('end_date', _("This input should be filled with a date equal or after today's date.")) |
79 | 79 | |
80 | 80 | if end_date.date() < subject.init_date: |
81 | - self.add_error('end_date', _('This input should be filled with a date equal or after the subject begin date.')) | |
81 | + self.add_error('end_date', _('This input should be filled with a date equal or after the subject begin date.("%s")')%(subject.init_date)) | |
82 | 82 | |
83 | 83 | if end_date.date() > subject.end_date: |
84 | - self.add_error('end_date', _('This input should be filled with a date equal or before the subject end date.')) | |
84 | + self.add_error('end_date', _('This input should be filled with a date equal or before the subject end date.("%s")')%(subject.end_date)) | |
85 | 85 | |
86 | 86 | return cleaned_data |
87 | 87 | |
... | ... | @@ -162,30 +162,30 @@ class PendenciesLimitedForm(forms.ModelForm): |
162 | 162 | self.add_error('begin_date', _("This input should be filled with a date equal or after today's date.")) |
163 | 163 | |
164 | 164 | if begin_date.date() < subject.init_date: |
165 | - self.add_error('begin_date', _('This input should be filled with a date equal or after the subject begin date.')) | |
165 | + self.add_error('begin_date', _('This input should be filled with a date equal or after the subject begin date.("%s")')%(subject.init_date)) | |
166 | 166 | |
167 | 167 | if begin_date.date() > subject.end_date: |
168 | - self.add_error('begin_date', _('This input should be filled with a date equal or after the subject end date.')) | |
168 | + self.add_error('begin_date', _('This input should be filled with a date equal or before the subject end date.("%s")')%(subject.end_date)) | |
169 | 169 | |
170 | 170 | if not end_date == ValueError and end_date: |
171 | 171 | if not self.instance.id and end_date.date() < datetime.datetime.today().date(): |
172 | 172 | self.add_error('end_date', _("This input should be filled with a date equal or after today's date.")) |
173 | 173 | |
174 | 174 | if end_date.date() < subject.init_date: |
175 | - self.add_error('end_date', _('This input should be filled with a date equal or after the subject begin date.')) | |
175 | + self.add_error('end_date', _('This input should be filled with a date equal or after the subject begin date.("%s")')%(subject.init_date)) | |
176 | 176 | |
177 | 177 | if end_date.date() > subject.end_date: |
178 | - self.add_error('end_date', _('This input should be filled with a date equal or before the subject end date.')) | |
178 | + self.add_error('end_date', _('This input should be filled with a date equal or before the subject end date.("%s")')%(subject.end_date)) | |
179 | 179 | |
180 | 180 | if not limit_date == ValueError and limit_date: |
181 | 181 | if not self.instance.id and limit_date.date() < datetime.datetime.today().date(): |
182 | 182 | self.add_error('limit_date', _("This input should be filled with a date equal or after today's date.")) |
183 | 183 | |
184 | 184 | if limit_date.date() < subject.init_date: |
185 | - self.add_error('limit_date', _('This input should be filled with a date equal or after the subject begin date.')) | |
185 | + self.add_error('limit_date', _('This input should be filled with a date equal or after the subject begin date.("%s")')%(subject.init_date)) | |
186 | 186 | |
187 | 187 | if limit_date.date() > subject.end_date: |
188 | - self.add_error('limit_date', _('This input should be filled with a date equal or before the subject end date.')) | |
188 | + self.add_error('limit_date', _('This input should be filled with a date equal or before the subject end date.("%s")')%(subject.end_date)) | |
189 | 189 | |
190 | 190 | if limit_submission_date: |
191 | 191 | limit_submission_date = datetime.datetime.strptime(limit_submission_date, get_format('DATETIME_CONVERT_FORMAT')) |
... | ... | @@ -193,14 +193,14 @@ class PendenciesLimitedForm(forms.ModelForm): |
193 | 193 | |
194 | 194 | if not begin_date == ValueError and begin_date: |
195 | 195 | if begin_date.date() > limit_submission_date.date(): |
196 | - self.add_error('begin_date', _('This input should be filled with a date equal or before the goals submission limit date.')) | |
196 | + self.add_error('begin_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | |
197 | 197 | |
198 | 198 | if not end_date == ValueError and end_date: |
199 | 199 | if end_date.date() > limit_submission_date.date(): |
200 | - self.add_error('end_date', _('This input should be filled with a date equal or before the goals submission limit date.')) | |
200 | + self.add_error('end_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | |
201 | 201 | |
202 | 202 | if not limit_date == ValueError and limit_date: |
203 | 203 | if limit_date.date() > limit_submission_date.date(): |
204 | - self.add_error('limit_date', _('This input should be filled with a date equal or before the goals submission limit date.')) | |
204 | + self.add_error('limit_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | |
205 | 205 | |
206 | 206 | return cleaned_data | ... | ... |
pendencies/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-04-06 22:17-0300\n" | |
11 | +"POT-Creation-Date: 2017-04-08 18:18-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,125 +18,109 @@ msgstr "" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | |
21 | -#: pendencies/forms.py:49 pendencies/forms.py:52 pendencies/forms.py:55 | |
22 | -#: pendencies/forms.py:128 pendencies/forms.py:131 pendencies/forms.py:134 | |
23 | -#: pendencies/forms.py:137 | |
21 | +#: forms.py:49 forms.py:52 forms.py:55 forms.py:128 forms.py:131 forms.py:134 | |
22 | +#: forms.py:137 | |
24 | 23 | msgid "This field is required." |
25 | 24 | msgstr "Esse campo é obrigatório." |
26 | 25 | |
27 | -#: pendencies/forms.py:60 pendencies/forms.py:142 | |
26 | +#: forms.py:60 forms.py:142 | |
28 | 27 | msgid "This input should be filled with a date equal or before the End Date." |
29 | 28 | msgstr "" |
30 | 29 | "Esse campo deve ser preenchido com uma data igual ou anterior à Data Final." |
31 | 30 | |
32 | -#: pendencies/forms.py:61 pendencies/forms.py:143 pendencies/forms.py:149 | |
31 | +#: forms.py:61 forms.py:143 forms.py:149 | |
33 | 32 | msgid "This input should be filled with a date equal or after the Begin Date." |
34 | 33 | msgstr "" |
35 | 34 | "Esse campo deve ser preenchido com uma data igual ou posterior à Data " |
36 | 35 | "Inicial." |
37 | 36 | |
38 | -#: pendencies/forms.py:68 pendencies/forms.py:78 pendencies/forms.py:162 | |
39 | -#: pendencies/forms.py:172 pendencies/forms.py:182 | |
37 | +#: forms.py:68 forms.py:78 forms.py:162 forms.py:172 forms.py:182 | |
40 | 38 | msgid "This input should be filled with a date equal or after today's date." |
41 | 39 | msgstr "" |
42 | 40 | "Esse campo deve ser preenchido com uma data igual ou posterior à data atual." |
43 | 41 | |
44 | -#: pendencies/forms.py:71 pendencies/forms.py:81 pendencies/forms.py:165 | |
45 | -#: pendencies/forms.py:175 pendencies/forms.py:185 | |
42 | +#: forms.py:71 forms.py:81 forms.py:165 forms.py:175 forms.py:185 | |
43 | +#, python-format | |
46 | 44 | msgid "" |
47 | 45 | "This input should be filled with a date equal or after the subject begin " |
48 | -"date." | |
46 | +"date.(\"%s\")" | |
49 | 47 | msgstr "" |
50 | 48 | "Esse campo deve ser preenchido com uma data igual ou posterior à data " |
51 | -"inicial do assunto." | |
49 | +"inicial do assunto.(\"%s\")" | |
52 | 50 | |
53 | -#: pendencies/forms.py:74 pendencies/forms.py:168 | |
54 | -msgid "" | |
55 | -"This input should be filled with a date equal or after the subject end date." | |
56 | -msgstr "" | |
57 | -"Esse campo deve ser preenchido com uma data igual ou posterior à data final " | |
58 | -"do assunto." | |
59 | - | |
60 | -#: pendencies/forms.py:84 pendencies/forms.py:178 pendencies/forms.py:188 | |
51 | +#: forms.py:74 forms.py:84 forms.py:168 forms.py:178 forms.py:188 | |
52 | +#, python-format | |
61 | 53 | msgid "" |
62 | 54 | "This input should be filled with a date equal or before the subject end date." |
55 | +"(\"%s\")" | |
63 | 56 | msgstr "" |
64 | 57 | "Esse campo deve ser preenchido com uma data igual ou anterior à data final " |
65 | -"do assunto" | |
58 | +"do assunto.(\"%s\")" | |
66 | 59 | |
67 | -#: pendencies/forms.py:148 pendencies/forms.py:154 | |
68 | -#, fuzzy | |
69 | -#| msgid "" | |
70 | -#| "This input should be filled with a date equal or before the End Date." | |
60 | +#: forms.py:148 forms.py:154 | |
71 | 61 | msgid "This input should be filled with a date equal or before the Limit Date." |
72 | 62 | msgstr "" |
73 | 63 | "Esse campo deve ser preenchido com uma data igual ou anterior à Data Final." |
74 | 64 | |
75 | -#: pendencies/forms.py:155 | |
76 | -#, fuzzy | |
77 | -#| msgid "" | |
78 | -#| "This input should be filled with a date equal or after the Begin Date." | |
65 | +#: forms.py:155 | |
79 | 66 | msgid "This input should be filled with a date equal or after the End Date." |
80 | 67 | msgstr "" |
81 | 68 | "Esse campo deve ser preenchido com uma data igual ou posterior à Data " |
82 | 69 | "Inicial." |
83 | 70 | |
84 | -#: pendencies/forms.py:196 pendencies/forms.py:200 pendencies/forms.py:204 | |
85 | -#, fuzzy | |
86 | -#| msgid "" | |
87 | -#| "This input should be filled with a date equal or before the subject end " | |
88 | -#| "date." | |
71 | +#: forms.py:196 forms.py:200 forms.py:204 | |
72 | +#, python-format | |
89 | 73 | msgid "" |
90 | 74 | "This input should be filled with a date equal or before the goals submission " |
91 | -"limit date." | |
75 | +"limit date.(\"%s\")" | |
92 | 76 | msgstr "" |
93 | 77 | "Esse campo deve ser preenchido com uma data igual ou anterior à data final " |
94 | -"do assunto" | |
78 | +"do assunto.(\"%s\")" | |
95 | 79 | |
96 | -#: pendencies/models.py:8 | |
80 | +#: models.py:8 | |
97 | 81 | msgid "Action" |
98 | 82 | msgstr "Ação" |
99 | 83 | |
100 | -#: pendencies/models.py:8 | |
84 | +#: models.py:8 | |
101 | 85 | msgid "Visualize" |
102 | 86 | msgstr "Visualizar" |
103 | 87 | |
104 | -#: pendencies/models.py:8 | |
88 | +#: models.py:8 | |
105 | 89 | msgid "Create" |
106 | 90 | msgstr "Criar" |
107 | 91 | |
108 | -#: pendencies/models.py:8 | |
92 | +#: models.py:8 | |
109 | 93 | msgid "Answer" |
110 | 94 | msgstr "Responder" |
111 | 95 | |
112 | -#: pendencies/models.py:8 | |
96 | +#: models.py:8 | |
113 | 97 | msgid "Access" |
114 | 98 | msgstr "Acessar" |
115 | 99 | |
116 | -#: pendencies/models.py:8 | |
100 | +#: models.py:8 | |
117 | 101 | msgid "Participate" |
118 | -msgstr "" | |
102 | +msgstr "Participar" | |
119 | 103 | |
120 | -#: pendencies/models.py:8 | |
104 | +#: models.py:8 | |
121 | 105 | msgid "Finish" |
122 | -msgstr "" | |
106 | +msgstr "Fim" | |
123 | 107 | |
124 | -#: pendencies/models.py:8 | |
108 | +#: models.py:8 | |
125 | 109 | msgid "Submit" |
126 | -msgstr "" | |
110 | +msgstr "Enviar" | |
127 | 111 | |
128 | -#: pendencies/models.py:9 | |
112 | +#: models.py:9 | |
129 | 113 | msgid "Begin Date" |
130 | 114 | msgstr "Data Inicial" |
131 | 115 | |
132 | -#: pendencies/models.py:10 | |
116 | +#: models.py:10 | |
133 | 117 | msgid "End Date" |
134 | 118 | msgstr "Data Final" |
135 | 119 | |
136 | -#: pendencies/models.py:11 | |
120 | +#: models.py:11 | |
137 | 121 | msgid "Limit Date" |
138 | 122 | msgstr "Data Limite" |
139 | 123 | |
140 | -#: pendencies/models.py:12 | |
124 | +#: models.py:12 | |
141 | 125 | msgid "Resource" |
142 | 126 | msgstr "Recurso" | ... | ... |