Skip to content
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

Reading Settings: Remove translation check for the label of the default value of the 'Default posts page' input #73239

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { useLocale, localizeUrl } from '@automattic/i18n-utils';
mashikag marked this conversation as resolved.
Show resolved Hide resolved
import { useI18n } from '@wordpress/react-i18n';
import { useTranslate } from 'i18n-calypso';
import { connect } from 'react-redux';
import FormFieldset from 'calypso/components/forms/form-fieldset';
Expand Down Expand Up @@ -70,8 +68,6 @@ const YourHomepageDisplaysSetting = ( {
disabled,
siteId,
}: YourHomepageDisplaysSettingProps ) => {
const { hasTranslation } = useI18n();
const locale = useLocale();
const translate = useTranslate();

const { data: pages, isLoading } = useDropdownPagesQuery<
Expand Down Expand Up @@ -133,11 +129,7 @@ const YourHomepageDisplaysSetting = ( {
value={ page_for_posts }
onChange={ handlePageForPostsChange }
>
<option value="">
{ locale.startsWith( 'en' ) || hasTranslation( '—— None ——' )
? translate( '—— None ——' )
: translate( '—— Select ——' ) }
</option>
<option value="">{ translate( '—— None ——' ) }</option>
{ pages?.map( ( page ) => {
return (
<option
Expand Down