department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
79 stars 59 forks source link

Confirm Design System fix for "On this page" translation, add lang attribute if needed #10177

Closed allisonlu closed 1 year ago

allisonlu commented 1 year ago

UNBLOCKED BY https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues/1100 UPDATE: Design system team updated the component; however, in this comment Brooks indicated the CMS needs to add a lang attribute to the <main> tag on any page that uses the component.

Description

On any page with translated content, the "On this page" header appears in English. See #9868 for screenshots and more info. From that spike ticket, we found out that this is due to switching over to using the design system component, which does not include Spanish and Tagalog translations.

PR in June 2022 when we switched over: https://github.com/department-of-veterans-affairs/content-build/pull/1173 On this page component on the design system website: https://design.va.gov/components/on-this-page

Tasks

- make changes - remove new design system component (that doesn't work for translation) - look at old code that preceded addition of component - QA translation of both Spanish and Tagalog versions - get code review (assume: reviewer will pull code and run locally) When Design system component is translated:

Acceptance Criteria

CMS Team

Please check the team(s) that will do this work.

allisonlu commented 1 year ago

The Design System Council will be evaluating this request on Friday, August 19th, 1p ET.

jilladams commented 1 year ago

https://dsva.slack.com/archives/C52CL1PKQ/p1660929570731529

Design system council agreed today to implement the translation strings we previously used, ETA 1-2 sprints to get the component translated. We will hold for that, rather than revert to the hard coded/translated string then re-adopt the design system component when translation is done.

Marking this blocked / revising the ticket to be around confirming the Design system component translation, when it's available.

Fix will be tracked in https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues/1100.

wesrowe commented 1 year ago

I added an update to the main ticket details. Updating the title and moving to Stretch.

jilladams commented 1 year ago

Need to investigate the design system comment re: how to declare the language of the page.

apisandipas commented 1 year ago

After Slack Discussion here and Via Zoom with @ryguyk , we've determined the best approach is via a Metal Smith plugin to hook into the build process and add a lang attribute to all main elements. As this is content-build related, we've repointed the ticket to be a 5.

jilladams commented 1 year ago

@apisandipas can you link the PR here?

jilladams commented 1 year ago

https://github.com/department-of-veterans-affairs/content-build/pull/1333

jilladams commented 1 year ago

Verified in Staging:

Screen Shot 2022-10-19 at 2 35 21 PM

Screen Shot 2022-10-19 at 2 35 12 PM