From 11638139a24361b78e0f85f75a78c360545a2338 Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Tue, 20 Aug 2024 11:39:04 +0200 Subject: [PATCH] Fix translation issues and move style to a proper class --- config/settings.py | 4 ++-- locale/fr/LC_MESSAGES/django.mo | Bin 1016 -> 1151 bytes locale/fr/LC_MESSAGES/django.po | 16 ++++++++++------ pyproject.toml | 2 +- static/css/style.css | 2 +- static/css/style.sass | 5 +++++ templates/blocks/footer.html | 9 ++++++++- 7 files changed, 27 insertions(+), 11 deletions(-) diff --git a/config/settings.py b/config/settings.py index 1853110f..03b410c7 100644 --- a/config/settings.py +++ b/config/settings.py @@ -189,8 +189,6 @@ def show_toolbar(request): USE_I18N = True -USE_L10N = True - USE_TZ = True WAGTAIL_I18N_ENABLED = True @@ -200,6 +198,8 @@ def show_toolbar(request): ("fr", "French"), ] +LOCALE_PATHS = ["locale"] + # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/5.0/howto/static-files/ STORAGES = {} diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index e322a55ba3381186345bfcbfe65f87e0bae0ce5a..988f808b8070a9ec72ee49ca871db086f1df08d5 100644 GIT binary patch delta 460 zcmXxfJxIeq6u|LI8|{Z5XhpG9;Y0)lg|?uG=p;p*y10o*v{xFasWeIBWEUrK5Q3AN zo8s2ht>En9>Z*%42@Zn(udNSWes?dI_b%VD-+1#iWnK$nn4BUn$uaVW)Uj;{F^W4l zk9*jM=Qx5FDDegp_}KFaP4>^2!WZnvcU-_vT`F!dK+WxKTu!(3-v&gM+Os^#5r8VEDqp4j-!o+*yFH%Ub)2F-H&f5_o-6N!jBQn#+J_T7Otw46rEv76mqr+eFIE7h&&!!HrC9h(3E diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 4382bfa6..07ca917a 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-17 17:54+0200\n" -"PO-Revision-Date: 2024-06-26 17:57+0200\n" +"POT-Creation-Date: 2024-08-20 11:23+0200\n" +"PO-Revision-Date: 2024-08-20 11:25+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -45,9 +45,13 @@ msgstr "Retourner à l’accueil" msgid "Display settings" msgstr "Paramètres d’affichage" -#: templates/blocks/footer.html:55 -msgid "Ce site a été fait avec" -msgstr "Ce site a été fait avec" +#: templates/blocks/footer.html:56 +msgid "Opens a new window" +msgstr "Ouvre une nouvelle fenêtre" + +#: templates/blocks/footer.html:58 +msgid "This website is made with" +msgstr "Ce site est fait avec" #: templates/blocks/header.html:5 templates/blocks/header.html:13 msgid "Home page" @@ -67,4 +71,4 @@ msgstr "Menu" #: templates/blocks/header.html:106 msgid "Main menu" -msgstr "Menu principal" \ No newline at end of file +msgstr "Menu principal" diff --git a/pyproject.toml b/pyproject.toml index 96ce3c78..24782fec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ extend-exclude = ''' [tool.djlint] max_blank_lines = 1 -ignore = "H030,H031,H006" +ignore = "H030,H031,H006,D018" indent = 2 [tool.pyright] diff --git a/static/css/style.css b/static/css/style.css index 134a961c..b488637c 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1 +1 @@ -.cmsfr-hero{background-size:cover;background-position:center;background-repeat:no-repeat}.cmsfr-hero-large{display:flex;justify-content:center;align-items:center;text-align:center}.cmsfr-background-dark h1,.cmsfr-background-dark p,.cmsfr-background-dark ul{color:white}:root[data-fr-theme=light] .cmsfr-background-dark .fr-btn--secondary{background-color:rgba(255,255,255,0.3)}.fr-header__service-title em{font-weight:lighter}.cmsfr-author_card__header{flex:0 0 6rem !important;width:6rem !important}.cmsfr-author-img{border-radius:50%;height:4.5rem !important;margin:1.5rem;width:4.5rem} +.cmsfr-hero{background-size:cover;background-position:center;background-repeat:no-repeat}.cmsfr-hero-large{display:flex;justify-content:center;align-items:center;text-align:center}.cmsfr-background-dark h1,.cmsfr-background-dark p,.cmsfr-background-dark ul{color:white}:root[data-fr-theme=light] .cmsfr-background-dark .fr-btn--secondary{background-color:rgba(255,255,255,0.3)}.fr-header__service-title em{font-weight:lighter}.cmsfr-author_card__header{flex:0 0 6rem !important;width:6rem !important}.cmsfr-author-img{border-radius:50%;height:4.5rem !important;margin:1.5rem;width:4.5rem}.cmsfr-footer__bottom-extra{border-left:1px solid var(--border-default-grey);padding-left:1em;margin-left:1em} diff --git a/static/css/style.sass b/static/css/style.sass index a9ed0b59..e60b5f24 100644 --- a/static/css/style.sass +++ b/static/css/style.sass @@ -31,3 +31,8 @@ height: 4.5rem !important margin: 1.5rem width: 4.5rem + +.cmsfr-footer__bottom-extra + border-left: 1px solid var(--border-default-grey) + padding-left: 1em + margin-left: 1em diff --git a/templates/blocks/footer.html b/templates/blocks/footer.html index 0552b505..69a936b8 100644 --- a/templates/blocks/footer.html +++ b/templates/blocks/footer.html @@ -51,6 +51,13 @@ {% endif %} {% endblock footer_links %} + {% block footer_bottom_extra %} -| {% translate "Ce site a été fait avec" %} Sites faciles + {% translate "Opens a new window" as new_window %} + + {% translate "This website is made with" %} Sites faciles + {% endblock footer_bottom_extra %}