Reduce duplication of font library group headings#63532
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +873 B (+0.05%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
matiasbenedetto
left a comment
There was a problem hiding this comment.
Looks good to me
| { themeFonts.length > 0 && ( | ||
| <VStack> | ||
| <Subtitle level={ 3 }>{ __( 'Theme Fonts' ) }</Subtitle> | ||
| <Subtitle level={ 3 }>{ __( 'Theme' ) }</Subtitle> |
There was a problem hiding this comment.
This seems like a place where we should use _x and/or a translator comment to provide a context for translation. Translating just the word "Theme" or "Custom" in isolation may be challenging.
| <Subtitle level={ 3 }>{ __( 'Theme' ) }</Subtitle> | |
| /* translators: Heading for a list of fonts provided by the theme. */ | |
| <Subtitle level={ 3 }>{ _x( 'Theme', 'font source' ) }</Subtitle> |
| <Subtitle level={ 3 }> | ||
| { __( 'Custom fonts' ) } | ||
| </Subtitle> | ||
| <Subtitle level={ 3 }>{ __( 'Custom' ) }</Subtitle> |
There was a problem hiding this comment.
| <Subtitle level={ 3 }>{ __( 'Custom' ) }</Subtitle> | |
| /* translators: Heading for a list of fonts installed by the user. */ | |
| <Subtitle level={ 3 }>{ _x( 'Custom', 'font source' ) }</Subtitle> |
| <VStack> | ||
| <h2 className="font-library-modal__fonts-title"> | ||
| { __( 'Theme Fonts' ) } | ||
| { __( 'Theme' ) } |
There was a problem hiding this comment.
| { __( 'Theme' ) } | |
| /* translators: Heading for a list of fonts provided by the theme. */ | |
| { _x( 'Theme', 'font source' ) } |
| <VStack> | ||
| <h2 className="font-library-modal__fonts-title"> | ||
| { __( 'Custom fonts' ) } | ||
| { __( 'Custom' ) } |
There was a problem hiding this comment.
| { __( 'Custom' ) } | |
| /* translators: Heading for a list of fonts installed by the user. */ | |
| { _x( 'Custom', 'font source' ) } |
| <Subtitle level={ 3 }> | ||
| { | ||
| /* translators: Heading for a list of fonts provided by the theme. */ | ||
| _x( 'Theme' ) |
There was a problem hiding this comment.
_x requires a string describing the context as the 2nd argument (see https://github.com/WordPress/gutenberg/tree/trunk/packages/i18n#_x).
creativecoder
left a comment
There was a problem hiding this comment.
This looks good now, thanks for addressing the issue!
* Update title in typography panel * Update font list titles in font library modal * used _x with translator comments * Add context for translation of headings Co-authored-by: akasunil <sunil25393@git.wordpress.org> Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org> Co-authored-by: creativecoder <grantmkin@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org>
What?
Fixes #63502
Screenshots