forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PaletteEdit: Fix order numbers (WordPress#52212)
Using FSE to change styles on a page template. When using the English language in site and add new colors to Styles, the default name appear with numbers in order. However, when switching to Japanese language, the sequential order numbers did not work anymore in the default name. Gutenberg was trying to create slugs for colors using translated strings, e.g., 色 6 but that didn't pass the regex new RegExp( ^${ slugPrefix }color-([\d]+)$ ) This commit hardcodes the English `color-` slug fragment to avoid this. Updates unit tests. --------- Co-authored-by: megane9988 <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: mirka <[email protected]>
- Loading branch information
1 parent
f1623ff
commit c945b05
Showing
3 changed files
with
46 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters