Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
intranet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nounous-archives
intranet
Commits
1cab3f35
Commit
1cab3f35
authored
Nov 17, 2017
by
Hamza Dely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[impressions] Précise les erreurs sur les PDF
parent
1d5d1e9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
99 deletions
+127
-99
impressions/forms.py
impressions/forms.py
+3
-1
impressions/locale/en/LC_MESSAGES/django.po
impressions/locale/en/LC_MESSAGES/django.po
+41
-33
impressions/locale/es/LC_MESSAGES/django.po
impressions/locale/es/LC_MESSAGES/django.po
+40
-32
impressions/locale/fr/LC_MESSAGES/django.po
impressions/locale/fr/LC_MESSAGES/django.po
+39
-32
impressions/views.py
impressions/views.py
+4
-1
No files found.
impressions/forms.py
View file @
1cab3f35
...
...
@@ -79,7 +79,9 @@ class UploadForm(forms.Form):
pageno
=
int
(
infos
[
"Pages"
])
out
[
"pageno"
]
=
pageno
except
(
KeyError
,
ValueError
)
as
e
:
raise
forms
.
ValidationError
(
_
(
u
"Impossible de récupérer les informations sur le fichier PDF."
)
)
raise
forms
.
ValidationError
(
_
(
u
"Impossible de récupérer les informations sur le fichier PDF %(filename)s."
)
%
{
'filename'
:
filename
}
)
else
:
print
(
"toto"
)
raise
forms
.
ValidationError
(
u
"Merci d'indiquer un fichier à imprimer"
)
...
...
impressions/locale/en/LC_MESSAGES/django.po
View file @
1cab3f35
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-
07-13 19:45+02
00\n"
"POT-Creation-Date: 2017-
11-17 10:23+01
00\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"
...
...
@@ -18,11 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: forms.py:4
6
templates/impressions/print.html:12
#: forms.py:4
4
templates/impressions/print.html:12
msgid "Fichier à imprimer"
msgstr "File to print"
#: forms.py:7
3
#: forms.py:7
1
#, fuzzy, python-format
#| msgid ""
#| "Fichier trop volumineux, le maximum est de %(max)s octets (actuellement "
...
...
@@ -33,14 +33,17 @@ msgid ""
msgstr ""
"The file is too large. It is of size %(size)s bytes where maximum is%(max)s"
#: forms.py:7
9
#: forms.py:7
7
#, python-format
msgid "Votre fichier %s n'est pas un fichier PDF."
msgstr "Your file %s is not a PDF file."
#: forms.py:84
msgid "Impossible de récupérer les informations sur le fichier PDF."
msgstr "Cannot get PDF information."
#: forms.py:83
#, fuzzy, python-format
#| msgid "Impossible de récupérer les informations sur le fichier PDF."
msgid ""
"Impossible de récupérer les informations sur le fichier PDF %(filename)s."
msgstr "Cannot get PDF information for file %(filename)s."
#: forms.py:93
msgid "Couleur ou N&B"
...
...
@@ -74,67 +77,67 @@ msgstr "Booklet"
msgid "Format du papier"
msgstr "Paper format"
#: forms.py:10
2
#: forms.py:10
3
msgid "Agrafes"
msgstr "Stapling"
#: forms.py:10
4 forms.py:116
#: forms.py:10
5 forms.py:117
msgid "Aucune"
msgstr "None"
#: forms.py:10
5
#: forms.py:10
6
msgid "une en haut à gauche"
msgstr "One top left"
#: forms.py:10
6
#: forms.py:10
7
msgid "une en haut à droite"
msgstr "One top right"
#: forms.py:1
09
#: forms.py:1
10
msgid "deux sur le bord gauche"
msgstr "Two left sided"
#: forms.py:11
0
#: forms.py:11
1
msgid "deux sur le bord droit"
msgstr "Two right sided"
#: forms.py:11
7
#: forms.py:11
8
msgid "2 trous à gauche"
msgstr "Two left sided holes"
#: forms.py:11
8
#: forms.py:11
9
msgid "2 trous à droite"
msgstr "Two right sided holes"
#: forms.py:1
19
#: forms.py:1
20
msgid "2 trous en haut"
msgstr "Two top holes"
#: forms.py:12
0
#: forms.py:12
1
msgid "2 trous en bas"
msgstr "Two bottom holes"
#: forms.py:12
4
#: forms.py:12
5
msgid "4 trous à gauche"
msgstr "4 left sided holes"
#: forms.py:12
5
#: forms.py:12
6
msgid "4 trous à droite"
msgstr "4 right sided holes"
#: forms.py:1
29
#: forms.py:1
30
msgid "Nombre de copies"
msgstr "Copy count"
#: forms.py:14
6
#: forms.py:14
7
msgid "Imprimer pour"
msgstr "Printing account"
#: forms.py:17
2
#: forms.py:17
3
msgid "Merci de donner au moins un fichier à imprimer"
msgstr "Please, provide at least one file to print"
#: forms.py:17
8
#: forms.py:17
9
msgid "Les fichiers doivent avoir des noms différents."
msgstr "Files must have different names."
...
...
@@ -362,11 +365,16 @@ msgstr "Current balance"
msgid "Imprimer"
msgstr "Print"
#: views.py:275
#: views.py:257
#, python-format
msgid "Le fichier %(filename)s ne semble pas être un PDF"
msgstr "%(filename)s is not a PDF file"
#: views.py:283
msgid "Solde insuffisant pour effectuer l'impression"
msgstr "Insufficient credit for printing"
#: views.py:28
0
#: views.py:28
8
#, fuzzy
#| msgid ""
#| "Votre fichier a bien été envoyé à l'impression \n"
...
...
@@ -381,36 +389,36 @@ msgstr ""
"The code for building J entrance is B7806.\n"
"A code to enter the printing room has been generated: "
#: views.py:2
83 views.py:285
#: views.py:2
91 views.py:293
msgid "Formulaire non pris en charge."
msgstr "Unsupported form."
#: views.py:3
79
#: views.py:3
87
#, python-format
msgid "La tâche %s a été annulée."
msgstr "Job %s has been cancelled."
#: views.py:4
02
#: views.py:4
10
msgid "Cette tâche n'est plus dans la file d'attente du serveur."
msgstr "No job in the queue"
#: views.py:4
09
#: views.py:4
17
msgid ""
"Vous n'êtes pas le propriétaire de cette tâche, vous ne pouvez pas l'annuler."
msgstr "You are not the owner of this job, you cannot cancel it."
#: views.py:4
12 views.py:434
#: views.py:4
20 views.py:442
msgid "Tâche introuvable, impossible de recréditer"
msgstr "Cannot find job, refund is not possible."
#: views.py:4
15
#: views.py:4
23
msgid "Impossible de recréditer la tâche"
msgstr "Cannot refund the job."
#: views.py:4
26
#: views.py:4
34
msgid "Action impossible, jid introuvable"
msgstr "Unavailable, cannot find jid."
#: views.py:43
1
#: views.py:43
9
msgid "Droits imprimeurs requis"
msgstr "Imprimeur rights required."
impressions/locale/es/LC_MESSAGES/django.po
View file @
1cab3f35
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-
07-13 19:45+02
00\n"
"POT-Creation-Date: 2017-
11-17 10:23+01
00\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"
...
...
@@ -18,11 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: forms.py:4
6
templates/impressions/print.html:12
#: forms.py:4
4
templates/impressions/print.html:12
msgid "Fichier à imprimer"
msgstr "Archivo listo para imprimir"
#: forms.py:7
3
#: forms.py:7
1
#, python-format
msgid ""
"Fichier trop volumineux, le maximum est de %(max) octets (actuellement "
...
...
@@ -31,13 +31,16 @@ msgstr ""
"Archivo demasiado grande, el máximo es de %(max) octetos (ahora es de "
"%(size)s octetos)"
#: forms.py:7
9
#: forms.py:7
7
#, python-format
msgid "Votre fichier %s n'est pas un fichier PDF."
msgstr "Su archivo %s no es un archivo PDF."
#: forms.py:84
msgid "Impossible de récupérer les informations sur le fichier PDF."
#: forms.py:83
#, fuzzy, python-format
#| msgid "Impossible de récupérer les informations sur le fichier PDF."
msgid ""
"Impossible de récupérer les informations sur le fichier PDF %(filename)s."
msgstr "Es imposible encontrar las informaciones en el archivo PDF."
#: forms.py:93
...
...
@@ -72,67 +75,67 @@ msgstr "Libreta"
msgid "Format du papier"
msgstr "Formato del papel"
#: forms.py:10
2
#: forms.py:10
3
msgid "Agrafes"
msgstr "Grapas"
#: forms.py:10
4 forms.py:116
#: forms.py:10
5 forms.py:117
msgid "Aucune"
msgstr "Ninguna"
#: forms.py:10
5
#: forms.py:10
6
msgid "une en haut à gauche"
msgstr "Una, esquina superior izquierda"
#: forms.py:10
6
#: forms.py:10
7
msgid "une en haut à droite"
msgstr "Una, esquina superior derecha"
#: forms.py:1
09
#: forms.py:1
10
msgid "deux sur le bord gauche"
msgstr "Dos, lado izquierdo"
#: forms.py:11
0
#: forms.py:11
1
msgid "deux sur le bord droit"
msgstr "Dos, lado derecho"
#: forms.py:11
7
#: forms.py:11
8
msgid "2 trous à gauche"
msgstr "Dos agujeros, lado izquierdo"
#: forms.py:11
8
#: forms.py:11
9
msgid "2 trous à droite"
msgstr "Dos agujeros, lado derecho"
#: forms.py:1
19
#: forms.py:1
20
msgid "2 trous en haut"
msgstr "Dos agujeros, lado superior"
#: forms.py:12
0
#: forms.py:12
1
msgid "2 trous en bas"
msgstr "Dos agujeros, lado inferior"
#: forms.py:12
4
#: forms.py:12
5
msgid "4 trous à gauche"
msgstr "Cuatro agujeros, lado izquierdo"
#: forms.py:12
5
#: forms.py:12
6
msgid "4 trous à droite"
msgstr "Cuatro agujeros, lado derecho"
#: forms.py:1
29
#: forms.py:1
30
msgid "Nombre de copies"
msgstr "Número de copias"
#: forms.py:14
6
#: forms.py:14
7
msgid "Imprimer pour"
msgstr "Imprimir para"
#: forms.py:17
2
#: forms.py:17
3
msgid "Merci de donner au moins un fichier à imprimer"
msgstr "Por favor proporcione minimo un archivo"
#: forms.py:17
8
#: forms.py:17
9
msgid "Les fichiers doivent avoir des noms différents."
msgstr "Los archivos deben tener diferentes nombres."
...
...
@@ -350,11 +353,16 @@ msgstr "Resultado de la cuenta"
msgid "Imprimer"
msgstr "Imprimir"
#: views.py:275
#: views.py:257
#, python-format
msgid "Le fichier %(filename)s ne semble pas être un PDF"
msgstr ""
#: views.py:283
msgid "Solde insuffisant pour effectuer l'impression"
msgstr "Sueldo demasiado bajo para realizar la impresión"
#: views.py:28
0
#: views.py:28
8
#, fuzzy
#| msgid ""
#| "Votre fichier a bien été envoyé à l'impression \n"
...
...
@@ -369,37 +377,37 @@ msgstr ""
" El código para entrar en el edificio J es B7806 \n"
" Se generó un código para entrar en el local de la impresora:"
#: views.py:2
83 views.py:285
#: views.py:2
91 views.py:293
msgid "Formulaire non pris en charge."
msgstr "Formulario no compatible."
#: views.py:3
79
#: views.py:3
87
#, python-format
msgid "La tâche %s a été annulée."
msgstr "Se canceló la tarea %s."
#: views.py:4
02
#: views.py:4
10
msgid "Cette tâche n'est plus dans la file d'attente du serveur."
msgstr ""
"Esa tarea ya no se encuentra en la lista de tareas pendientes del servidor."
#: views.py:4
09
#: views.py:4
17
msgid ""
"Vous n'êtes pas le propriétaire de cette tâche, vous ne pouvez pas l'annuler."
msgstr "No es el propietario de esa tarea, no puede cancelarla."
#: views.py:4
12 views.py:434
#: views.py:4
20 views.py:442
msgid "Tâche introuvable, impossible de recréditer"
msgstr "Tarea inencontrable, imposible abonar el sueldo"
#: views.py:4
15
#: views.py:4
23
msgid "Impossible de recréditer la tâche"
msgstr "Imposible abonar la tarea"
#: views.py:4
26
#: views.py:4
34
msgid "Action impossible, jid introuvable"
msgstr "Acción imposible, jid inencontrable"
#: views.py:43
1
#: views.py:43
9
msgid "Droits imprimeurs requis"
msgstr "Se necesitan los derechos de impresor"
impressions/locale/fr/LC_MESSAGES/django.po
View file @
1cab3f35
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-
07-13 19:45+02
00\n"
"POT-Creation-Date: 2017-
11-17 10:23+01
00\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"
...
...
@@ -18,24 +18,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: forms.py:4
6
templates/impressions/print.html:12
#: forms.py:4
4
templates/impressions/print.html:12
msgid "Fichier à imprimer"
msgstr ""
#: forms.py:7
3
#: forms.py:7
1
#, python-format
msgid ""
"Fichier trop volumineux, le maximum est de %(max) octets (actuellement "
"%(size)s octets)"
msgstr ""
#: forms.py:7
9
#: forms.py:7
7
#, python-format
msgid "Votre fichier %s n'est pas un fichier PDF."
msgstr ""
#: forms.py:84
msgid "Impossible de récupérer les informations sur le fichier PDF."
#: forms.py:83
#, python-format
msgid ""
"Impossible de récupérer les informations sur le fichier PDF %(filename)s."
msgstr ""
#: forms.py:93
...
...
@@ -70,67 +72,67 @@ msgstr ""
msgid "Format du papier"
msgstr ""
#: forms.py:10
2
#: forms.py:10
3
msgid "Agrafes"
msgstr ""
#: forms.py:10
4 forms.py:116
#: forms.py:10
5 forms.py:117
msgid "Aucune"
msgstr ""
#: forms.py:10
5
#: forms.py:10
6
msgid "une en haut à gauche"
msgstr ""
#: forms.py:10
6
#: forms.py:10
7
msgid "une en haut à droite"
msgstr ""
#: forms.py:1
09
#: forms.py:1
10
msgid "deux sur le bord gauche"
msgstr ""
#: forms.py:11
0
#: forms.py:11
1
msgid "deux sur le bord droit"
msgstr ""
#: forms.py:11
7
#: forms.py:11
8
msgid "2 trous à gauche"
msgstr ""
#: forms.py:11
8
#: forms.py:11
9
msgid "2 trous à droite"
msgstr ""
#: forms.py:1
19
#: forms.py:1
20
msgid "2 trous en haut"
msgstr ""
#: forms.py:12
0
#: forms.py:12
1
msgid "2 trous en bas"
msgstr ""
#: forms.py:12
4
#: forms.py:12
5
msgid "4 trous à gauche"
msgstr ""
#: forms.py:12
5
#: forms.py:12
6
msgid "4 trous à droite"
msgstr ""
#: forms.py:1
29
#: forms.py:1
30
msgid "Nombre de copies"
msgstr ""
#: forms.py:14
6
#: forms.py:14
7
msgid "Imprimer pour"
msgstr ""
#: forms.py:17
2
#: forms.py:17
3
msgid "Merci de donner au moins un fichier à imprimer"
msgstr ""
#: forms.py:17
8
#: forms.py:17
9
msgid "Les fichiers doivent avoir des noms différents."
msgstr ""
...
...
@@ -346,47 +348,52 @@ msgstr ""
msgid "Imprimer"
msgstr ""
#: views.py:275
#: views.py:257
#, python-format
msgid "Le fichier %(filename)s ne semble pas être un PDF"
msgstr ""
#: views.py:283
msgid "Solde insuffisant pour effectuer l'impression"
msgstr ""
#: views.py:28
0
#: views.py:28
8
msgid ""
"Votre fichier a bien été envoyé à l'impression \n"
" Le code pour entrer dans le batiment J est B7806 \n"
" Un code pour entrer dans le local impression (4 ème étage) a été généré : "
msgstr ""
#: views.py:2
83 views.py:285
#: views.py:2
91 views.py:293
msgid "Formulaire non pris en charge."
msgstr ""
#: views.py:3
79
#: views.py:3
87
#, python-format
msgid "La tâche %s a été annulée."
msgstr ""
#: views.py:4
02
#: views.py:4
10
msgid "Cette tâche n'est plus dans la file d'attente du serveur."
msgstr ""
#: views.py:4
09
#: views.py:4
17
msgid ""
"Vous n'êtes pas le propriétaire de cette tâche, vous ne pouvez pas l'annuler."
msgstr ""
#: views.py:4
12 views.py:434
#: views.py:4
20 views.py:442
msgid "Tâche introuvable, impossible de recréditer"
msgstr ""
#: views.py:4
15
#: views.py:4
23
msgid "Impossible de recréditer la tâche"
msgstr ""
#: views.py:4
26
#: views.py:4
34
msgid "Action impossible, jid introuvable"
msgstr ""
#: views.py:43
1
#: views.py:43
9
msgid "Droits imprimeurs requis"
msgstr ""
impressions/views.py
View file @
1cab3f35
...
...
@@ -252,7 +252,10 @@ def view(request):
try
:
jobs
.
append
(
impression
(
get_storage_path
(
login_used
,
filename
),
adh
=
login_used
))
except
FichierInvalide
:
messages
.
error
(
request
,
_
(
u
"Le fichier ne semble pas être un PDF"
))
messages
.
error
(
request
,
_
(
u
"Le fichier %(filename)s ne semble pas être un PDF"
)
%
{
'filename'
:
filename
}
)
return
django
.
shortcuts
.
redirect
(
"/impressions/"
)
# On met à jour les options et on envoie
jobs
[
-
1
].
changeSettings
(
papier
=
format
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment