Skip to content

Commit

Permalink
Replace Advanced Options title for domain transfer off platform (#82373)
Browse files Browse the repository at this point in the history
* Replace Advanced Options title for domain transfer off platform

* Translation check and fallback
  • Loading branch information
lsl authored and pull[bot] committed Nov 23, 2023
1 parent 39d01d0 commit 4846715
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Card, Spinner } from '@automattic/components';
import { localizeUrl } from '@automattic/i18n-utils';
import { localizeUrl, useHasEnTranslation } from '@automattic/i18n-utils';
import { ToggleControl } from '@wordpress/components';
import { createElement, createInterpolateElement } from '@wordpress/element';
import { sprintf } from '@wordpress/i18n';
Expand Down Expand Up @@ -80,7 +80,7 @@ const TransferPage = ( props: TransferPageProps ) => {
const [ isRequestingTransferCode, setIsRequestingTransferCode ] = useState( false );
const [ isLockingOrUnlockingDomain, setIsLockingOrUnlockingDomain ] = useState( false );
const domain = getSelectedDomain( props );

const hasEnTranslation = useHasEnTranslation();
const renderHeader = () => {
const items = [
{
Expand Down Expand Up @@ -356,7 +356,11 @@ const TransferPage = ( props: TransferPageProps ) => {

return (
<Card className="transfer-page__advanced-transfer-options">
<CardHeading size={ 16 }>{ __( 'Advanced Options' ) }</CardHeading>
<CardHeading size={ 16 }>
{ hasEnTranslation( 'Transfer to another registrar' )
? __( 'Transfer to another registrar' )
: __( 'Advanced Options' ) }
</CardHeading>
{ topLevelOfTld !== 'uk' ? renderCommonTldTransferOptions() : renderUkTransferOptions() }
</Card>
);
Expand Down

0 comments on commit 4846715

Please sign in to comment.