[wp-meta] [Making WordPress.org] #5779: theme.json strings not extracted for translation

Making WordPress.org noreply at wordpress.org
Mon Jun 21 12:03:50 UTC 2021


#5779: theme.json strings not extracted for translation
--------------------------------------+--------------------
 Reporter:  nosolosw                  |      Owner:  (none)
     Type:  defect                    |     Status:  new
 Priority:  normal                    |  Milestone:
Component:  Translate Site & Plugins  |   Keywords:
--------------------------------------+--------------------
 https://core.trac.wordpress.org/ticket/53175 landed support for
 `theme.json` in WordPress 5.8, which is used by both core and themes to
 provide a number of settings to the block editor. The presets visible to
 users are among those settings: color palette, font sizes, duotone, etc.

 Before the introduction of `theme.json`, themes would mark these strings
 for being extracted in their functions.php file. Now, those strings should
 be taken from the `theme.json` file instead, as we do with block.json
 strings https://meta.trac.wordpress.org/ticket/5737

 **How to test**

 - Went to https://translate.wordpress.org/ and selected the 5.7.x line.
 - Searched for something that was present in a previous release but used a
 different source for translation (the block-editor package): "font size
 name".
   - It's there up for translation. However, I've noticed that the context
 for the font values is ''font size name'' (all in lower case, as defined
 before) and not ''Font size name'' (capital, as defined in the
 [theme-i18.json]https://github.com/WordPress/wordpress-
 develop/blob/master/src/wp-includes/theme-i18n.json#L6).
 - Searched for something that is new to 5.8: "duotone", "duotone name", or
 a specific value such as "dark grayscale".
   - I can't find anything.

 **How to fix**

 As far as I understand, we need to do a couple of things:

 - Add support for string extraction to the `wp i18n` command. See issue
 at: https://github.com/wp-cli/i18n-command/issues/224
 - Update meta with that new behaviour.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5779>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list