Skip to content

Commit d94b1f4

Browse files
committed
update hint text and clear successful message with a fresh upload
1 parent 81e7c64 commit d94b1f4

File tree

1 file changed

+3
-3
lines changed
  • packages/edit-site/src/components/global-styles/font-library-modal

1 file changed

+3
-3
lines changed

packages/edit-site/src/components/global-styles/font-library-modal/local-fonts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function LocalFonts() {
4646
* @return {void}
4747
*/
4848
const handleFilesUpload = ( files ) => {
49+
setNotice( null );
4950
const uniqueFilenames = new Set();
5051
const selectedFiles = [ ...files ];
5152
const allowedFiles = selectedFiles.filter( ( file ) => {
@@ -135,7 +136,6 @@ function LocalFonts() {
135136
*/
136137
const handleInstall = async ( fontFaces ) => {
137138
const fontFamilies = makeFamiliesFromFaces( fontFaces );
138-
setNotice( null );
139139
const status = await installFonts( fontFamilies );
140140
if ( status ) {
141141
setNotice( {
@@ -180,9 +180,9 @@ function LocalFonts() {
180180
<Spacer margin={ 2 } />
181181
<Text className="font-library-modal__upload-area__text">
182182
{ sprintf(
183-
/* translators: %s: allowed font formats: ex: .ttf, .woff and .woff2 */
183+
/* translators: %s: supported font formats: ex: .ttf, .woff and .woff2 */
184184
__(
185-
'Uploaded fonts will appear up in your library and can be used in your theme after that. Formats %s are supported.'
185+
'Uploaded fonts appear in your library and can be used in your theme. Supported formats: %s.'
186186
),
187187
supportedFormats
188188
) }

0 commit comments

Comments
 (0)