From 96efcfa01c76a4dbcf6b95fd6c52e083ac443402 Mon Sep 17 00:00:00 2001 From: Mateusz Grotek Date: Fri, 29 Nov 2024 13:11:49 +0000 Subject: [PATCH] Translate "Skip contents" link to Welsh --- config/locales/cy.yml | 2 +- test/integration/guide_test.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config/locales/cy.yml b/config/locales/cy.yml index e322447a8..8164e1ddb 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -697,7 +697,7 @@ cy: title: Dydy'r dudalen rydych chi'n chwilio amdani ddim ar gael mwyach guide: pages_in_guide: Tudalennau yn y canllaw hwn - skip_contents: + skip_contents: Sgipio cynnwys html_publication: print_meta_data: available_at: Mae'r cyhoeddiad hwn ar gael yn %{url} diff --git a/test/integration/guide_test.rb b/test/integration/guide_test.rb index 38086ed88..3454fa085 100644 --- a/test/integration/guide_test.rb +++ b/test/integration/guide_test.rb @@ -16,6 +16,18 @@ class GuideTest < ActionDispatch::IntegrationTest assert page.has_css?(".govuk-link.govuk-link--no-visited-state[href$='/print']", text: "View a printable version of the whole guide") end + test "skip link in English" do + setup_and_visit_content_item("guide") + + assert page.has_css?(".gem-c-skip-link", text: "Skip contents") + end + + test "translated skip link" do + setup_and_visit_content_item("guide", { "locale" => "cy" }) + + assert page.has_css?(".gem-c-skip-link", text: "Sgipio cynnwys") + end + test "draft access tokens are appended to part links within navigation" do setup_and_visit_content_item_with_params("guide", "?token=some_token")