-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global Styles: Don't use named arguments for 'sprintf' #52782
Conversation
@swissspidy, @ocean90, should we backport this into the next RC, or will it create more work for polyglot teams? I think a new lint rule was mentioned in Slack channels; I'll try to look into that separately. |
I'm in favour of getting this in as soon as possible to avoid any more confusion and/or incorrect translations on release day. |
Size Change: -9 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 49abf28. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5608087132
|
@Mamaduka awesome, thank you! Happy to help with any custom eslint rules, as I wrote most of the i18n related ones years ago. |
Thanks for picking this up @Mamaduka 🙇🏻 |
Perfect, thanks @Mamaduka |
I'm sure @ramonjd and @tellthemachines will include this in the next package release pre-RC2. |
…ding-strategy * origin/trunk: (59 commits) Promisify action creator return type for WP data dispatch (#52530) [RNMobile] Add WP hook for registering non-core blocks (#52791) removes check for active preview device type to enable the fixed toolbar preference (#52770) Enforce checks against redeclaration for functions and classes (#52696) update appearance tools, (#52785) Behaviors: Extend Global Styles API to read/write behaviors config. (#52370) HeaderToolbar - Update inserterMethod meta data (#52735) add options for debugging php unit tests (#52778) Docs: Interactivity API > Getting Started Guide - minor adjustments (#52786) Footnotes: Use static closures when not using '' (#52781) Improve slug generation & matching in request utils (#52414) Open "docs" folder for the Interactivity API package and Getting Started Guide (#52462) Global Styles: Don't use named arguments for 'sprintf' (#52782) E2E utils - Update locator to hide the keyboard on iOS to pick the first element, on iPad two buttons are available and the second one makes the floating keyboard to show up (#52771) Patterns: Reinstate template parts mode spec (#52780) chore(release): publish Update changelog files Patterns: Fix empty general template parts category (#52747) Add id to pattern inserted notice to stop multiple notices stacking (#52746) Site Editor: Fix site link accessibility issues (#52744) ...
I just cherry-picked this PR to the update/packages-RC2 branch to get it included in the next release: 24e1886 |
* Filter out patterns that are not allowed in the inserter (#52675) * Remove autofocus and improve placeholder text consistency. (#52634) * Do not navigate to the styles pages unless you're in a random listing page (#52728) * Patterns: Don't override the rootClientID in create menu - only set if undefined (#52713) * Footnotes: store in revisions (#52686) * Fix: Block toolbar obscuring document tools when Top Toolbar is enabled (#52722) * Update toolbar width * Site editor needs specific width * fixes top toolbar width for post editor when not in fullscreen * remove the body rule --------- Co-authored-by: Andrei Draganescu <[email protected]> * Site Editor: Fix site link accessibility issues (#52744) * Add id to pattern inserted notice to stop multiple notices stacking (#52746) * Global Styles: Don't use named arguments for 'sprintf' (#52782) * Footnotes: Use static closures when not using '' (#52781) * removes check for active preview device type to enable the fixed toolbar preference (#52770) * Parser / Site Editor: Ensure autop is not run when freeform block is set to core/html (#52716) * Parse / Site Editor: Ensure autop is not run when freeform block is set to core/html * Switch to equals freeform instead of not equals core/html * Rename core/test-freeform to core/freeform in tests * Adding @SInCE annotation for relevant 6.3 changes. (#52820) * Navigation: Load the raw property on the navigation fallback (#52758) * Navigation: Load the raw property on the navigation fallback * Update lib/compat/wordpress-6.3/navigation-fallback.php Co-authored-by: Dave Smith <[email protected]> * Update lib/compat/wordpress-6.3/navigation-fallback.php Co-authored-by: Dave Smith <[email protected]> * Add a test for these properties * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * Update phpunit/class-gutenberg-rest-navigation-fallback-controller-test.php Co-authored-by: Dave Smith <[email protected]> * add more comments * add necessary method * Fix php coding standards error --------- Co-authored-by: Dave Smith <[email protected]> Co-authored-by: Jerry Jones <[email protected]> * Allow styles to be changed dynamically through editor settings (#52767) * ResizableFrame: Fix styling in Firefox (#52700) * ResizableFrame: Fix styling in Firefox * Remove unused class * Patterns: Fix empty general template parts category (#52747) --------- Co-authored-by: Glen Davies <[email protected]> --------- Co-authored-by: Carolina Nymark <[email protected]> Co-authored-by: Andrea Fercia <[email protected]> Co-authored-by: Riad Benguella <[email protected]> Co-authored-by: Glen Davies <[email protected]> Co-authored-by: Ella <[email protected]> Co-authored-by: James Koster <[email protected]> Co-authored-by: Andrei Draganescu <[email protected]> Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Andrei Draganescu <[email protected]> Co-authored-by: Andrew Serong <[email protected]> Co-authored-by: Ramon <[email protected]> Co-authored-by: Ben Dwyer <[email protected]> Co-authored-by: Dave Smith <[email protected]> Co-authored-by: Jerry Jones <[email protected]> Co-authored-by: Lena Morita <[email protected]> Co-authored-by: Kai Hao <[email protected]> Co-authored-by: Glen Davies <[email protected]>
What?
PR replaces named arguments for the
sprintf
i18n helper with regular placeholders.Why?
The PHP counterpart doesn't support named arguments and the difference can be confusing for people working on translations.
See https://wordpress.slack.com/archives/C02RP50LK/p1689759989093929
Testing Instructions
Screenshots or screencast