In core, it's a long established, good, practice to avoid post types, taxonomies, etc. variable names for placeholders in translatable strings. It doesn't work due to structural differences in languages: feminine, masculine, various form of plurals, etc.
|
const filterLabel = sprintf( |
|
_x( 'Search %s', 'term' ), |
|
get( |
|
this.props.taxonomy, |
|
[ 'name' ], |
|
slug === 'category' ? __( 'Categories' ) : __( 'Terms' ) |
|
) |
|
); |
|
const groupLabel = sprintf( |
|
_x( 'Available %s', 'term' ), |
|
get( |
|
this.props.taxonomy, |
|
[ 'name' ], |
|
slug === 'category' ? __( 'Categories' ) : __( 'Terms' ) |
|
) |
|
); |
These strings should be either simplified or use full translatable strings added in core for the taxonomies.
There are also other minor consequences. For example, in Italian (and I guess in many other languages) we don't use title casing. However, the first string placeholder is placed with the taxonomy name so the final result is a title cased string. Unpleasant to see, as all the other strings don't use title casing:

The second string is translated as:
aria-label="Disponibile Categorie"
which is wrong, but I can't blame translators as _x( 'Available %s', 'term' ) is difficult to translate and not visible in the interface.
In these cases, I'd recommend to:
- either simplify the strings and remove placeholders
- or introduce new taxonomie label in core and use them in the editor
In core, it's a long established, good, practice to avoid post types, taxonomies, etc. variable names for placeholders in translatable strings. It doesn't work due to structural differences in languages: feminine, masculine, various form of plurals, etc.
gutenberg/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js
Lines 373 to 388 in 910b655
These strings should be either simplified or use full translatable strings added in core for the taxonomies.
There are also other minor consequences. For example, in Italian (and I guess in many other languages) we don't use title casing. However, the first string placeholder is placed with the taxonomy name so the final result is a title cased string. Unpleasant to see, as all the other strings don't use title casing:
The second string is translated as:
aria-label="Disponibile Categorie"which is wrong, but I can't blame translators as
_x( 'Available %s', 'term' )is difficult to translate and not visible in the interface.In these cases, I'd recommend to: