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

[i18n] Use message ids for all translations to improve DX for CFAs #1766

Open
1 task
jpzwarte opened this issue Jan 31, 2025 · 0 comments
Open
1 task

[i18n] Use message ids for all translations to improve DX for CFAs #1766

jpzwarte opened this issue Jan 31, 2025 · 0 comments

Comments

@jpzwarte
Copy link
Member

jpzwarte commented Jan 31, 2025

Provide a general summary of the issue here

We should use https://lit.dev/docs/localization/overview/#message-ids for all the translations within our web components.

This will help CFAs in the following way:

  1. Create a new web component with i18n: ${msg('Hello world')}
  2. Run lit-localize extract
  3. Edit <language>.xlf (for example nl.xlf) and add a translation "Hallo wereld"
  4. Edit the web component and change the original text
  5. After running step 2 again, our translation will be deleted

If in step 1 you instead write ${msg('Hello world', { id: 'welcome' })}, your translation will still be there in step 5.

This will make it a lot easier for CFAs to handle changes to the original text in the design system web components.

  • document naming scheme

👤 Your name

Jeroen

🧢 Your Product/Team

SLDS

@jpzwarte jpzwarte added the triage An issue needed triage label Jan 31, 2025
@github-project-automation github-project-automation bot moved this to 📥 Incoming in SL Design System Team Jan 31, 2025
@DanielleRameau DanielleRameau moved this from 📥 Incoming to 🗃️ Backlog in SL Design System Team Feb 3, 2025
@DanielleRameau DanielleRameau removed the triage An issue needed triage label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🗃️ Backlog
Development

No branches or pull requests

2 participants