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

Patternize + Escape templates with strings #489

Closed
jffng opened this issue Dec 7, 2023 · 3 comments · Fixed by #522
Closed

Patternize + Escape templates with strings #489

jffng opened this issue Dec 7, 2023 · 3 comments · Fixed by #522
Labels
enhancement New feature or request
Milestone

Comments

@jffng
Copy link
Contributor

jffng commented Dec 7, 2023

Background
Currently, only templates with images are transformed to patterns. In this process, the image is made "local" to the theme, as well as strings get escaped and marked for translation.

https://github.com/WordPress/create-block-theme/blob/017d52004e46d6c2ab38e68ef1be2bc08922fb2f/admin/create-theme/theme-zip.php#L114C44-L130

Proposal
It could be useful to allow all templates that contain strings, to follow the same behavior — transformed to a pattern and strings escaped + marked for translation.

@jffng jffng added the enhancement New feature or request label Dec 7, 2023
@pbking pbking added this to the 1.14 milestone Mar 8, 2024
@pbking pbking mentioned this issue Mar 8, 2024
2 tasks
@pbking
Copy link
Contributor

pbking commented Mar 8, 2024

Consider including the user to make this optional.

A setting? A Prompt? A separate "saving" button?

@alaczek
Copy link

alaczek commented Mar 26, 2024

Could we fast-track this issue? Creating patterns and making strings translatable is the majority of manual labor after generating a theme atm, and would go a long way to speeding up our process.

A setting? A Prompt? A separate "saving" button?

Could this be an option on this screen (for Clone specifically)?

image
@pbking
Copy link
Contributor

pbking commented Mar 26, 2024

We actually have a branch for this work that should be coming in... today? Soon at least.

It's done automatically, and might not cover all situations yet but it's a beginning. It isn't optional currently, but that's an idea that's been considered.

Planned for an upcoming release of CBT in the next week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
3 participants