[wp-meta] [Making WordPress.org] #6284: Extract strings from translation in `/patterns` and `/styles` directories of the theme
Making WordPress.org
noreply at wordpress.org
Tue Apr 19 15:02:25 UTC 2022
#6284: Extract strings from translation in `/patterns` and `/styles` directories
of the theme
--------------------------------------+--------------------
Reporter: oandregal | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Translate Site & Plugins | Keywords:
--------------------------------------+--------------------
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:
- https://github.com/wp-cli/i18n-command/pull/312
- https://github.com/wp-cli/i18n-command/pull/311
- https://github.com/wp-cli/i18n-command/pull/306
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6284>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list