Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate "Skip contents" link to Welsh #3453

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
12 changes: 12 additions & 0 deletions test/integration/guide_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down