Skip to content

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

Merged
youknowriad merged 2 commits into
trunkfrom
doc/add-i18n-rtl-support-to-platform-docs
Oct 5, 2023
Merged

Documentation: Explain how to translate Gutenberg in standalone apps using the editor packages#55080
youknowriad merged 2 commits into
trunkfrom
doc/add-i18n-rtl-support-to-platform-docs

Conversation

@youknowriad

Copy link
Copy Markdown
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 fluiddot and noisysocks and removed request for a team October 5, 2023 09:02

@priethor priethor left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread platform-docs/docs/basic-concepts/internationalization.md

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

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.

Comment thread platform-docs/docs/basic-concepts/internationalization.md Outdated
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 5, 2023

Copy link
Copy Markdown

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
@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

3 participants