Skip to content

feat: Internationlization #120

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

Draft
wants to merge 30 commits into
base: trunk
Choose a base branch
from
Draft

feat: Internationlization #120

wants to merge 30 commits into from

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented May 2, 2025

What?

Add internationalization (i18n) support.

Why?

Ref CMM-280. Close #110. I18n improves the editor usability.

How?

Download and utilize translation strings from translate.wordpress.org.

Testing Instructions

TBD

Accessibility Testing Instructions

N/A, no navigation changes.

Screenshots or screencast

N/A, no visual changes.

dcalhoun added 20 commits April 30, 2025 11:52
Utilized for script requests.
Standardized logging within the code.
The editor no longer implicitly starts.
Simplify configuration with examples.
Consistently name utility files as objects.
Consistently name utility files as objects.
Required to ensure imported files have the correct locale set.
Ensure all project-specific strings are translated.
Two benefits:

1. Align with Gutenberg
2. Use the existing translation
Required to ensure imported files have the correct locale set.
@dcalhoun dcalhoun added the [Type] Enhancement A suggestion for improvement. label May 2, 2025
dcalhoun added 6 commits May 2, 2025 08:55
Clarify the utility's purpose.
In order to set the locale before critical `@wordpress` packages load,
we must load i18n packages separately from the rest of the `@wordpress`
packages. Otherwise, the locale will not be set in time and/or we will
encounter collisions from loading packages more than once.
These feel like two separate concerns. Separating them hopefully reduces
complexity.
Two, distinct levels provided little-to-no value.
Prefixing with the log level duplicates browser log level styles.
Prefixing the project name or acronym at least provides additional
context.
@dcalhoun dcalhoun force-pushed the feat/internationalization branch from 1d43f80 to 948dc37 Compare May 2, 2025 14:46
dcalhoun added 2 commits May 2, 2025 10:54
It's unclear why this manual chunk configuration is required, but the
editor fails to load without it. The dynamic import of the module never
resolves.
dcalhoun added 2 commits May 2, 2025 17:10
There is no reason to attempt loading the default locale. There will
never be a translation file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for internationalization (i18n)
1 participant