Added help to image crop form
authorThierry Florac <thierry.florac@onf.fr>
Tue, 27 Dec 2016 15:40:04 +0100
changeset 33 bd1f5624dce8
parent 32 57b52bddde7f
child 34 47dd5b37fab5
Added help to image crop form
src/pyams_file/locales/fr/LC_MESSAGES/pyams_file.mo
src/pyams_file/locales/fr/LC_MESSAGES/pyams_file.po
src/pyams_file/locales/pyams_file.pot
src/pyams_file/zmi/image.py
Binary file src/pyams_file/locales/fr/LC_MESSAGES/pyams_file.mo has changed
--- a/src/pyams_file/locales/fr/LC_MESSAGES/pyams_file.po	Tue Dec 27 15:39:36 2016 +0100
+++ b/src/pyams_file/locales/fr/LC_MESSAGES/pyams_file.po	Tue Dec 27 15:40:04 2016 +0100
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2016-11-14 17:49+0100\n"
+"POT-Creation-Date: 2016-12-27 15:27+0100\n"
 "PO-Revision-Date: 2015-02-06 21:39+0100\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French\n"
@@ -88,56 +88,70 @@
 msgid "Crop image"
 msgstr "Recadrer l'image"
 
-#: src/pyams_file/zmi/image.py:245
+#: src/pyams_file/zmi/image.py:227
+msgid ""
+"You can use this form to crop an image.\n"
+"\n"
+"**WARNING**: cropping an image will reset all selected thumbnails and "
+"adaptive images!!"
+msgstr ""
+"Vous pouvez utiliser ce formulaire pour recadrer une image. L'image sera redimensionnée sur la base "
+"du nouveau cadre sélectionné.\n"
+"\n"
+"**ATTENTION** : lorsque vous recadrez une image, toutes les vignettes ou images adaptatives sélectionnées au "
+"préalable sont réinitialisées !!"
+
+#: src/pyams_file/zmi/image.py:255
 msgid "Select square thumbnail..."
 msgstr "Vignette carrée..."
 
-#: src/pyams_file/zmi/image.py:256
+#: src/pyams_file/zmi/image.py:266
 msgid "Select square thumbnail"
 msgstr "Sélection de l'emprise d'une vignette carrée"
 
-#: src/pyams_file/zmi/image.py:309
+#: src/pyams_file/zmi/image.py:319
 msgid "Select panoramic thumbnail..."
 msgstr "Vignette panoramique..."
 
-#: src/pyams_file/zmi/image.py:320
+#: src/pyams_file/zmi/image.py:330
 msgid "Select panoramic thumbnail"
 msgstr "Sélection de l'emprise d'une vignette panoramique"
 
-#: src/pyams_file/zmi/image.py:432
+#: src/pyams_file/zmi/image.py:442
 msgid "Select responsive XS image..."
 msgstr "Image adaptative pour très petits terminaux (XS)..."
 
-#: src/pyams_file/zmi/image.py:444
+#: src/pyams_file/zmi/image.py:454
 msgid "Select image for extra-small (XS) devices"
-msgstr "Sélectionner l'image affichée sur les très petits terminaux (taille XS)"
+msgstr ""
+"Sélectionner l'image affichée sur les très petits terminaux (taille XS)"
 
-#: src/pyams_file/zmi/image.py:466
+#: src/pyams_file/zmi/image.py:476
 msgid "Select responsive SM image..."
 msgstr "Image adaptative pour petits terminaux (SM)..."
 
-#: src/pyams_file/zmi/image.py:478
+#: src/pyams_file/zmi/image.py:488
 msgid "Select image for small (SM) devices"
 msgstr "Sélectionner l'image affichée sur les petits terminaux (taille SM)"
 
-#: src/pyams_file/zmi/image.py:500
+#: src/pyams_file/zmi/image.py:510
 msgid "Select responsive MD image..."
 msgstr "Image adaptative pour terminaux moyens (MD)..."
 
-#: src/pyams_file/zmi/image.py:512
+#: src/pyams_file/zmi/image.py:522
 msgid "Select image for medium (MD) devices"
 msgstr "Sélectionner l'image affichée sur les terminaux moyens (taille MD)"
 
-#: src/pyams_file/zmi/image.py:534
+#: src/pyams_file/zmi/image.py:544
 msgid "Select responsive LG image..."
 msgstr "Image adaptative pour grands terminaux (LG)..."
 
