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

Documentation: Explain how to translate Gutenberg in standalone apps using the editor packages #55080

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

youknowriad
Copy link
Contributor

Related #53874

What?

This PR add a small documentation page about the i18n of the @WordPress packages. It explains how to load translations and how to switch to RTL if needed. I think there's a missing part about the localization (@wordpress/date package).

I also think that it would be good to explain here how to generate the list of all strings from the packages. (or provide translations and strings for some languages). I'm not sure whether it's possible to just provide the WordPress ones here from GlotPress, maybe there's a way/link to download them and use them manually.

Anyway, I think the current docs should be fine for a start.

Note I have personally tested all the code examples in a third-party vite install.

Test the documentation website

cd platform-docs
npm install
npm start

@youknowriad youknowriad added Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Developer Documentation Documentation for developers labels Oct 5, 2023
@youknowriad youknowriad requested a review from a team October 5, 2023 09:02
@youknowriad youknowriad self-assigned this Oct 5, 2023
@youknowriad youknowriad requested review from noisysocks and fluiddot and removed request for a team October 5, 2023 09:02
Copy link
Contributor

@priethor priethor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Riad! LGTM.

I added a small suggestion, but it is not a blocker at all.

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, suggesting a fix for a minor typo.

As for expanding, I think we could borrow a bit from the respective READMEs of the i18n and date packages.

platform-docs/docs/basic-concepts/internationalization.md Outdated Show resolved Hide resolved
Co-authored-by: Marin Atanasov <[email protected]>
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Flaky tests detected in d100a2c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6420255033
📝 Reported issues:

@youknowriad youknowriad merged commit ae5761b into trunk Oct 5, 2023
49 checks passed
@youknowriad youknowriad deleted the doc/add-i18n-rtl-support-to-platform-docs branch October 5, 2023 16:19
@github-actions github-actions bot added this to the Gutenberg 16.9 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants