Opened 3 years ago
Closed 3 years ago
#6284 closed task (blessed) (fixed)
Extract strings from translation in `/patterns` and `/styles` directories of the theme
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Translate Site & Plugins | Keywords: | |
Cc: |
Description
WordPress 6.0 comes with two features that require new strings to be picked up for translation.
1) Global Style variations. These are theme.json
files stored in a /styles
folder of the them.
I haven't found any theme published in the directory that uses the style variations yet. An example of a theme that uses this feature is Pendant https://github.com/Automattic/themes/tree/trunk/pendant Should it be published to the directory, some of the new strings to be translatable are:
- "Pink" coming from https://github.com/Automattic/themes/blob/trunk/pendant/styles/pink.json#L3
- "Primary" coming from https://github.com/Automattic/themes/blob/trunk/pendant/styles/pink.json#L10
- "Foreground" https://github.com/Automattic/themes/blob/trunk/pendant/styles/pink.json#L15
2) PHP patterns stored in the /patterns
folder of the theme.
I've found the Archeo theme to use the patterns feature, the new strings are not yet in Translate:
- Directory: https://wordpress.org/themes/archeo/
- Translate: https://translate.wordpress.org/locale/gl/default/wp-themes/archeo/
As an example, some of the strings it should have are:
- "Default footer" coming from https://github.com/Automattic/themes/blob/trunk/archeo/patterns/footer.php#L3
- "Headline over dark image" coming from https://github.com/Automattic/themes/blob/trunk/archeo/patterns/headline-over-dark-image.php#L3
- "404 content" coming from https://github.com/Automattic/themes/blob/trunk/archeo/patterns/hidden-404.php#L3
Note that the changes in the i18 command for these stringns to be extracted have been merged and will be part of the 2.3.0 release as far as I can see:
Change History (5)
This ticket was mentioned in Slack in #meta by nosolosw. View the logs.
3 years ago
#4
@
3 years ago
- Type changed from defect (bug) to task (blessed)
The string freeze shouldn't be relevant for this. Right now there isn't a WP-CLI version available which includes the changes. But I have requested a new nightly on Slack. Once it's built we can update it on w.org.
#5
@
3 years ago
- Resolution set to fixed
- Status changed from assigned to closed
In dotorg18806:
Bin: Update WP-CLI to 2.7.0-alpha-dc3beef
See #meta6284
Also re-imported the two themes:
12 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Success: archeo 1.0.6 imported.
12 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
Success: pendant 1.0.0 imported.
@ocean90 Do you think this one can land before the soft string freeze tomorrow? (https://make.wordpress.org/core/6-0/)