Skip to content

Commit

Permalink
Save Button: Fix the translation of the Activate button (#57147)
Browse files Browse the repository at this point in the history
* Save Button: Add the translators to the activation string

* Use __() function for the translation
  • Loading branch information
arthur791004 committed Dec 19, 2023
1 parent c8de118 commit a685503
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions packages/edit-site/src/components/save-button/index.js
Expand Up @@ -60,13 +60,26 @@ export default function SaveButton( {
const getLabel = () => {
if ( isPreviewingTheme() ) {
if ( isSaving ) {
return sprintf( 'Activating %s', previewingThemeName );
return sprintf(
/* translators: %s: The name of theme to be activated. */
__( 'Activating %s' ),
previewingThemeName
);
} else if ( disabled ) {
return __( 'Saved' );
} else if ( isDirty ) {
return sprintf( 'Activate %s & Save', previewingThemeName );
return sprintf(
/* translators: %s: The name of theme to be activated. */
__( 'Activate %s & Save' ),
previewingThemeName
);
}
return sprintf( 'Activate %s', previewingThemeName );

return sprintf(
/* translators: %s: The name of theme to be activated. */
__( 'Activate %s' ),
previewingThemeName
);
}

if ( isSaving ) {
Expand Down

0 comments on commit a685503

Please sign in to comment.