-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
@@ -52,7 +52,7 @@ function FontFamilies() { | |||
<VStack spacing={ 4 }> | |||
{ themeFonts.length > 0 && ( | |||
<VStack> | |||
<Subtitle level={ 3 }>{ __( 'Theme Fonts' ) }</Subtitle> | |||
<Subtitle level={ 3 }>{ __( 'Theme' ) }</Subtitle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Subtitle level={ 3 }>{ __( 'Custom' ) }</Subtitle> | |
/* translators: Heading for a list of fonts installed by the user. */ | |
<Subtitle level={ 3 }>{ _x( 'Custom', 'font source' ) }</Subtitle> |
@@ -172,7 +172,7 @@ function InstalledFonts() { | |||
{ baseThemeFonts.length > 0 && ( | |||
<VStack> | |||
<h2 className="font-library-modal__fonts-title"> | |||
{ __( 'Theme Fonts' ) } | |||
{ __( 'Theme' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ __( 'Theme' ) } | |
/* translators: Heading for a list of fonts provided by the theme. */ | |
{ _x( 'Theme', 'font source' ) } |
@@ -209,7 +209,7 @@ function InstalledFonts() { | |||
{ baseCustomFonts.length > 0 && ( | |||
<VStack> | |||
<h2 className="font-library-modal__fonts-title"> | |||
{ __( 'Custom fonts' ) } | |||
{ __( 'Custom' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ __( '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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_x
requires a string describing the context as the 2nd argument (see https://github.com/WordPress/gutenberg/tree/trunk/packages/i18n#_x).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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