Skip to content

Commit

Permalink
i18n: Update use-my-domain/domain-input comp to use fixMe
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskmnds committed Jan 7, 2025
1 parent 9faab1a commit 5253a65
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions client/components/domains/use-my-domain/domain-input.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card, Button, FormInputValidation, Gridicon } from '@automattic/components';
import { englishLocales, useLocale } from '@automattic/i18n-utils';
import { __, hasTranslation } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import { Icon } from '@wordpress/icons';
import { fixMe } from 'i18n-calypso';
import PropTypes from 'prop-types';
import { useEffect, useRef } from 'react';
import { connect } from 'react-redux';
Expand All @@ -25,7 +25,6 @@ function UseMyDomainInput( {
validationError,
} ) {
const domainNameInput = useRef( null );
const locale = useLocale();

useEffect( () => {
shouldSetFocus && domainNameInput.current.focus();
Expand All @@ -47,11 +46,11 @@ function UseMyDomainInput( {
}
};

const hasDomainPlaceholderLabel =
englishLocales.includes( locale ) || hasTranslation( 'yourgroovydomain.com' );
const domainPlaceholderLabel = hasDomainPlaceholderLabel
? __( 'yourgroovydomain.com' )
: __( 'mydomain.com' );
const domainPlaceholderLabel = fixMe( {
text: 'yourgroovydomain.com',
translation: __( 'yourgroovydomain.com' ),
fallback: __( 'mydomain.com' ),
} );

return (
<Card className={ baseClassName }>
Expand Down

0 comments on commit 5253a65

Please sign in to comment.