-#: src/pyams_file/zmi/image.py:546
+#: src/pyams_file/zmi/image.py:556
 msgid "Select image for large (LG) devices"
 msgstr "Sélectionner l'image affichée sur les grands terminaux (taille LG)"
 
 #: src/pyams_file/zmi/image.py:71 src/pyams_file/zmi/image.py:171
-#: src/pyams_file/zmi/image.py:236 src/pyams_file/zmi/image.py:377
+#: src/pyams_file/zmi/image.py:246 src/pyams_file/zmi/image.py:387
 msgid "Close"
 msgstr "Fermer"
 
@@ -166,11 +180,11 @@
 msgid "Crop"
 msgstr "Recadrer l'image"
 
-#: src/pyams_file/zmi/image.py:237
+#: src/pyams_file/zmi/image.py:247
 msgid "Select thumbnail"
 msgstr "Sélectionner cette vignette"
 
-#: src/pyams_file/zmi/image.py:378
+#: src/pyams_file/zmi/image.py:388
 msgid "Select image"
 msgstr "Sélectionner l'image"
 
--- a/src/pyams_file/locales/pyams_file.pot	Tue Dec 27 15:39:36 2016 +0100
+++ b/src/pyams_file/locales/pyams_file.pot	Tue Dec 27 15:40:04 2016 +0100
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2016-11-14 17:49+0100\n"
+"POT-Creation-Date: 2016-12-27 15:27+0100\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"
@@ -83,56 +83,63 @@
 msgid "Crop image"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:245
+#: ./src/pyams_file/zmi/image.py:227
+msgid ""
+"You can use this form to crop an image.\n"
+"\n"
+"**WARNING**: cropping an image will reset all selected thumbnails and adaptive images!!"
+msgstr ""
+
+#: ./src/pyams_file/zmi/image.py:255
 msgid "Select square thumbnail..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:256
+#: ./src/pyams_file/zmi/image.py:266
 msgid "Select square thumbnail"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:309
+#: ./src/pyams_file/zmi/image.py:319
 msgid "Select panoramic thumbnail..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:320
+#: ./src/pyams_file/zmi/image.py:330
 msgid "Select panoramic thumbnail"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:432
+#: ./src/pyams_file/zmi/image.py:442
 msgid "Select responsive XS image..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:444
+#: ./src/pyams_file/zmi/image.py:454
 msgid "Select image for extra-small (XS) devices"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:466
+#: ./src/pyams_file/zmi/image.py:476
 msgid "Select responsive SM image..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:478
+#: ./src/pyams_file/zmi/image.py:488
 msgid "Select image for small (SM) devices"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:500
+#: ./src/pyams_file/zmi/image.py:510
 msgid "Select responsive MD image..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:512
+#: ./src/pyams_file/zmi/image.py:522
 msgid "Select image for medium (MD) devices"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:534
+#: ./src/pyams_file/zmi/image.py:544
 msgid "Select responsive LG image..."
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:546
+#: ./src/pyams_file/zmi/image.py:556
 msgid "Select image for large (LG) devices"
 msgstr ""
 
 #: ./src/pyams_file/zmi/image.py:71 ./src/pyams_file/zmi/image.py:171
-#: ./src/pyams_file/zmi/image.py:236 ./src/pyams_file/zmi/image.py:377
+#: ./src/pyams_file/zmi/image.py:246 ./src/pyams_file/zmi/image.py:387
 msgid "Close"
 msgstr ""
 
@@ -158,11 +165,11 @@
 msgid "Crop"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:237
+#: ./src/pyams_file/zmi/image.py:247
 msgid "Select thumbnail"
 msgstr ""
 
-#: ./src/pyams_file/zmi/image.py:378
+#: ./src/pyams_file/zmi/image.py:388
 msgid "Select image"
 msgstr ""
 
--- a/src/pyams_file/zmi/image.py	Tue Dec 27 15:39:36 2016 +0100
+++ b/src/pyams_file/zmi/image.py	Tue Dec 27 15:40:04 2016 +0100
@@ -220,6 +220,16 @@
     """Image crop viewlets prefix"""
 
 
+@adapter_config(context=(IImage, IAdminLayer, ImageCropForm), provides=IFormHelp)
+class ImageCropFormHelpAdapter(FormHelp):
+    """Image crop form help adapter"""
+
+    message = _("""You can use this form to crop an image.
+
+**WARNING**: cropping an image will reset all selected thumbnails and adaptive images!!""")
+    message_format = 'rest'
+
+
 #
 # Image square thumbnail selection
 #