Skip to content

Commit

Permalink
Merge pull request #2 from berroar/upgrade-ds-to-v48
Browse files Browse the repository at this point in the history
Upgrade ds to v48
  • Loading branch information
berroar authored Apr 14, 2022
2 parents 800af78 + 9b4f1d5 commit c72a46f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .design-system-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46.1.4
48.0.3
12 changes: 10 additions & 2 deletions app/helpers/template_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ def context(self) -> dict[str, Any]:
}

@property
def service_links_context(self) -> Optional[dict[str, list[dict]]]:
def service_links_context(
self,
) -> Optional[dict[str, Union[dict[str, str], list[dict]]]]:
if service_links := self._survey_config.get_service_links(
sign_out_url=self._sign_out_url,
is_authenticated=current_user.is_authenticated,
):
return {"itemsList": service_links}
return {
"toggleServicesButton": {
"text": lazy_gettext("Menu"),
"ariaLabel": "Toggle services menu",
},
"itemsList": service_links,
}

return None

Expand Down
18 changes: 11 additions & 7 deletions app/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-03-29 09:47+0100\n"
"POT-Creation-Date: 2022-04-12 12:38+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -203,11 +203,15 @@ msgstr[1] ""
msgid "Not a valid choice."
msgstr ""

#: app/helpers/template_helpers.py:110
#: app/helpers/template_helpers.py:85
msgid "Menu"
msgstr ""

#: app/helpers/template_helpers.py:118
msgid "The following links open in a new tab"
msgstr ""

#: app/helpers/template_helpers.py:140
#: app/helpers/template_helpers.py:148
msgid ""
"Make sure you <a href='{sign_out_url}'>leave this page</a> or close your "
"browser if using a shared device"
Expand Down Expand Up @@ -380,7 +384,7 @@ msgstr ""
msgid "Crown copyright and database rights 2020 OS 100019153."
msgstr ""

#: app/survey_config/survey_config.py:43
#: app/survey_config/survey_config.py:42
msgid "Save and exit survey"
msgstr ""

Expand Down Expand Up @@ -711,11 +715,11 @@ msgstr ""
msgid "View Submitted Response"
msgstr ""

#: templates/calculatedsummary.html:14
#: templates/calculatedsummary.html:13
msgid "Please review your answers and confirm these are correct"
msgstr ""

#: templates/calculatedsummary.html:25
#: templates/calculatedsummary.html:24
msgid "Yes, I confirm these are correct"
msgstr ""

Expand Down Expand Up @@ -1180,7 +1184,7 @@ msgstr ""
msgid "Continue survey"
msgstr ""

#: templates/layouts/_questionnaire.html:38
#: templates/layouts/_questionnaire.html:37
msgid "Choose another section and return to this later"
msgstr ""

Expand Down
6 changes: 5 additions & 1 deletion tests/app/helpers/test_template_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def test_get_page_header_context_census_nisra(app: Flask):
BusinessSurveyConfig(),
True,
{
"toggleServicesButton": {
"text": "Menu",
"ariaLabel": "Toggle services menu",
},
"itemsList": [
{
"title": "My account",
Expand All @@ -171,7 +175,7 @@ def test_get_page_header_context_census_nisra(app: Flask):
"url": "/sign-out",
"id": "header-link-sign-out",
},
]
],
},
),
],
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/spec/features/calculated_summary.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CurrencyTotalPlaybackPageSkippedFourth from "../../generated_pages/calcul
import UnitTotalPlaybackPage from "../../generated_pages/calculated_summary/unit-total-playback.page.js";
import PercentageTotalPlaybackPage from "../../generated_pages/calculated_summary/percentage-total-playback.page.js";
import NumberTotalPlaybackPage from "../../generated_pages/calculated_summary/number-total-playback.page.js";
import CalculatedSummaryTotalConfirmation from "../../generated_pages/calculated_summary/calculated-summary-total-confirmation.page";
import CalculatedSummaryTotalConfirmation from "../../generated_pages/calculated_summary/calculated-summary-total-confirmation.page.js";
import SubmitPage from "../../generated_pages/calculated_summary/submit.page";
import ThankYouPage from "../../base_pages/thank-you.page.js";

Expand Down

0 comments on commit c72a46f

Please sign in to comment.