From 61d33e6efce3164c717182c8143b110969c3f55a Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Tue, 10 Dec 2024 13:44:27 +0100 Subject: [PATCH] Rephrase some sentences for UX --- lizmap/dialogs/confirmation_text_box.py | 4 ++-- lizmap/forms/layout_edition.py | 9 +++++++++ lizmap/resources/ui/ui_form_layout.ui | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lizmap/dialogs/confirmation_text_box.py b/lizmap/dialogs/confirmation_text_box.py index bbf92e61..396abc66 100644 --- a/lizmap/dialogs/confirmation_text_box.py +++ b/lizmap/dialogs/confirmation_text_box.py @@ -49,12 +49,12 @@ def __init__(self, number: int, confirmation_text: str, *__args): message += " " + tr("{count} error(s)").format(count=number) message += "

" message += tr( - 'You should really consider fixing these "Important" issues to avoid technical problems ' + 'You should really consider fixing these "important" issues to avoid technical problems ' 'on Lizmap later.' ) message += "

" message += tr( - 'You can decide to skip fixing these "Important" issues but you must write the name of the project with ' + 'You can decide to skip fixing these "important" issues but you must write the name of the project with ' 'the number of error in the input text below so as to generate the Lizmap configuration file.' ) message += "

" diff --git a/lizmap/forms/layout_edition.py b/lizmap/forms/layout_edition.py index 07dc2d8e..ab5c0496 100755 --- a/lizmap/forms/layout_edition.py +++ b/lizmap/forms/layout_edition.py @@ -3,6 +3,7 @@ from qgis.gui import QgsFileWidget from qgis.PyQt.QtCore import Qt from qgis.PyQt.QtGui import QIcon +from qgis.PyQt.QtWidgets import QLabel from lizmap.definitions.definitions import LwcVersions from lizmap.definitions.layouts import Dpi, FormatType, LayoutsDefinitions @@ -24,6 +25,8 @@ def __init__(self, parent=None, unicity=None, lwc_version: LwcVersions = None): super().__init__(parent, unicity, lwc_version) self.setupUi(self) self.parent = parent + self.layout_type: QLabel + self.layout_type.setWordWrap(True) self.config = LayoutsDefinitions() self.config.add_layer_widget('layout', self.layout) self.config.add_layer_widget('enabled', self.enabled) @@ -79,6 +82,12 @@ def post_load_form(self): return is_atlas = atlas_layout.atlas().enabled() + if is_atlas: + msg = tr("The layout is an atlas.") + else: + msg = tr("The layout is not atlas.") + msg += " " + tr("Some features are enabled or not because of this setting.") + self.layout_type.setText(msg) self.icon.setEnabled(is_atlas) self.label_icon.setEnabled(is_atlas) diff --git a/lizmap/resources/ui/ui_form_layout.ui b/lizmap/resources/ui/ui_form_layout.ui index 187b2ea8..b59ad330 100755 --- a/lizmap/resources/ui/ui_form_layout.ui +++ b/lizmap/resources/ui/ui_form_layout.ui @@ -14,6 +14,13 @@ Layout + + + + LAYOUT TYPE + + +