From 50b00993e9d474c7055ed89f68d7a808b236297a Mon Sep 17 00:00:00 2001 From: Fabian Braun <fsbraun@gmx.de> Date: Mon, 15 May 2023 09:34:21 +0200 Subject: [PATCH 1/5] Compile messages --- .../locale/de/LC_MESSAGES/django.mo | Bin 6856 -> 8257 bytes .../locale/nl/LC_MESSAGES/django.mo | Bin 6681 -> 8121 bytes .../locale/nl/LC_MESSAGES/django.po | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_versioning/locale/de/LC_MESSAGES/django.mo b/djangocms_versioning/locale/de/LC_MESSAGES/django.mo index 51edfdce5e864b2546f10f0c4b3dfc3b7e367335..27db87fbc4a114dd544580744f6204144f62d588 100644 GIT binary patch delta 3452 zcmZvce{7vq8OKk%!p7ZLyV|m?+wd^j(r)EK2a~O1*p0hY-8%NGQ&1Ui?>)DD*W34< z@B7}?mcdnK2tq*dg2tE-4TRtyYM>f7g#<D}h$N6`qKU>Ikr)zx5S{*kiJ5-B_r8~H zvXlF~pL5Rpp7T8C`#k5qzWJ5m%J14+o-{Ovt;KSSjQKJwUCx8{)g{JkhmXVc@GW=) zJPWUd>#s28iY8-rLyh-mjJX*ma5MZaTn2v+Tj5{fV)!4}VNAueEH&mDCRRiCG~3`U zFb6lm6YwVZ1Gp8w4Heruc5Q*(P#gBcb#M@V2;KqPU_O1Hq~jAQAFa(-jCqO<Kl5yD z!k7i9NPh~6(7XW^;2)qAXui^z%U};&12;kiGLp{kh5d{Vrt>GD4)#TOJ$x9p!&9&o z|K^Q!;y0RL{4Ugja}ZU{;^p-PE1(>9L!E3GDrE<t6bMqzK&`tUN~wpS6!{A5gipg` z@HDLGgKoU)L>r;TgHR{l0=wZ|>3juBkq4my{1%j>XCPTI--n0cPoR`)B}xUn2`b=y zJi6e~bbh{#{3~Z)XJR${A-oE{32%UZf*WAxih6E`p#r-b%E1>PKl3yXJ~cmrI_Yar z0sb0tNb@!%d*&?E0sjjT*IeF?{)2QnNQkO+H`E6wprkqpCG9uU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--git a/djangocms_versioning/locale/nl/LC_MESSAGES/django.mo b/djangocms_versioning/locale/nl/LC_MESSAGES/django.mo index 0238b9adccf17bffd7bf7a6da2c3f0179abcce9b..a1ffd899b3435bb042b75fdd2779b2c8899e994c 100644 GIT binary patch delta 3431 zcmZ{ke{7vq8OKk%vLAP2?dG;p#^A8ErDbw)V{_dmvbpP~(EWf7WT-3ez4!F?u5aIW zzW2RdIwlta5*;CkbtJe1A^cDie^Nz@At5C44-x+|7)->tC?*=zVKgy<e!lNLWi9AQ zpMK6c@A>gO-{(2^kxkRrHGZ?a?X;me>=LXn&zLX4a6bQNUtVa;weTUh7XAWW4bQ=K zaP1;v7PT0&8)|$YXUry;!p-noa0z@Jw!=Te1@PZ+g)t4&w%C}<ndpL?X|}^HumCs0 zlkgh&J-8K~h4O6;r?$avr~~`q8n^*|0Pcq!u;jm|etgpNfo#5E%%gPpGf!s|#!NwZ z`csI9=4B`ce+#8R>xIT#0DItSxE{)pJ$`-=_A|c8&!2<}>~44!JO!7-pTKtRH!u5% zUu%N#n@}6xfv9R0ENyOB26bUKRAf7#Qg$Ph0+Hu9)V@2Rl=>o+A`ilq@CkSnPQ!*4 zbaSgBS`Rhe02T27?1s1b`396C_dz*$2I`_GAz3lsg@@pCP)fDqr5xS}<?ufKT?~i( z{D}_oube&1L>K%aTm@f&SHs`KE8)sz&D`#Qa_k7y1$ROI%oF@$sreC9q%T1^_!=Zg za~6_4a}FxN|3Jhw^OvLl20AN9h^lor)Pj>xQr!b3?IV8vaj1yD>BrA_PQ$xejCld- zwd_PDDc67-;ghfjz6v{8_cl}@D;tFS5jtBuQ>aLO06ELN2zB8vp(1-7>Y%rvBI@dF z2G9!!7~cv%1RsK%;EPZJ{Szw1??9c`c9Ai?u(6a5XPM0qRm>n%#77`bnqkNua|h(f znn|d2k3vcOeW-QQp0B`b7@vg}c9K_}Hvlh#JD?o89r9`#ra~vrMA)1#XFMN+lJY4i z2hT#~@?TI6ETWP$UJVt|l~6g|1hxKSP_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4&(_X# zM$r#r7M7vrt41ZV19g~pV-7m|?Lf2jGOAS9P+RdE^+G>&RzDN9f*jPA6rvVTf;zM- zkzCAnR7DS>o<D27gsR*PPsco<(Tjl>s0qGe1iLY-GChFGybiUJ!<dQ3QKfE0CHB$! z8*AzNDVq{FhB~xYQHec4{cyF#WdDP_U3*%9dT<45;s|PQPorM=1ohlE)WqR5Z^Fq) z&ZZod;Cf`+O%*D!y>|Q%@=nu;`FIZFdB1sUZ+y@I{dls_%KfN*2z{vRb&VwoVlA(f zYK|lH8=|ip)5OjO|7JQ6afGhv9<jN#fGLDCiH|vi_V|C-LVIIA>ieq$HlD~La)}{C zIWdzcBqkHO26&iRs7jO(`dug?R8gwwn87r3kp8_?LcX@KQ~&qgY#PgLXVKq5>tdWr zj3)GBrV=kDh7r2vdBhH*nq!C&+A!_OGPfcz)hVSloY48#mE&P1U=hK|GBfO05SQ4t z(9sPOIx#vux;hcXv6go-I5=i5!B;AFX>+F$g9whKzTe(aTHw|uwzvzEvZF7P=Ek`* z{gu%>{$^kFbRf;=J`KKc@26~acZRZ~O(AZt4)>2X^*9*ku1VVy{gL*`7ftUI@wulm ae!5NJ8h3N%z^-enHf=Q3TPn6hs?8s4QM%0l diff --git a/djangocms_versioning/locale/nl/LC_MESSAGES/django.po b/djangocms_versioning/locale/nl/LC_MESSAGES/django.po index 36a464a4..fec58ac3 100644 --- a/djangocms_versioning/locale/nl/LC_MESSAGES/django.po +++ b/djangocms_versioning/locale/nl/LC_MESSAGES/django.po @@ -266,7 +266,7 @@ msgstr "Actie niet geldig. De laatste versie is gesloten door {user}" #: models.py:33 #, python-brace-format msgid "Action Denied. The draft version is locked by {user}" -msgstr "Actie niet geldig. De concept versie is gesloten door " +msgstr "Actie niet geldig. De concept versie is gesloten door {user}" #: models.py:88 msgid "Created" From cf6dfb31ba148bce8d5578ecdbc72271365782e6 Mon Sep 17 00:00:00 2001 From: Fabian Braun <fsbraun@gmx.de> Date: Mon, 15 May 2023 09:42:00 +0200 Subject: [PATCH 2/5] Add locale directory to manifest --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 2972e242..5189771b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,4 +2,5 @@ include LICENSE.txt include README.rst recursive-include djangocms_versioning/static * recursive-include djangocms_versioning/templates * +recursive-include djangocms_versioning/locale * recursive-exclude * *.pyc From 2e86bb7fae656f92a0050f8d94c066d8e40e9740 Mon Sep 17 00:00:00 2001 From: Fabian Braun <fsbraun@gmx.de> Date: Tue, 16 May 2023 17:50:45 +0200 Subject: [PATCH 3/5] fix: Pages do not need to have. a language menu. Only try modifying if it is there. --- CHANGELOG.rst | 1 + djangocms_versioning/cms_toolbars.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b350088a..d95fe481 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,7 @@ Changelog Unreleased ========== +* fix: Only try modifying page language menu if it is present * fix: Added ``related_name`` attribute to the ``content_type`` foreign key of the ``Version`` model. * fix: burger menu adjusts to the design of django cms core dropdown * fix: bug that showed an archived version as unpublished in some cases in the state indicator diff --git a/djangocms_versioning/cms_toolbars.py b/djangocms_versioning/cms_toolbars.py index a2f16930..5ac50365 100644 --- a/djangocms_versioning/cms_toolbars.py +++ b/djangocms_versioning/cms_toolbars.py @@ -320,10 +320,9 @@ def override_language_menu(self): Override the default language menu for pages that are versioned. The default language menu is too generic so for pages we need to replace it. """ - # Only override the menu if a page can be found - if settings.USE_I18N and self.page: - language_menu = self.toolbar.get_menu(LANGUAGE_MENU_IDENTIFIER, _("Language")) - + # Only override the menu if it exists and a page can be found + language_menu = self.toolbar.get_menu(LANGUAGE_MENU_IDENTIFIER, _("Language")) + if settings.USE_I18N and language_menu and self.page: # remove_item uses `items` attribute so we have to copy object for _item in copy(language_menu.items): language_menu.remove_item(item=_item) From e8d5a4b8809973d2c6e0817b6909d69ef42f9ca7 Mon Sep 17 00:00:00 2001 From: Fabian Braun <fsbraun@gmx.de> Date: Tue, 16 May 2023 18:12:23 +0200 Subject: [PATCH 4/5] Add test --- tests/test_toolbars.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_toolbars.py b/tests/test_toolbars.py index c7b77e3b..379ed726 100644 --- a/tests/test_toolbars.py +++ b/tests/test_toolbars.py @@ -578,3 +578,26 @@ def test_change_language_menu_page_toolbar_language_selector_version_link(self): self.assertEqual(en_item.url, en_preview_url) self.assertEqual(de_item.url, de_preview_url) self.assertEqual(it_item.url, it_preview_url) + def test_page_toolbar_wo_language_menu(self): + from django.utils.translation import gettext as _ + + pagecontent = PageContentWithVersionFactory(language="en") + page = pagecontent.page + # Get request + request = self.get_page_request( + page=page, + path=get_object_edit_url(pagecontent), + user=self.get_superuser(), + ) + # Remove language menu from request's toolbar + del request.toolbar.menus[LANGUAGE_MENU_IDENTIFIER] + + # find VersioningPageToolbar + for cls, toolbar in request.toolbar.toolbars.items(): + if cls == "djangocms_versioning.cms_toolbars.VersioningPageToolbar": + # and call override_language_menu + toolbar.override_language_menu() + break + + language_menu = request.toolbar.get_menu(LANGUAGE_MENU_IDENTIFIER, _("Language")) + self.assertIsNone(language_menu) From f1d67370748730788cf7bc3a5430137380d958f6 Mon Sep 17 00:00:00 2001 From: Fabian Braun <fsbraun@gmx.de> Date: Tue, 23 May 2023 00:34:52 +0200 Subject: [PATCH 5/5] Update tests/test_toolbars.py Co-authored-by: Mark Walker <theshow@gmail.com> --- tests/test_toolbars.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_toolbars.py b/tests/test_toolbars.py index 379ed726..8142d22f 100644 --- a/tests/test_toolbars.py +++ b/tests/test_toolbars.py @@ -578,6 +578,7 @@ def test_change_language_menu_page_toolbar_language_selector_version_link(self): self.assertEqual(en_item.url, en_preview_url) self.assertEqual(de_item.url, de_preview_url) self.assertEqual(it_item.url, it_preview_url) + def test_page_toolbar_wo_language_menu(self): from django.utils.translation import gettext as _