/** * External dependencies */ import jetpackAnalytics from '@automattic/jetpack-analytics'; import { AdminPage, AdminSectionHero, Container, Col, JetpackLogo, useBreakpointMatch, getUserLocale, } from '@automattic/jetpack-components'; import { Button } from '@wordpress/components'; import { useEffect, useMemo, useCallback } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ import { config } from '../index'; import './style.scss'; // Mag-16, see https://wp.me/PCYsg-9nE // Exception: pt-br, since mag-16 code is BR and it's the variation, not the language const availableScreenshotLanguages = [ 'ar', 'pt-br', 'de', 'en', 'es', 'fr', 'he', 'id', 'it', 'ja', 'ko', 'nl', 'ru', 'sv', 'tr', 'zh-cn', 'zh-tw', ]; const getLocaleScreenshotName = ( locale = '', isMobile = false ) => { const baseName = `forms-moved`; let languageSuffix = ''; const lowercaseLocale = locale.toLowerCase(); if ( availableScreenshotLanguages.includes( lowercaseLocale ) ) { languageSuffix = `-${ lowercaseLocale }`; } else { const language = lowercaseLocale.split( '-' )[ 0 ]; if ( availableScreenshotLanguages.includes( language ) ) { languageSuffix = `-${ language }`; } } return `${ baseName }${ languageSuffix }${ isMobile ? '-mobile' : '' }.png`; }; const AdminMigratePage = () => { const [ isSm ] = useBreakpointMatch( 'sm' ); const ASSETS_URL = useMemo( () => config( 'pluginAssetsURL' ), [] ); const dashboardURL = useMemo( () => config( 'dashboardURL' ), [] ); const header = (
{ __( 'They can now be found at Jetpack → Forms', 'jetpack-forms' ) }