Commit 8789e0c0 authored by Remi Oudin's avatar Remi Oudin

[impressions] Correction d'un bug lorsqu'on validait sans fournir de fichier....

[impressions] Correction d'un bug lorsqu'on validait sans fournir de fichier. Maintenant on retourne un message d'erreur. Versions anglaises et espagnoles du message d'erreur
parent 389f9375
......@@ -82,6 +82,9 @@ class UploadForm(forms.Form):
out["pageno"] = pageno
except (KeyError, ValueError) as e:
raise forms.ValidationError( _(u"Impossible de récupérer les informations sur le fichier PDF.") )
else:
print("toto")
raise forms.ValidationError( u"Merci d'indiquer un fichier à imprimer")
return out
......@@ -164,6 +167,8 @@ class UploadFormSet(BaseFormSet):
if any(self.errors):
return
noms = []
if len(self.forms) == 1 and not self.forms[0].cleaned_data:
raise forms.ValidationError(_(u"Merci de donner au moins un fichier à imprimer"))
for form in self.forms:
if not form.cleaned_data:
continue
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-25 22:52+0200\n"
"POT-Creation-Date: 2016-09-14 23:58+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -23,9 +23,12 @@ msgid "Fichier à imprimer"
msgstr "File to print"
#: forms.py:73
#, python-format
#, fuzzy, python-format
#| msgid ""
#| "Fichier trop volumineux, le maximum est de %(max)s octets (actuellement "
#| "%(size)s octets)"
msgid ""
"Fichier trop volumineux, le maximum est de %(max)s octets (actuellement "
"Fichier trop volumineux, le maximum est de %(max) octets (actuellement "
"%(size)s octets)"
msgstr ""
"The file is too large. It is of size %(size)s bytes where maximum is%(max)s"
......@@ -39,95 +42,99 @@ msgstr "Your file %s is not a PDF file."
msgid "Impossible de récupérer les informations sur le fichier PDF."
msgstr "Cannot get PDF information."
#: forms.py:90
#: forms.py:93
msgid "Couleur ou N&B"
msgstr "Color or Grayscale"
#: forms.py:91
#: forms.py:94
msgid "Noir & Blanc"
msgstr "Grayscale"
#: forms.py:91
#: forms.py:94
msgid "Couleur"
msgstr "Color"
#: forms.py:93
#: forms.py:96
msgid "Disposition"
msgstr "Disposition"
#: forms.py:94
#: forms.py:97
msgid "Recto/Verso"
msgstr "Two sided"
#: forms.py:94
#: forms.py:97
msgid "Recto"
msgstr "One sided"
#: forms.py:94
#: forms.py:97
msgid "Livret"
msgstr "Booklet"
#: forms.py:96
#: forms.py:99
msgid "Format du papier"
msgstr "Paper format"
#: forms.py:99
#: forms.py:102
msgid "Agrafes"
msgstr "Stapling"
#: forms.py:101 forms.py:113
#: forms.py:104 forms.py:116
msgid "Aucune"
msgstr "None"
#: forms.py:102
#: forms.py:105
msgid "une en haut à gauche"
msgstr "One top left"
#: forms.py:103
#: forms.py:106
msgid "une en haut à droite"
msgstr "One top right"
#: forms.py:106
#: forms.py:109
msgid "deux sur le bord gauche"
msgstr "Two left sided"
#: forms.py:107
#: forms.py:110
msgid "deux sur le bord droit"
msgstr "Two right sided"
#: forms.py:114
#: forms.py:117
msgid "2 trous à gauche"
msgstr "Two left sided holes"
#: forms.py:115
#: forms.py:118
msgid "2 trous à droite"
msgstr "Two right sided holes"
#: forms.py:116
#: forms.py:119
msgid "2 trous en haut"
msgstr "Two top holes"
#: forms.py:117
#: forms.py:120
msgid "2 trous en bas"
msgstr "Two bottom holes"
#: forms.py:121
#: forms.py:124
msgid "4 trous à gauche"
msgstr "4 left sided holes"
#: forms.py:122
#: forms.py:125
msgid "4 trous à droite"
msgstr "4 right sided holes"
#: forms.py:126
#: forms.py:129
msgid "Nombre de copies"
msgstr "Copy count"
#: forms.py:143
#: forms.py:146
msgid "Imprimer pour"
msgstr "Printing account"
#: forms.py:172
#: forms.py:171
msgid "Merci de donner au moins un fichier à imprimer"
msgstr "Please, provide at least one file to print"
#: forms.py:177
msgid "Les fichiers doivent avoir des noms différents."
msgstr "Files must have different names."
......@@ -335,4 +342,3 @@ msgstr "Unavailable, cannot find jid."
#: views.py:422
msgid "Droits imprimeurs requis"
msgstr "Imprimeur rights required."
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-25 22:54+0200\n"
"POT-Creation-Date: 2016-09-15 11:01+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -40,95 +40,99 @@ msgstr "Su archivo %s no es un archivo PDF."
msgid "Impossible de récupérer les informations sur le fichier PDF."
msgstr "Es imposible encontrar las informaciones en el archivo PDF."
#: forms.py:90
#: forms.py:93
msgid "Couleur ou N&B"
msgstr "En color o blanco y negro"
#: forms.py:91
#: forms.py:94
msgid "Noir & Blanc"
msgstr "Blanco y negro"
#: forms.py:91
#: forms.py:94
msgid "Couleur"
msgstr "En color"
#: forms.py:93
#: forms.py:96
msgid "Disposition"
msgstr "Disposición"
#: forms.py:94
#: forms.py:97
msgid "Recto/Verso"
msgstr "Doble cara"
#: forms.py:94
#: forms.py:97
msgid "Recto"
msgstr "Simple cara"
#: forms.py:94
#: forms.py:97
msgid "Livret"
msgstr "Libreta"
#: forms.py:96
#: forms.py:99
msgid "Format du papier"
msgstr "Formato del papel"
#: forms.py:99
#: forms.py:102
msgid "Agrafes"
msgstr "Grapas"
#: forms.py:101 forms.py:113
#: forms.py:104 forms.py:116
msgid "Aucune"
msgstr "Ninguna"
#: forms.py:102
#: forms.py:105
msgid "une en haut à gauche"
msgstr "Una, esquina superior izquierda"
#: forms.py:103
#: forms.py:106
msgid "une en haut à droite"
msgstr "Una, esquina superior derecha"
#: forms.py:106
#: forms.py:109
msgid "deux sur le bord gauche"
msgstr "Dos, lado izquierdo"
#: forms.py:107
#: forms.py:110
msgid "deux sur le bord droit"
msgstr "Dos, lado derecho"
#: forms.py:114
#: forms.py:117
msgid "2 trous à gauche"
msgstr "Dos agujeros, lado izquierdo"
#: forms.py:115
#: forms.py:118
msgid "2 trous à droite"
msgstr "Dos agujeros, lado derecho"
#: forms.py:116
#: forms.py:119
msgid "2 trous en haut"
msgstr "Dos agujeros, lado superior"
#: forms.py:117
#: forms.py:120
msgid "2 trous en bas"
msgstr "Dos agujeros, lado inferior"
#: forms.py:121
#: forms.py:124
msgid "4 trous à gauche"
msgstr "Cuatro agujeros, lado izquierdo"
#: forms.py:122
#: forms.py:125
msgid "4 trous à droite"
msgstr "Cuatro agujeros, lado derecho"
#: forms.py:126
#: forms.py:129
msgid "Nombre de copies"
msgstr "Número de copias"
#: forms.py:143
#: forms.py:146
msgid "Imprimer pour"
msgstr "Imprimir para"
#: forms.py:172
#: forms.py:171
msgid "Merci de donner au moins un fichier à imprimer"
msgstr "Por favor proporcione minimo un archivo"
#: forms.py:177
msgid "Les fichiers doivent avoir des noms différents."
msgstr "Los archivos deben tener diferentes nombres."
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-09 13:51+0200\n"
"POT-Creation-Date: 2016-09-14 23:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -38,95 +38,99 @@ msgstr ""
msgid "Impossible de récupérer les informations sur le fichier PDF."
msgstr ""
#: forms.py:90
#: forms.py:93
msgid "Couleur ou N&B"
msgstr ""
#: forms.py:91
#: forms.py:94
msgid "Noir & Blanc"
msgstr ""
#: forms.py:91
#: forms.py:94
msgid "Couleur"
msgstr ""
#: forms.py:93
#: forms.py:96
msgid "Disposition"
msgstr ""
#: forms.py:94
#: forms.py:97
msgid "Recto/Verso"
msgstr ""
#: forms.py:94
#: forms.py:97
msgid "Recto"
msgstr ""
#: forms.py:94
#: forms.py:97
msgid "Livret"
msgstr ""
#: forms.py:96
msgid "Format de papier"
#: forms.py:99
msgid "Format du papier"
msgstr ""
#: forms.py:99
#: forms.py:102
msgid "Agrafes"
msgstr ""
#: forms.py:101 forms.py:113
#: forms.py:104 forms.py:116
msgid "Aucune"
msgstr ""
#: forms.py:102
#: forms.py:105
msgid "une en haut à gauche"
msgstr ""
#: forms.py:103
#: forms.py:106
msgid "une en haut à droite"
msgstr ""
#: forms.py:106
#: forms.py:109
msgid "deux sur le bord gauche"
msgstr ""
#: forms.py:107
#: forms.py:110
msgid "deux sur le bord droit"
msgstr ""
#: forms.py:114
#: forms.py:117
msgid "2 trous à gauche"
msgstr ""
#: forms.py:115
#: forms.py:118
msgid "2 trous à droite"
msgstr ""
#: forms.py:116
#: forms.py:119
msgid "2 trous en haut"
msgstr ""
#: forms.py:117
#: forms.py:120
msgid "2 trous en bas"
msgstr ""
#: forms.py:121
#: forms.py:124
msgid "4 trous à gauche"
msgstr ""
#: forms.py:122
#: forms.py:125
msgid "4 trous à droite"
msgstr ""
#: forms.py:126
#: forms.py:129
msgid "Nombre de copies"
msgstr ""
#: forms.py:143
#: forms.py:146
msgid "Imprimer pour"
msgstr ""
#: forms.py:172
#: forms.py:171
msgid "Merci de donner au moins un fichier à imprimer"
msgstr ""
#: forms.py:177
msgid "Les fichiers doivent avoir des noms différents."
msgstr ""
......@@ -180,7 +184,7 @@ msgid "Bac de papiers"
msgstr ""
#: templates/impressions/imprimante.html:27
msgid "Nombre de page :"
msgid "Nombre de pages :"
msgstr ""
#: templates/impressions/imprimante.html:33
......@@ -218,7 +222,7 @@ msgid "Fichier"
msgstr ""
#: templates/impressions/liste.html:18 templates/impressions/liste.html:27
#: templates/impressions/print.html:78
#: templates/impressions/print.html:77
msgid "Annuler"
msgstr ""
......@@ -262,19 +266,28 @@ msgstr ""
msgid "Retour à l'interface d'impression"
msgstr ""
#: templates/impressions/print.html:9
#, python-format
msgid "Paramètres du fichier n°%(filenum)s"
msgstr ""
#: templates/impressions/print.html:17
msgid "Nombre de pages"
msgstr ""
#: templates/impressions/print.html:70
#: templates/impressions/print.html:62
msgid "Prix :"
msgstr ""
#: templates/impressions/print.html:69
msgid "Prix total"
msgstr ""
#: templates/impressions/print.html:74
#: templates/impressions/print.html:73
msgid "Solde sur le compte"
msgstr ""
#: templates/impressions/print.html:79
#: templates/impressions/print.html:78
msgid "Imprimer"
msgstr ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment