diff --git a/client/account-recovery/lost-password-form/index.jsx b/client/account-recovery/lost-password-form/index.jsx index 5b432eab06255..d7eff7a4c213e 100644 --- a/client/account-recovery/lost-password-form/index.jsx +++ b/client/account-recovery/lost-password-form/index.jsx @@ -12,7 +12,7 @@ import { identity, noop } from 'lodash'; /** * Internal dependencies */ -import support from 'lib/url/support'; +import { ACCOUNT_RECOVERY } from 'lib/url/support'; import Card from 'components/card'; import FormButton from 'components/button'; import FormLabel from 'components/forms/form-label'; @@ -73,7 +73,7 @@ export class LostPasswordFormComponent extends Component {

{ translate( 'Want more help? We have a full {{link}}guide to resetting your password{{/link}}.', - { components: { link: } } + { components: { link: } } ) }

diff --git a/client/account-recovery/reset-password/transaction-id-form/index.jsx b/client/account-recovery/reset-password/transaction-id-form/index.jsx index 093c5c1110dd3..24579db833315 100644 --- a/client/account-recovery/reset-password/transaction-id-form/index.jsx +++ b/client/account-recovery/reset-password/transaction-id-form/index.jsx @@ -11,7 +11,7 @@ import { identity } from 'lodash'; /** * Internal dependencies */ -import support from 'lib/url/support'; +import { ACCOUNT_RECOVERY } from 'lib/url/support'; import Card from 'components/card'; import Button from 'components/button'; import FormLabel from 'components/forms/form-label'; @@ -52,7 +52,7 @@ export class TransactionIdFormComponent extends Component { { components: { strong: , - helpLink: , + helpLink: , }, } ) } @@ -66,7 +66,7 @@ export class TransactionIdFormComponent extends Component { '{{helpLink}}Need help to find your transaction id?{{/helpLink}}', { components: { - helpLink: , + helpLink: , }, } ) } diff --git a/client/blocks/credit-card-form/index.jsx b/client/blocks/credit-card-form/index.jsx index f96b3255c15ba..12f122179d727 100644 --- a/client/blocks/credit-card-form/index.jsx +++ b/client/blocks/credit-card-form/index.jsx @@ -22,7 +22,7 @@ import notices from 'notices'; import { validateCardDetails } from 'lib/credit-card-details'; import ValidationErrorList from 'notices/validation-error-list'; import wpcomFactory from 'lib/wp'; -import support from 'lib/url/support'; +import { AUTO_RENEWAL, MANAGE_PURCHASES } from 'lib/url/support'; const wpcom = wpcomFactory.undocumented(); @@ -289,14 +289,10 @@ const CreditCardForm = createReactClass( { ), autoRenewalSupportPage: ( - + ), managePurchasesSupportPage: ( - + ), }, } diff --git a/client/components/domains/transfer-domain-step/index.jsx b/client/components/domains/transfer-domain-step/index.jsx index 7ccd6bea8beec..d5dc4e8760531 100644 --- a/client/components/domains/transfer-domain-step/index.jsx +++ b/client/components/domains/transfer-domain-step/index.jsx @@ -26,7 +26,7 @@ import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/an import { getSelectedSite } from 'state/ui/selectors'; import FormTextInputWithAffixes from 'components/forms/form-text-input-with-affixes'; import TransferDomainPrecheck from './transfer-domain-precheck'; -import support from 'lib/url/support'; +import { INCOMING_DOMAIN_TRANSFER, MAP_EXISTING_DOMAIN } from 'lib/url/support'; import HeaderCake from 'components/header-cake'; import Button from 'components/button'; @@ -132,7 +132,7 @@ class TransferDomainStep extends React.Component { components: { a: ( @@ -179,7 +179,7 @@ class TransferDomainStep extends React.Component { ) } diff --git a/client/components/domains/transfer-domain-step/transfer-domain-precheck.jsx b/client/components/domains/transfer-domain-step/transfer-domain-precheck.jsx index dd453c90859cf..716ac0350cc1d 100644 --- a/client/components/domains/transfer-domain-step/transfer-domain-precheck.jsx +++ b/client/components/domains/transfer-domain-step/transfer-domain-precheck.jsx @@ -20,7 +20,12 @@ import Notice from 'components/notice'; import { recordTracksEvent } from 'state/analytics/actions'; import FormattedHeader from 'components/formatted-header'; import { checkInboundTransferStatus } from 'lib/domains'; -import support from 'lib/url/support'; +import { + CALYPSO_CONTACT, + INCOMING_DOMAIN_TRANSFER_PREPARE_AUTH_CODE, + INCOMING_DOMAIN_TRANSFER_PREPARE_PRIVACY, + INCOMING_DOMAIN_TRANSFER_PREPARE_UNLOCK, +} from 'lib/url/support'; import TransferRestrictionMessage from 'components/domains/transfer-domain-step/transfer-restriction-message'; class TransferDomainPrecheck extends React.PureComponent { @@ -197,7 +202,7 @@ class TransferDomainPrecheck extends React.PureComponent { br:
, a: (
@@ -217,7 +222,7 @@ class TransferDomainPrecheck extends React.PureComponent { components: { a: ( @@ -288,7 +293,7 @@ class TransferDomainPrecheck extends React.PureComponent { br:
, a: (
@@ -318,7 +323,7 @@ class TransferDomainPrecheck extends React.PureComponent { strong: , a: ( @@ -347,7 +352,7 @@ class TransferDomainPrecheck extends React.PureComponent { strong: , a: ( @@ -388,7 +393,7 @@ class TransferDomainPrecheck extends React.PureComponent { components: { a: ( @@ -445,13 +450,7 @@ class TransferDomainPrecheck extends React.PureComponent { 'Need help? {{a}}Get in touch with one of our Happiness Engineers{{/a}}.', { components: { - a: ( - - ), + a: , }, } ) } diff --git a/client/components/domains/transfer-domain-step/transfer-restriction-message.jsx b/client/components/domains/transfer-domain-step/transfer-restriction-message.jsx index 79ab6b5b568a5..c47cea3d08c96 100644 --- a/client/components/domains/transfer-domain-step/transfer-restriction-message.jsx +++ b/client/components/domains/transfer-domain-step/transfer-restriction-message.jsx @@ -14,7 +14,7 @@ import page from 'page'; import Button from 'components/button'; import Card from 'components/card'; import FormattedHeader from 'components/formatted-header'; -import support from 'lib/url/support'; +import { MAP_EXISTING_DOMAIN } from 'lib/url/support'; import paths from 'my-sites/domains/paths'; class TransferRestrictionMessage extends React.PureComponent { @@ -62,7 +62,7 @@ class TransferRestrictionMessage extends React.PureComponent { '{{a}}Learn how{{/a}}.', { components: { - a: , + a: , }, } ); diff --git a/client/components/happiness-support/index.jsx b/client/components/happiness-support/index.jsx index 02faa6add9479..a96ddafd2b9f1 100644 --- a/client/components/happiness-support/index.jsx +++ b/client/components/happiness-support/index.jsx @@ -15,7 +15,12 @@ import { localize } from 'i18n-calypso'; */ import Button from 'components/button'; import isHappychatAvailable from 'state/happychat/selectors/is-happychat-available'; -import support from 'lib/url/support'; +import { + CALYPSO_CONTACT, + JETPACK_CONTACT_SUPPORT, + JETPACK_SUPPORT, + SUPPORT_ROOT, +} from 'lib/url/support'; import HappychatButton from 'components/happychat/button'; import HappychatConnection from 'components/happychat/connection-connected'; import { recordTracksEvent } from 'state/analytics/actions'; @@ -86,11 +91,11 @@ export class HappinessSupport extends Component { } renderContactButton() { - let url = support.CALYPSO_CONTACT, + let url = CALYPSO_CONTACT, target = ''; if ( this.props.isJetpack ) { - url = support.JETPACK_CONTACT_SUPPORT; + url = JETPACK_CONTACT_SUPPORT; target = '_blank'; } @@ -122,10 +127,10 @@ export class HappinessSupport extends Component { } renderSupportButton() { - let url = support.SUPPORT_ROOT; + let url = SUPPORT_ROOT; if ( this.props.isJetpack ) { - url = support.JETPACK_SUPPORT; + url = JETPACK_SUPPORT; } return ( diff --git a/client/components/happiness-support/test/index.jsx b/client/components/happiness-support/test/index.jsx index fa517136e2a87..6c5d2a84a4da8 100644 --- a/client/components/happiness-support/test/index.jsx +++ b/client/components/happiness-support/test/index.jsx @@ -14,7 +14,12 @@ import { spy } from 'sinon'; import { HappinessSupport } from '..'; import HappychatButton from 'components/happychat/button'; import HappychatConnection from 'components/happychat/connection-connected'; -import support from 'lib/url/support'; +import { + CALYPSO_CONTACT, + JETPACK_CONTACT_SUPPORT, + JETPACK_SUPPORT, + SUPPORT_ROOT, +} from 'lib/url/support'; describe( 'HappinessSupport', () => { let wrapper; @@ -51,7 +56,7 @@ describe( 'HappinessSupport', () => { ); expect( wrapper.find( 'Button.happiness-support__support-button' ).props().href ).to.equal( - support.SUPPORT_ROOT + SUPPORT_ROOT ); } ); @@ -64,7 +69,7 @@ describe( 'HappinessSupport', () => { .find( 'Button' ) .last() .prop( 'href' ) - ).to.equal( support.JETPACK_SUPPORT ); + ).to.equal( JETPACK_SUPPORT ); } ); test( 'should have is-placeholder className only if it is a placeholder', () => { @@ -213,12 +218,12 @@ describe( 'HappinessSupport', () => { test( 'should be rendered with link to CALYPSO_CONTACT if it is not for JetPack', () => { wrapper = shallow( ); - expect( wrapper.find( selector ).prop( 'href' ) ).to.equal( support.CALYPSO_CONTACT ); + expect( wrapper.find( selector ).prop( 'href' ) ).to.equal( CALYPSO_CONTACT ); } ); test( 'should be rendered with link to JETPACK_CONTACT_SUPPORT if it is for JetPack', () => { wrapper = shallow( ); - expect( wrapper.find( selector ).prop( 'href' ) ).to.equal( support.JETPACK_CONTACT_SUPPORT ); + expect( wrapper.find( selector ).prop( 'href' ) ).to.equal( JETPACK_CONTACT_SUPPORT ); } ); test( 'should render translated content', () => { diff --git a/client/lib/domains/registration/availability-messages.js b/client/lib/domains/registration/availability-messages.js index 48d7394738591..be7b8d43ba710 100644 --- a/client/lib/domains/registration/availability-messages.js +++ b/client/lib/domains/registration/availability-messages.js @@ -10,7 +10,11 @@ import { translate } from 'i18n-calypso'; * Internal dependencies */ import { getTld } from 'lib/domains'; -import support from 'lib/url/support'; +import { + CALYPSO_CONTACT, + INCOMING_DOMAIN_TRANSFER_STATUSES_IN_PROGRESS, + MAP_EXISTING_DOMAIN, +} from 'lib/url/support'; import { domainAvailability } from 'lib/domains/constants'; import { domainManagementTransferToOtherSite, @@ -92,7 +96,7 @@ function getAvailabilityNotice( domain, error, site ) { args: { domain, site }, components: { strong: , - a: , + a: , }, } ); @@ -118,10 +122,7 @@ function getAvailabilityNotice( domain, error, site ) { components: { strong: , a: ( - + ), }, } @@ -136,7 +137,7 @@ function getAvailabilityNotice( domain, error, site ) { args: { tld }, components: { strong: , - a: , + a: , }, } ); @@ -183,7 +184,7 @@ function getAvailabilityNotice( domain, error, site ) { href="http://wordpressfoundation.org/trademark-policy/" /> ), - a2: , + a2: , }, } ); diff --git a/client/lib/url/support.js b/client/lib/url/support.js index 38af38a952960..10defce1f12e6 100644 --- a/client/lib/url/support.js +++ b/client/lib/url/support.js @@ -1,90 +1,88 @@ /** @format */ const root = 'https://support.wordpress.com'; -export default { - ACCOUNT_RECOVERY: `${ root }/account-recovery`, - ADDING_GOOGLE_APPS_TO_YOUR_SITE: `${ root }/adding-g-suite-to-your-site`, - ADDING_USERS: `${ root }/adding-users`, - ALL_ABOUT_DOMAINS: `${ root }/all-about-domains`, - AUTO_RENEWAL: `${ root }/auto-renewal`, - BANDPAGE_WIDGET: `${ root }/widgets/bandpage-widget`, - CATEGORIES_VS_TAGS: `${ root }/posts/categories-vs-tags`, - CHANGE_NAME_SERVERS: `${ root }/domains/change-name-servers`, - CHANGE_NAME_SERVERS_FINDING_OUT_NEW_NS: `${ root }/domains/change-name-servers/#finding-out-your-new-name-server`, - COMMENTS: `${ root }/category/comments`, - COMMUNITY_TRANSLATOR: `${ root }/community-translator`, - COMPLETING_GOOGLE_APPS_SIGNUP: `${ root }/adding-g-suite-to-your-site/#completing-sign-up`, - CONCIERGE_SUPPORT: `${ root }/concierge-support`, - CONNECT: `${ root }/connect`, - CONTACT: `${ root }/contact`, - CALYPSO_CONTACT: '/help/contact', - CALYPSO_COURSES: '/help/courses', - CREATE: `${ root }/create`, - CUSTOM_DNS: `${ root }/domains/custom-dns`, - DESIGNATED_AGENT: `${ root }/designated-agent/`, - DOMAIN_HELPER_PREFIX: `${ root }/domain-helper/?host=`, - DOMAIN_REGISTRATION_AGREEMENTS: `${ root }/domain-registration-agreements/`, - DOMAINS: `${ root }/domains`, - INCOMING_DOMAIN_TRANSFER_STATUSES_PENDING_CONFIRMATION: `${ root }/incoming-domain-transfer/status-and-failed-transfers/#confirmation`, - INCOMING_DOMAIN_TRANSFER_STATUSES_IN_PROGRESS: `${ root }/incoming-domain-transfer/status-and-failed-transfers/#pending`, - INCOMING_DOMAIN_TRANSFER_STATUSES_FAILED: `${ root }/incoming-domain-transfer/status-and-failed-transfers/#failed`, - INCOMING_DOMAIN_TRANSFER_STATUSES_CANCEL: `${ root }/incoming-domain-transfer/status-and-failed-transfers/#cancel`, - INCOMING_DOMAIN_TRANSFER: `${ root }/incoming-domain-transfer/`, - INCOMING_DOMAIN_TRANSFER_PREPARE_UNLOCK: `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#unlock`, - INCOMING_DOMAIN_TRANSFER_PREPARE_PRIVACY: `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#privacy`, - INCOMING_DOMAIN_TRANSFER_PREPARE_AUTH_CODE: `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#auth-code`, - EMAIL_FORWARDING: `${ root }/email-forwarding`, - EMAIL_VALIDATION_AND_VERIFICATION: `${ root }/domains/register-domain/#email-validation-and-verification`, - EMPTY_SITE: `${ root }/empty-site/`, - ENABLE_DISABLE_COMMENTS: `${ root }/enable-disable-comments`, - EVENTBRITE: `${ root }/eventbrite`, - EVENTBRITE_EVENT_CALENDARLISTING_WIDGET: `${ root }/widgets/eventbrite-event-calendarlisting-widget`, - EXPORT: `${ root }/export`, - FACEBOOK_EMBEDS: `${ root }/facebook-integration/facebook-embeds`, - FACEBOOK_LIKE_BOX: `${ root }/facebook-integration/#facebook-like-box`, - FOLLOWERS: `${ root }/followers`, - GETTING_MORE_VIEWS_AND_TRAFFIC: `${ root }/getting-more-views-and-traffic`, - GOOGLE_ANALYTICS: `${ root }/google-analytics`, - GOOGLE_APPS_LEARNING_CENTER: 'https://gsuite.google.com/learning-center/', - GOOGLE_PLUS_EMBEDS: `${ root }/google-plus-embeds`, - GRAVATAR_HOVERCARDS: `${ root }/gravatar-hovercards`, - GUIDED_TRANSFER: `${ root }/guided-transfer`, - IMPORT: `${ root }/import`, - INSTAGRAM_WIDGET: `${ root }/instagram/instagram-widget`, - JETPACK_SUPPORT: 'https://jetpack.com/support/', - JETPACK_CONTACT_SUPPORT: 'https://jetpack.com/contact-support/?rel=support', - JETPACK_SERVICE_VAULTPRESS: 'https://help.vaultpress.com/', - JETPACK_SERVICE_AKISMET: 'https://akismet.com/support/', - JETPACK_SERVICE_POLLDADDY: 'https://support.polldaddy.com/', - LIVE_CHAT: `${ root }/live-chat`, - MANAGE_PURCHASES: `${ root }/manage-purchases`, - MAP_EXISTING_DOMAIN: `${ root }/domains/map-existing-domain`, - MAP_EXISTING_DOMAIN_UPDATE_DNS: `${ root }/domains/map-existing-domain#2-ask-your-domain-provider-to-update-your-dns-settings`, - MAP_SUBDOMAIN: `${ root }/domains/map-subdomain`, - MEDIA: `${ root }/media`, - PUBLICIZE: `${ root }/publicize`, - PUBLIC_VS_PRIVATE: `${ root }/domains/register-domain/#public-versus-private`, - REFUNDS: `${ root }/refunds`, - REGISTER_DOMAIN: `${ root }/domains/register-domain/`, - SEO_TAGS: `${ root }/getting-more-views-and-traffic/#use-appropriate-tags`, - SETTING_PRIMARY_DOMAIN: `${ root }/domains/#setting-the-primary-domain`, - SETTING_UP_PREMIUM_SERVICES: `${ root }/setting-up-premium-services`, - STRONG_PASSWORD: `${ root }/selecting-a-strong-password/`, - SHARING: `${ root }/sharing`, - START: `${ root }/start`, - STATS_CLICKS: `${ root }/stats/#clicks`, - STATS_REFERRERS: `${ root }/stats/#referrers`, - STATS_SEO_TERMS: `${ root }/stats/#search-engine-terms`, - STATS_SPAM_REFERRER: `${ root }/stats/#marking-spam-referrers`, - STATS_TOP_POSTS_PAGES: `${ root }/stats/#top-posts-pages`, - STATS_VIEWS_BY_COUNTRY: `${ root }/stats/#views-by-country`, - SUPPORT_ROOT: `${ root }/`, - TRANSFER_DOMAIN_REGISTRATION: `${ root }/transfer-domain-registration`, - TWITTER_TIMELINE_WIDGET: `${ root }/widgets/twitter-timeline-widget`, - UPDATE_CONTACT_INFORMATION: `${ root }/update-contact-information/`, - UPDATE_NAMESERVERS: `${ root }/domains/domain-management/#update-nameservers`, - USERS: `${ root }/category/users`, - USER_ROLES: `${ root }/user-roles`, - VIDEOS: `${ root }/videos`, - WPCC: `${ root }/wpcc-faq`, -}; +export const ACCOUNT_RECOVERY = `${ root }/account-recovery`; +export const ADDING_GOOGLE_APPS_TO_YOUR_SITE = `${ root }/adding-g-suite-to-your-site`; +export const ADDING_USERS = `${ root }/adding-users`; +export const ALL_ABOUT_DOMAINS = `${ root }/all-about-domains`; +export const AUTO_RENEWAL = `${ root }/auto-renewal`; +export const BANDPAGE_WIDGET = `${ root }/widgets/bandpage-widget`; +export const CATEGORIES_VS_TAGS = `${ root }/posts/categories-vs-tags`; +export const CHANGE_NAME_SERVERS = `${ root }/domains/change-name-servers`; +export const CHANGE_NAME_SERVERS_FINDING_OUT_NEW_NS = `${ root }/domains/change-name-servers/#finding-out-your-new-name-server`; +export const COMMENTS = `${ root }/category/comments`; +export const COMMUNITY_TRANSLATOR = `${ root }/community-translator`; +export const COMPLETING_GOOGLE_APPS_SIGNUP = `${ root }/adding-g-suite-to-your-site/#completing-sign-up`; +export const CONCIERGE_SUPPORT = `${ root }/concierge-support`; +export const CONNECT = `${ root }/connect`; +export const CONTACT = `${ root }/contact`; +export const CALYPSO_CONTACT = '/help/contact'; +export const CALYPSO_COURSES = '/help/courses'; +export const CREATE = `${ root }/create`; +export const CUSTOM_DNS = `${ root }/domains/custom-dns`; +export const DESIGNATED_AGENT = `${ root }/designated-agent/`; +export const DOMAIN_HELPER_PREFIX = `${ root }/domain-helper/?host=`; +export const DOMAIN_REGISTRATION_AGREEMENTS = `${ root }/domain-registration-agreements/`; +export const DOMAINS = `${ root }/domains`; +export const INCOMING_DOMAIN_TRANSFER_STATUSES_PENDING_CONFIRMATION = `${ root }/incoming-domain-transfer/status-and-failed-transfers/#confirmation`; // eslint-disable-line max-len +export const INCOMING_DOMAIN_TRANSFER_STATUSES_IN_PROGRESS = `${ root }/incoming-domain-transfer/status-and-failed-transfers/#pending`; +export const INCOMING_DOMAIN_TRANSFER_STATUSES_FAILED = `${ root }/incoming-domain-transfer/status-and-failed-transfers/#failed`; +export const INCOMING_DOMAIN_TRANSFER_STATUSES_CANCEL = `${ root }/incoming-domain-transfer/status-and-failed-transfers/#cancel`; +export const INCOMING_DOMAIN_TRANSFER = `${ root }/incoming-domain-transfer/`; +export const INCOMING_DOMAIN_TRANSFER_PREPARE_UNLOCK = `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#unlock`; +export const INCOMING_DOMAIN_TRANSFER_PREPARE_PRIVACY = `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#privacy`; +export const INCOMING_DOMAIN_TRANSFER_PREPARE_AUTH_CODE = `${ root }/incoming-domain-transfer/prepare-domain-for-transfer/#auth-code`; +export const EMAIL_FORWARDING = `${ root }/email-forwarding`; +export const EMAIL_VALIDATION_AND_VERIFICATION = `${ root }/domains/register-domain/#email-validation-and-verification`; +export const EMPTY_SITE = `${ root }/empty-site/`; +export const ENABLE_DISABLE_COMMENTS = `${ root }/enable-disable-comments`; +export const EVENTBRITE = `${ root }/eventbrite`; +export const EVENTBRITE_EVENT_CALENDARLISTING_WIDGET = `${ root }/widgets/eventbrite-event-calendarlisting-widget`; +export const EXPORT = `${ root }/export`; +export const FACEBOOK_EMBEDS = `${ root }/facebook-integration/facebook-embeds`; +export const FACEBOOK_LIKE_BOX = `${ root }/facebook-integration/#facebook-like-box`; +export const FOLLOWERS = `${ root }/followers`; +export const GETTING_MORE_VIEWS_AND_TRAFFIC = `${ root }/getting-more-views-and-traffic`; +export const GOOGLE_ANALYTICS = `${ root }/google-analytics`; +export const GOOGLE_APPS_LEARNING_CENTER = 'https://gsuite.google.com/learning-center/'; +export const GOOGLE_PLUS_EMBEDS = `${ root }/google-plus-embeds`; +export const GRAVATAR_HOVERCARDS = `${ root }/gravatar-hovercards`; +export const GUIDED_TRANSFER = `${ root }/guided-transfer`; +export const IMPORT = `${ root }/import`; +export const INSTAGRAM_WIDGET = `${ root }/instagram/instagram-widget`; +export const JETPACK_SUPPORT = 'https://jetpack.com/support/'; +export const JETPACK_CONTACT_SUPPORT = 'https://jetpack.com/contact-support/?rel=support'; +export const JETPACK_SERVICE_VAULTPRESS = 'https://help.vaultpress.com/'; +export const JETPACK_SERVICE_AKISMET = 'https://akismet.com/support/'; +export const JETPACK_SERVICE_POLLDADDY = 'https://support.polldaddy.com/'; +export const LIVE_CHAT = `${ root }/live-chat`; +export const MANAGE_PURCHASES = `${ root }/manage-purchases`; +export const MAP_EXISTING_DOMAIN = `${ root }/domains/map-existing-domain`; +export const MAP_EXISTING_DOMAIN_UPDATE_DNS = `${ root }/domains/map-existing-domain#2-ask-your-domain-provider-to-update-your-dns-settings`; // eslint-disable-line max-len +export const MAP_SUBDOMAIN = `${ root }/domains/map-subdomain`; +export const MEDIA = `${ root }/media`; +export const PUBLICIZE = `${ root }/publicize`; +export const PUBLIC_VS_PRIVATE = `${ root }/domains/register-domain/#public-versus-private`; +export const REFUNDS = `${ root }/refunds`; +export const REGISTER_DOMAIN = `${ root }/domains/register-domain/`; +export const SEO_TAGS = `${ root }/getting-more-views-and-traffic/#use-appropriate-tags`; +export const SETTING_PRIMARY_DOMAIN = `${ root }/domains/#setting-the-primary-domain`; +export const SETTING_UP_PREMIUM_SERVICES = `${ root }/setting-up-premium-services`; +export const STRONG_PASSWORD = `${ root }/selecting-a-strong-password/`; +export const SHARING = `${ root }/sharing`; +export const START = `${ root }/start`; +export const STATS_CLICKS = `${ root }/stats/#clicks`; +export const STATS_REFERRERS = `${ root }/stats/#referrers`; +export const STATS_SEO_TERMS = `${ root }/stats/#search-engine-terms`; +export const STATS_SPAM_REFERRER = `${ root }/stats/#marking-spam-referrers`; +export const STATS_TOP_POSTS_PAGES = `${ root }/stats/#top-posts-pages`; +export const STATS_VIEWS_BY_COUNTRY = `${ root }/stats/#views-by-country`; +export const SUPPORT_ROOT = `${ root }/`; +export const TRANSFER_DOMAIN_REGISTRATION = `${ root }/transfer-domain-registration`; +export const TWITTER_TIMELINE_WIDGET = `${ root }/widgets/twitter-timeline-widget`; +export const UPDATE_CONTACT_INFORMATION = `${ root }/update-contact-information/`; +export const UPDATE_NAMESERVERS = `${ root }/domains/domain-management/#update-nameservers`; +export const USERS = `${ root }/category/users`; +export const USER_ROLES = `${ root }/user-roles`; +export const VIDEOS = `${ root }/videos`; +export const WPCC = `${ root }/wpcc-faq`; diff --git a/client/me/concierge/shared/primary-header.js b/client/me/concierge/shared/primary-header.js index 8d07107f21d0e..24d64244e2c59 100644 --- a/client/me/concierge/shared/primary-header.js +++ b/client/me/concierge/shared/primary-header.js @@ -12,7 +12,7 @@ import Card from 'components/card'; import FormattedHeader from 'components/formatted-header'; import ExternalLink from 'components/external-link'; import { localize } from 'i18n-calypso'; -import support from 'lib/url/support'; +import { CONCIERGE_SUPPORT } from 'lib/url/support'; class PrimaryHeader extends Component { render() { @@ -33,7 +33,7 @@ class PrimaryHeader extends Component { { translate( 'Learn more' ) } diff --git a/client/me/help/controller.js b/client/me/help/controller.js index ecfe44d06965a..feb24cdd49852 100644 --- a/client/me/help/controller.js +++ b/client/me/help/controller.js @@ -18,7 +18,7 @@ import config from 'config'; import HelpComponent from './main'; import CoursesComponent from './help-courses'; import ContactComponent from './help-contact'; -import support from 'lib/url/support'; +import { CONTACT, SUPPORT_ROOT } from 'lib/url/support'; import userUtils from 'lib/user/utils'; export default { @@ -30,10 +30,10 @@ export default { let url; switch ( context.path ) { case '/help': - url = support.SUPPORT_ROOT; + url = SUPPORT_ROOT; break; case '/help/contact': - url = support.CONTACT; + url = CONTACT; break; default: url = login( { redirectTo: window.location.href } ); diff --git a/client/me/purchases/cancel-purchase/refund-information.jsx b/client/me/purchases/cancel-purchase/refund-information.jsx index 290899f704906..ea0412e3372c4 100644 --- a/client/me/purchases/cancel-purchase/refund-information.jsx +++ b/client/me/purchases/cancel-purchase/refund-information.jsx @@ -15,7 +15,7 @@ import i18n from 'i18n-calypso'; import { getName, isRefundable, isSubscription, isOneTimePurchase } from 'lib/purchases'; import { isDomainRegistration, isDomainMapping } from 'lib/products-values'; import { getIncludedDomainPurchase } from 'state/purchases/selectors'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; const CancelPurchaseRefundInformation = ( { purchase, includedDomainPurchase } ) => { const { refundPeriodInDays } = purchase; @@ -98,7 +98,7 @@ const CancelPurchaseRefundInformation = ( { purchase, includedDomainPurchase } ) 'please {{contactLink}}contact support{{/contactLink}}.', { components: { - contactLink: , + contactLink: , }, } ) @@ -194,7 +194,7 @@ const CancelPurchaseRefundInformation = ( { purchase, includedDomainPurchase } ) 'Have a question? {{contactLink}}Ask a Happiness Engineer!{{/contactLink}}', { components: { - contactLink: , + contactLink: , }, } ) } diff --git a/client/me/purchases/confirm-cancel-domain/cancellation-reasons.js b/client/me/purchases/confirm-cancel-domain/cancellation-reasons.js index c03ddb110bfc7..61f9f7d59b068 100644 --- a/client/me/purchases/confirm-cancel-domain/cancellation-reasons.js +++ b/client/me/purchases/confirm-cancel-domain/cancellation-reasons.js @@ -10,7 +10,7 @@ import i18n from 'i18n-calypso'; /** * Internal Dependencies */ -import support from 'lib/url/support'; +import { TRANSFER_DOMAIN_REGISTRATION, UPDATE_NAMESERVERS } from 'lib/url/support'; export default [ { @@ -30,7 +30,7 @@ export default [ 'you’ll want to {{a}}update your name servers{{/a}} instead.', { components: { - a: , + a: , }, } ), @@ -44,13 +44,7 @@ export default [ 'please {{a}}use our transfer out feature{{/a}} if you want to use this domain again in the future.', { components: { - a: ( - - ), + a: , }, } ), diff --git a/client/me/purchases/manage-purchase/index.jsx b/client/me/purchases/manage-purchase/index.jsx index 940e729525326..ea51ec47047cd 100644 --- a/client/me/purchases/manage-purchase/index.jsx +++ b/client/me/purchases/manage-purchase/index.jsx @@ -77,7 +77,7 @@ import QueryUserPurchases from 'components/data/query-user-purchases'; import RemovePurchase from '../remove-purchase'; import VerticalNavItem from 'components/vertical-nav/item'; import paths from '../paths'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; import titles from 'me/purchases/titles'; import userFactory from 'lib/user'; import * as upgradesActions from 'lib/upgrades/actions'; @@ -237,7 +237,7 @@ class ManagePurchase extends Component { if ( isDomainRegistration( purchase ) ) { if ( isRenewal( purchase ) ) { text = translate( 'Contact Support to Cancel Domain and Refund' ); - link = support.CALYPSO_CONTACT; + link = CALYPSO_CONTACT; } else { text = translate( 'Cancel Domain and Refund' ); } diff --git a/client/me/purchases/manage-purchase/purchase-meta.jsx b/client/me/purchases/manage-purchase/purchase-meta.jsx index 0a0573e00d95c..f0e847fd496b9 100644 --- a/client/me/purchases/manage-purchase/purchase-meta.jsx +++ b/client/me/purchases/manage-purchase/purchase-meta.jsx @@ -36,7 +36,7 @@ import { getSelectedSite as getSelectedSiteSelector } from 'state/ui/selectors'; import { getUser } from 'state/users/selectors'; import paths from '../paths'; import PaymentLogo from 'components/payment-logo'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; import UserItem from 'components/user'; import { canEditPaymentDetails, @@ -266,7 +266,7 @@ class PurchaseMeta extends Component { siteSlug: this.props.selectedPurchase.domain, }, components: { - contactSupportLink: , + contactSupportLink: , }, } ) } diff --git a/client/me/purchases/purchases-site/reconnect-notice.jsx b/client/me/purchases/purchases-site/reconnect-notice.jsx index 7faf206e59950..dcab1c3d237cb 100644 --- a/client/me/purchases/purchases-site/reconnect-notice.jsx +++ b/client/me/purchases/purchases-site/reconnect-notice.jsx @@ -13,7 +13,7 @@ import React, { Component } from 'react'; */ import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT, JETPACK_CONTACT_SUPPORT } from 'lib/url/support'; class PurchaseReconnectNotice extends Component { static propTypes = { @@ -38,9 +38,7 @@ class PurchaseReconnectNotice extends Component { return ( - + { translate( 'Contact Support' ) } diff --git a/client/me/security-2fa-setup-backup-codes/index.jsx b/client/me/security-2fa-setup-backup-codes/index.jsx index 8ac051ca9ee26..253e6d37ce39d 100644 --- a/client/me/security-2fa-setup-backup-codes/index.jsx +++ b/client/me/security-2fa-setup-backup-codes/index.jsx @@ -14,7 +14,7 @@ import { localize } from 'i18n-calypso'; import Notice from 'components/notice'; import Security2faBackupCodesList from 'me/security-2fa-backup-codes-list'; import Security2faProgress from 'me/security-2fa-progress'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; import twoStepAuthorization from 'lib/two-step-authorization'; import { recordGoogleEvent } from 'state/analytics/actions'; @@ -66,7 +66,7 @@ class Security2faSetupBackupCodes extends React.Component { components: { supportLink: ( ), diff --git a/client/my-sites/checkout/checkout-thank-you/domain-mapping-details.jsx b/client/my-sites/checkout/checkout-thank-you/domain-mapping-details.jsx index 9981f4701b964..d4ee724e46977 100644 --- a/client/my-sites/checkout/checkout-thank-you/domain-mapping-details.jsx +++ b/client/my-sites/checkout/checkout-thank-you/domain-mapping-details.jsx @@ -11,7 +11,7 @@ import React from 'react'; */ import { localize } from 'i18n-calypso'; import PurchaseDetail from 'components/purchase-detail'; -import supportUrls from 'lib/url/support'; +import { MAP_EXISTING_DOMAIN } from 'lib/url/support'; const DomainMappingDetails = ( { domain, registrarSupportUrl, translate } ) => { const registrarSupportLink = registrarSupportUrl ? ( @@ -65,7 +65,7 @@ const DomainMappingDetails = ( { domain, registrarSupportUrl, translate } ) => { icon="cog" description={ description } buttonText={ translate( 'Learn more' ) } - href={ supportUrls.MAP_EXISTING_DOMAIN } + href={ MAP_EXISTING_DOMAIN } target="_blank" rel="noopener noreferrer" isRequired diff --git a/client/my-sites/checkout/checkout-thank-you/domain-registration-details.jsx b/client/my-sites/checkout/checkout-thank-you/domain-registration-details.jsx index ae82fd08d2d5d..d8a01a47fbcab 100644 --- a/client/my-sites/checkout/checkout-thank-you/domain-registration-details.jsx +++ b/client/my-sites/checkout/checkout-thank-you/domain-registration-details.jsx @@ -15,7 +15,7 @@ import { getDomainManagementUrl } from './utils'; import GoogleAppsDetails from './google-apps-details'; import { isGoogleApps } from 'lib/products-values'; import PurchaseDetail from 'components/purchase-detail'; -import supportUrls from 'lib/url/support'; +import { EMAIL_VALIDATION_AND_VERIFICATION, REGISTER_DOMAIN } from 'lib/url/support'; const DomainRegistrationDetails = ( { selectedSite, domain, purchases } ) => { const googleAppsWasPurchased = purchases.some( isGoogleApps ), @@ -36,7 +36,7 @@ const DomainRegistrationDetails = ( { selectedSite, domain, purchases } ) => { 'We sent you an email with a request to verify your new domain. Unverified domains may be suspended.' ) } buttonText={ i18n.translate( 'Learn more about verifying your domain' ) } - href={ supportUrls.EMAIL_VALIDATION_AND_VERIFICATION } + href={ EMAIL_VALIDATION_AND_VERIFICATION } target="_blank" rel="noopener noreferrer" requiredText={ i18n.translate( 'Important! Your action is required.' ) } @@ -54,7 +54,7 @@ const DomainRegistrationDetails = ( { selectedSite, domain, purchases } ) => { 'Your domain should start working immediately, but may be unreliable during the first 72 hours.' ) } buttonText={ i18n.translate( 'Learn more about your domain' ) } - href={ supportUrls.REGISTER_DOMAIN } + href={ REGISTER_DOMAIN } target="_blank" rel="noopener noreferrer" /> diff --git a/client/my-sites/checkout/checkout-thank-you/failed-purchase-details.jsx b/client/my-sites/checkout/checkout-thank-you/failed-purchase-details.jsx index 4f0c8b2a93c7b..94df7051b2132 100644 --- a/client/my-sites/checkout/checkout-thank-you/failed-purchase-details.jsx +++ b/client/my-sites/checkout/checkout-thank-you/failed-purchase-details.jsx @@ -11,7 +11,7 @@ import React from 'react'; */ import { localize } from 'i18n-calypso'; import PurchaseDetail from 'components/purchase-detail'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; const FailedPurchaseDetails = ( { failedPurchases, purchases, translate } ) => { const successfulPurchases = purchases.length > 0 && ( @@ -50,7 +50,7 @@ const FailedPurchaseDetails = ( { failedPurchases, purchases, translate } ) => { "If the problem persists, please don't hesitate to {{a}}contact support{{/a}}.", { components: { - a: , + a: , }, } ) } diff --git a/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx b/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx index 3fb21cdf7ae2c..0a234b37a5fb2 100644 --- a/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx +++ b/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx @@ -10,7 +10,7 @@ import i18n from 'i18n-calypso'; /** * Internal dependencies */ -import supportUrls from 'lib/url/support'; +import { GOOGLE_APPS_LEARNING_CENTER } from 'lib/url/support'; import PurchaseDetail from 'components/purchase-detail'; import userFactory from 'lib/user'; @@ -31,7 +31,7 @@ const GoogleAppsDetails = () => { link: ( diff --git a/client/my-sites/checkout/checkout-thank-you/guided-transfer-details.jsx b/client/my-sites/checkout/checkout-thank-you/guided-transfer-details.jsx index b5bc7889dddce..43f1f10f13d81 100644 --- a/client/my-sites/checkout/checkout-thank-you/guided-transfer-details.jsx +++ b/client/my-sites/checkout/checkout-thank-you/guided-transfer-details.jsx @@ -10,7 +10,7 @@ import { localize } from 'i18n-calypso'; /** * Internal dependencies */ -import supportUrls from 'lib/url/support'; +import { GUIDED_TRANSFER } from 'lib/url/support'; import PurchaseDetail from 'components/purchase-detail'; const GuidedTransferDetails = ( { translate } ) => ( @@ -23,7 +23,7 @@ const GuidedTransferDetails = ( { translate } ) => ( 'the transfer.' ) } buttonText={ translate( 'Learn more about Guided Transfers' ) } - href={ supportUrls.GUIDED_TRANSFER } + href={ GUIDED_TRANSFER } target="_blank" rel="noopener noreferrer" /> diff --git a/client/my-sites/checkout/checkout-thank-you/jetpack-thank-you-card.jsx b/client/my-sites/checkout/checkout-thank-you/jetpack-thank-you-card.jsx index 19ca6ab35b371..70f0b2509d806 100644 --- a/client/my-sites/checkout/checkout-thank-you/jetpack-thank-you-card.jsx +++ b/client/my-sites/checkout/checkout-thank-you/jetpack-thank-you-card.jsx @@ -23,7 +23,7 @@ import Spinner from 'components/spinner'; import Gridicon from 'gridicons'; import QueryPluginKeys from 'components/data/query-plugin-keys'; import analytics from 'lib/analytics'; -import support from 'lib/url/support'; +import { SETTING_UP_PREMIUM_SERVICES } from 'lib/url/support'; import { getSiteFileModDisableReason } from 'lib/site/utils'; import HappyChatButton from 'components/happychat/button'; @@ -549,7 +549,7 @@ class JetpackThankYouCard extends Component {

{ translate( 'You will have to {{link}}set up your plan manually{{/link}}.', { components: { - link: , + link: , }, } ) }

diff --git a/client/my-sites/checkout/checkout/checkout.jsx b/client/my-sites/checkout/checkout/checkout.jsx index 35bff8d25e409..043618d1723ab 100644 --- a/client/my-sites/checkout/checkout/checkout.jsx +++ b/client/my-sites/checkout/checkout/checkout.jsx @@ -22,7 +22,11 @@ import { cartItems } from 'lib/cart-values'; import { clearSitePlans } from 'state/sites/plans/actions'; import { clearPurchases } from 'state/purchases/actions'; import DomainDetailsForm from './domain-details-form'; -import { domainMapping } from 'lib/cart-values/cart-items'; +import { + domainMapping, + planItem as getCartItemForPlan, + themeItem, +} from 'lib/cart-values/cart-items'; import { fetchReceiptCompleted } from 'state/receipts/actions'; import { getExitCheckoutUrl } from 'lib/checkout'; import { hasDomainDetails } from 'lib/store-transactions'; @@ -36,22 +40,24 @@ import QueryStoredCards from 'components/data/query-stored-cards'; import QueryGeo from 'components/data/query-geo'; import SecurePaymentForm from './secure-payment-form'; import SecurePaymentFormPlaceholder from './secure-payment-form-placeholder'; -import supportPaths from 'lib/url/support'; -import { themeItem } from 'lib/cart-values/cart-items'; +import { AUTO_RENEWAL } from 'lib/url/support'; import { RECEIVED_WPCOM_RESPONSE, SUBMITTING_WPCOM_REQUEST, } from 'lib/store-transactions/step-types'; import upgradesActions from 'lib/upgrades/actions'; -import { getContactDetailsCache, isEligibleForCheckoutToChecklist } from 'state/selectors'; +import { + getContactDetailsCache, + getCurrentUserPaymentMethods, + isDomainOnlySite, + isEligibleForCheckoutToChecklist, +} from 'state/selectors'; import { getStoredCards } from 'state/stored-cards/selectors'; import { isValidFeatureKey, getUpgradePlanSlugFromPath } from 'lib/plans'; -import { planItem as getCartItemForPlan } from 'lib/cart-values/cart-items'; import { recordViewCheckout } from 'lib/analytics/ad-tracking'; import { recordApplePayStatus } from 'lib/apple-pay'; import { requestSite } from 'state/sites/actions'; import { isNewSite } from 'state/sites/selectors'; -import { isDomainOnlySite, getCurrentUserPaymentMethods } from 'state/selectors'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { getCurrentUserCountryCode } from 'state/current-user/selectors'; import { canAddGoogleApps } from 'lib/domains'; @@ -380,9 +386,7 @@ const Checkout = createReactClass( { productName: renewalItem.product_name, }, components: { - a: ( - - ), + a: , }, } ), diff --git a/client/my-sites/checkout/checkout/domain-details-form.jsx b/client/my-sites/checkout/checkout/domain-details-form.jsx index ab98140f3a21b..6684b1e6bc4bf 100644 --- a/client/my-sites/checkout/checkout/domain-details-form.jsx +++ b/client/my-sites/checkout/checkout/domain-details-form.jsx @@ -59,7 +59,7 @@ import GAppsFieldset from 'my-sites/domains/components/domain-form-fieldsets/g-a import RegionAddressFieldsets from 'my-sites/domains/components/domain-form-fieldsets/region-address-fieldsets'; import NoticeErrorMessage from 'my-sites/checkout/checkout/notice-error-message'; import notices from 'notices'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; const debug = debugFactory( 'calypso:my-sites:upgrades:checkout:domain-details' ); const wpcom = wp.undocumented(); @@ -482,7 +482,7 @@ export class DomainDetailsForm extends PureComponent { 'Please try again or {{contactSupportLink}}contact support{{/contactSupportLink}}.', { components: { - contactSupportLink: , + contactSupportLink: , firstErrorName: , }, comment: 'Validation error when filling out domain checkout contact details form', diff --git a/client/my-sites/checkout/checkout/terms-of-service.jsx b/client/my-sites/checkout/checkout/terms-of-service.jsx index c1a97a093ee54..4f084fbb70b1f 100644 --- a/client/my-sites/checkout/checkout/terms-of-service.jsx +++ b/client/my-sites/checkout/checkout/terms-of-service.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; * Internal dependencies */ import analytics from 'lib/analytics'; -import support from 'lib/url/support'; +import { AUTO_RENEWAL, MANAGE_PURCHASES } from 'lib/url/support'; import Gridicon from 'gridicons'; class TermsOfService extends React.Component { @@ -40,10 +40,10 @@ class TermsOfService extends React.Component { components: { tosLink: , autoRenewalSupportPage: ( - + ), managePurchasesSupportPage: ( - + ), }, } diff --git a/client/my-sites/domains/components/domain-warnings/pending-gapps-tos-notice.jsx b/client/my-sites/domains/components/domain-warnings/pending-gapps-tos-notice.jsx index a8507dd541882..c70133e3790e0 100644 --- a/client/my-sites/domains/components/domain-warnings/pending-gapps-tos-notice.jsx +++ b/client/my-sites/domains/components/domain-warnings/pending-gapps-tos-notice.jsx @@ -14,13 +14,13 @@ import { localize } from 'i18n-calypso'; */ import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; -import support from 'lib/url/support'; +import { COMPLETING_GOOGLE_APPS_SIGNUP } from 'lib/url/support'; import { domainManagementEmail } from 'my-sites/domains/paths'; import PendingGappsTosNoticeMultipleDomainListItem from './pending-gapps-tos-notice-multiple-domain-list-item'; import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; const learnMoreLink = ( - + ); const strong = ; diff --git a/client/my-sites/domains/components/domain-warnings/test/index.js b/client/my-sites/domains/components/domain-warnings/test/index.js index e651cc34a0877..1cbd0d4193288 100644 --- a/client/my-sites/domains/components/domain-warnings/test/index.js +++ b/client/my-sites/domains/components/domain-warnings/test/index.js @@ -19,7 +19,7 @@ import ReactDom from 'react-dom'; */ import { DomainWarnings } from '../'; import { type as domainTypes } from 'lib/domains/constants'; -import support from 'lib/url/support'; +import { MAP_EXISTING_DOMAIN_UPDATE_DNS, MAP_SUBDOMAIN } from 'lib/url/support'; jest.mock( 'lib/analytics', () => ( {} ) ); @@ -161,7 +161,7 @@ describe( 'index', () => { const domNode = ReactDom.findDOMNode( component ), links = [].slice.call( domNode.querySelectorAll( 'a' ) ); - assert( links.some( link => link.href === support.MAP_EXISTING_DOMAIN_UPDATE_DNS ) ); + assert( links.some( link => link.href === MAP_EXISTING_DOMAIN_UPDATE_DNS ) ); } ); test( 'should show a subdomain mapping related message for one misconfigured subdomain', () => { @@ -184,7 +184,7 @@ describe( 'index', () => { links = [].slice.call( domNode.querySelectorAll( 'a' ) ); expect( textContent ).to.contain( 'CNAME records should be configured' ); - assert( links.some( link => link.href === support.MAP_SUBDOMAIN ) ); + assert( links.some( link => link.href === MAP_SUBDOMAIN ) ); } ); test( 'should show a subdomain mapping related message for multiple misconfigured subdomains', () => { @@ -215,7 +215,7 @@ describe( 'index', () => { expect( textContent ).to.contain( "Some of your domains' CNAME records should be configured" ); - assert( links.some( link => link.href === support.MAP_SUBDOMAIN ) ); + assert( links.some( link => link.href === MAP_SUBDOMAIN ) ); } ); test( 'should show a subdomain mapping related message for multiple misconfigured subdomains and domains mixed', () => { @@ -246,7 +246,7 @@ describe( 'index', () => { expect( textContent ).to.contain( "Some of your domains' name server records should be configured" ); - assert( links.some( link => link.href === support.MAP_EXISTING_DOMAIN_UPDATE_DNS ) ); + assert( links.some( link => link.href === MAP_EXISTING_DOMAIN_UPDATE_DNS ) ); } ); } ); diff --git a/client/my-sites/domains/domain-management/components/designated-agent-notice/index.jsx b/client/my-sites/domains/domain-management/components/designated-agent-notice/index.jsx index 7cac444ba27b5..3b5473a4ebfa6 100644 --- a/client/my-sites/domains/domain-management/components/designated-agent-notice/index.jsx +++ b/client/my-sites/domains/domain-management/components/designated-agent-notice/index.jsx @@ -11,7 +11,7 @@ import Gridicon from 'gridicons'; /** * Internal Dependencies */ -import support from 'lib/url/support'; +import { DESIGNATED_AGENT, DOMAIN_REGISTRATION_AGREEMENTS } from 'lib/url/support'; const DesignatedAgentNotice = props => (
@@ -30,14 +30,12 @@ const DesignatedAgentNotice = props => ( strong: , draLink: ( ), - supportLink: ( - - ), + supportLink: , }, } ) } diff --git a/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx b/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx index ff87053f01d9f..b488f51aa1a9c 100644 --- a/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx +++ b/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import support from 'lib/url/support'; +import { EMAIL_VALIDATION_AND_VERIFICATION } from 'lib/url/support'; import upgradesActions from 'lib/upgrades/actions'; import { errorNotice } from 'state/notices/actions'; import { domainManagementEditContactInfo } from 'my-sites/domains/paths'; @@ -45,7 +45,7 @@ class IcannVerificationCard extends React.Component { components: { learnMoreLink: ( diff --git a/client/my-sites/domains/domain-management/components/inbound-transfer-verification/index.jsx b/client/my-sites/domains/domain-management/components/inbound-transfer-verification/index.jsx index e887585e1bbaf..b77ee461f85f5 100644 --- a/client/my-sites/domains/domain-management/components/inbound-transfer-verification/index.jsx +++ b/client/my-sites/domains/domain-management/components/inbound-transfer-verification/index.jsx @@ -1,7 +1,9 @@ /** * External dependencies * + * @format */ + import PropTypes from 'prop-types'; import React from 'react'; import { localize } from 'i18n-calypso'; @@ -11,7 +13,7 @@ import { localize } from 'i18n-calypso'; */ import EmailVerificationCard from 'my-sites/domains/domain-management/components/email-verification'; import { resendInboundTransferEmail } from 'lib/domains'; -import support from 'lib/url/support'; +import { INCOMING_DOMAIN_TRANSFER_STATUSES_IN_PROGRESS } from 'lib/url/support'; import Card from 'components/card'; class InboundTransferEmailVerificationCard extends React.PureComponent { @@ -30,14 +32,12 @@ class InboundTransferEmailVerificationCard extends React.PureComponent {

- { translate( - 'The authorization email is still waiting to be sent.' - ) } + { translate( 'The authorization email is still waiting to be sent.' ) }

{ translate( - 'The contact address for this domain wasn\'t immediately available. ' + - 'We will keep checking and send the email to initiate the transfer once we have the ' + - 'correct address. This could take up to 24 hours. We appreciate your patience.' + "The contact address for this domain wasn't immediately available. " + + 'We will keep checking and send the email to initiate the transfer once we have the ' + + 'correct address. This could take up to 24 hours. We appreciate your patience.' ) }
@@ -49,13 +49,11 @@ class InboundTransferEmailVerificationCard extends React.PureComponent {

- { translate( - 'The authorization email will be sent shortly.' - ) } + { translate( 'The authorization email will be sent shortly.' ) }

{ translate( "We'll let you know which mailbox to check as soon as the email is sent. " + - 'Check again in a few minutes.' + 'Check again in a few minutes.' ) }
@@ -66,15 +64,11 @@ class InboundTransferEmailVerificationCard extends React.PureComponent { diff --git a/client/my-sites/domains/domain-management/contacts-privacy/card.jsx b/client/my-sites/domains/domain-management/contacts-privacy/card.jsx index feb51f8143915..b0835f866112b 100644 --- a/client/my-sites/domains/domain-management/contacts-privacy/card.jsx +++ b/client/my-sites/domains/domain-management/contacts-privacy/card.jsx @@ -19,7 +19,7 @@ import { domainManagementTransferOut, } from 'my-sites/domains/paths'; import SectionHeader from 'components/section-header'; -import support from 'lib/url/support'; +import { PUBLIC_VS_PRIVATE } from 'lib/url/support'; class ContactsPrivacyCard extends React.PureComponent { static propTypes = { @@ -45,13 +45,7 @@ class ContactsPrivacyCard extends React.PureComponent { '{{a}}Learn more.{{/a}}', { components: { - a: ( -
- ), + a: , }, } ) } diff --git a/client/my-sites/domains/domain-management/edit-contact-info/form-card.jsx b/client/my-sites/domains/domain-management/edit-contact-info/form-card.jsx index c521aede115e3..23f462d304259 100644 --- a/client/my-sites/domains/domain-management/edit-contact-info/form-card.jsx +++ b/client/my-sites/domains/domain-management/edit-contact-info/form-card.jsx @@ -29,7 +29,7 @@ import { domainManagementContactsPrivacy } from 'my-sites/domains/paths'; import upgradesActions from 'lib/upgrades/actions'; import wp from 'lib/wp'; import { successNotice } from 'state/notices/actions'; -import support from 'lib/url/support'; +import { UPDATE_CONTACT_INFORMATION } from 'lib/url/support'; import { registrar as registrarNames } from 'lib/domains/constants'; import DesignatedAgentNotice from 'my-sites/domains/domain-management/components/designated-agent-notice'; import Dialog from 'components/dialog'; @@ -196,7 +196,7 @@ class EditContactInfoFormCard extends React.Component { components: { link: ( diff --git a/client/my-sites/domains/domain-management/edit-contact-info/pending-whois-update-card.jsx b/client/my-sites/domains/domain-management/edit-contact-info/pending-whois-update-card.jsx index db39439b9d6c2..366a83c1af9f5 100644 --- a/client/my-sites/domains/domain-management/edit-contact-info/pending-whois-update-card.jsx +++ b/client/my-sites/domains/domain-management/edit-contact-info/pending-whois-update-card.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; */ import Card from 'components/card'; import Notice from 'components/notice'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; function PendingWhoisUpdateCard( { translate } ) { return ( @@ -28,7 +28,7 @@ function PendingWhoisUpdateCard( { translate } ) { '{{supporta}}support page{{/supporta}} or {{a}}contact support{{/a}}.', { components: { - a: , + a: , supporta: ( , + a: , }, } ) } diff --git a/client/my-sites/domains/domain-management/edit/transfer.jsx b/client/my-sites/domains/domain-management/edit/transfer.jsx index dfc9c3d3181fe..1bf159e7bc7e2 100644 --- a/client/my-sites/domains/domain-management/edit/transfer.jsx +++ b/client/my-sites/domains/domain-management/edit/transfer.jsx @@ -18,7 +18,7 @@ import Property from './card/property'; import SubscriptionSettings from './card/subscription-settings'; import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; import { transferStatus } from 'lib/domains/constants'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT, INCOMING_DOMAIN_TRANSFER_STATUSES_FAILED } from 'lib/url/support'; import { restartInboundTransfer } from 'lib/domains'; import { fetchDomains } from 'lib/upgrades/actions'; import { errorNotice, successNotice } from 'state/notices/actions'; @@ -139,7 +139,7 @@ class Transfer extends React.PureComponent { strong: , a: ( @@ -163,7 +163,7 @@ class Transfer extends React.PureComponent { diff --git a/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-add-new.jsx b/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-add-new.jsx index 90fb07b5216ff..248f8e7c72b2d 100644 --- a/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-add-new.jsx +++ b/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-add-new.jsx @@ -14,7 +14,7 @@ import createReactClass from 'create-react-class'; * Internal dependencies */ import EmailForwardingLimit from './email-forwarding-limit'; -import { emailForwardingPlanLimit } from 'lib/domains/email-forwarding'; +import { emailForwardingPlanLimit, validateAllFields } from 'lib/domains/email-forwarding'; import FormButton from 'components/forms/form-button'; import FormFieldset from 'components/forms/form-fieldset'; import FormFooter from 'my-sites/domains/domain-management/components/form-footer'; @@ -26,8 +26,7 @@ import formState from 'lib/form-state'; import analyticsMixin from 'lib/mixins/analytics'; import notices from 'notices'; import * as upgradesActions from 'lib/upgrades/actions'; -import { validateAllFields } from 'lib/domains/email-forwarding'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; const EmailForwardingAddNew = createReactClass( { displayName: 'EmailForwardingAddNew', @@ -106,7 +105,7 @@ const EmailForwardingAddNew = createReactClass( { 'Failed to add email forwarding record. Please try again or {{contactSupportLink}}contact support{{/contactSupportLink}}.', { components: { - contactSupportLink: , + contactSupportLink: , }, } ) diff --git a/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-details.jsx b/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-details.jsx index 083bba3dc7704..50da99e280a6e 100644 --- a/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-details.jsx +++ b/client/my-sites/domains/domain-management/email-forwarding/email-forwarding-details.jsx @@ -13,7 +13,7 @@ import { localize } from 'i18n-calypso'; /** * Internal dependencies */ -import support from 'lib/url/support'; +import { EMAIL_FORWARDING } from 'lib/url/support'; import analyticsMixin from 'lib/mixins/analytics'; const EmailForwardingDetails = createReactClass( { @@ -27,7 +27,7 @@ const EmailForwardingDetails = createReactClass( { 'Email Forwarding lets you use your custom domain in your email address, so your email address can be just as memorable as your blog.' ) }{' '} , + contactSupportLink: , }, } ) @@ -81,7 +81,7 @@ const EmailForwardingItem = createReactClass( { 'Failed to resend verification email for email forwarding record. Please try again or {{contactSupportLink}}contact support{{/contactSupportLink}}.', { components: { - contactSupportLink: , + contactSupportLink: , }, } ) diff --git a/client/my-sites/domains/domain-management/email/google-apps-users-card.jsx b/client/my-sites/domains/domain-management/email/google-apps-users-card.jsx index 6794838b21407..65c7ff802e5cb 100644 --- a/client/my-sites/domains/domain-management/email/google-apps-users-card.jsx +++ b/client/my-sites/domains/domain-management/email/google-apps-users-card.jsx @@ -22,7 +22,7 @@ import analyticsMixin from 'lib/mixins/analytics'; import SectionHeader from 'components/section-header'; import GoogleAppsUserItem from './google-apps-user-item'; import { getSelectedDomain, hasPendingGoogleAppsUsers } from 'lib/domains'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; const GoogleAppsUsers = createReactClass( { displayName: 'GoogleAppsUsers', @@ -96,7 +96,7 @@ const GoogleAppsUsers = createReactClass( { let status = 'is-warning', text = user.error, supportLink = ( - + { this.props.translate( 'Please contact support' ) } ); diff --git a/client/my-sites/domains/domain-management/name-servers/custom-nameservers-form.jsx b/client/my-sites/domains/domain-management/name-servers/custom-nameservers-form.jsx index c0fe03b18fc47..7aa363e243a35 100644 --- a/client/my-sites/domains/domain-management/name-servers/custom-nameservers-form.jsx +++ b/client/my-sites/domains/domain-management/name-servers/custom-nameservers-form.jsx @@ -19,7 +19,7 @@ import FormFooter from 'my-sites/domains/domain-management/components/form-foote import CustomNameserversRow from './custom-nameservers-row'; import { change, remove } from 'lib/domains/nameservers'; import Notice from 'components/notice'; -import support from 'lib/url/support'; +import { CHANGE_NAME_SERVERS, CHANGE_NAME_SERVERS_FINDING_OUT_NEW_NS } from 'lib/url/support'; import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; const MIN_NAMESERVER_LENGTH = 2; @@ -44,7 +44,7 @@ class CustomNameserversForm extends React.PureComponent { 'WordPress.com site to load & other features to be available.' ) }{' '} { translate( 'Not sure what name servers to use?' ) }{' '} diff --git a/client/my-sites/domains/domain-management/privacy-protection/card/content.jsx b/client/my-sites/domains/domain-management/privacy-protection/card/content.jsx index dd2b116dd95fd..12cdf4a3f395a 100644 --- a/client/my-sites/domains/domain-management/privacy-protection/card/content.jsx +++ b/client/my-sites/domains/domain-management/privacy-protection/card/content.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; * Internal dependencies */ import AddButton from './add-button'; -import support from 'lib/url/support'; +import { PUBLIC_VS_PRIVATE } from 'lib/url/support'; class Content extends React.PureComponent { static propTypes = { @@ -32,7 +32,7 @@ class Content extends React.PureComponent { { translate( "With Privacy Protection, we show our partner's contact information instead of your own." ) } - + { translate( 'Learn more.' ) }

diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/icann-verification.jsx b/client/my-sites/domains/domain-management/transfer/transfer-out/icann-verification.jsx index 8f1c79cc3079c..ba9466942fa3f 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/icann-verification.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/icann-verification.jsx @@ -15,7 +15,7 @@ import SectionHeader from 'components/section-header'; import { resendIcannVerification } from 'lib/upgrades/actions/domain-management'; import Button from 'components/button'; import notices from 'notices'; -import support from 'lib/url/support'; +import { TRANSFER_DOMAIN_REGISTRATION } from 'lib/url/support'; class IcannVerification extends React.Component { state = { @@ -61,7 +61,7 @@ class IcannVerification extends React.Component { components: { learnMoreLink: ( diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/locked.jsx b/client/my-sites/domains/domain-management/transfer/transfer-out/locked.jsx index 034c16b6da70e..23e4931df515a 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/locked.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/locked.jsx @@ -16,7 +16,7 @@ import { getSelectedDomain } from 'lib/domains'; import Button from 'components/button'; import { requestTransferCode } from 'lib/upgrades/actions'; import { displayRequestTransferCodeResponseNotice } from './shared'; -import support from 'lib/url/support'; +import { TRANSFER_DOMAIN_REGISTRATION } from 'lib/url/support'; class Locked extends React.Component { state = { @@ -74,11 +74,7 @@ class Locked extends React.Component { 'Your contact information will be publicly available during the transfer period.' ) : translate( 'To transfer your domain, we must unlock it.' ) }{' '} - + { translate( 'Learn More.' ) }

diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/shared.js b/client/my-sites/domains/domain-management/transfer/transfer-out/shared.js index e62400899351e..855ee60a44b47 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/shared.js +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/shared.js @@ -11,7 +11,7 @@ import { translate } from 'i18n-calypso'; * Internal dependencies */ import notices from 'notices'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT } from 'lib/url/support'; export const displayResponseError = responseError => { const errorMessages = { @@ -38,7 +38,7 @@ export const displayResponseError = responseError => { args: errorMessages[ responseError.error ], components: { strong: , - a: , + a: , }, } ) @@ -51,7 +51,7 @@ export const displayResponseError = responseError => { 'to have trouble.', { components: { - a: , + a: , }, } ) diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/transfer-prohibited.jsx b/client/my-sites/domains/domain-management/transfer/transfer-out/transfer-prohibited.jsx index 6405a8830b4dd..ae6bb8954d776 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/transfer-prohibited.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/transfer-prohibited.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; */ import Card from 'components/card'; import SectionHeader from 'components/section-header'; -import support from 'lib/url/support'; +import { TRANSFER_DOMAIN_REGISTRATION } from 'lib/url/support'; const TransferProhibited = ( { translate } ) => (
@@ -27,7 +27,7 @@ const TransferProhibited = ( { translate } ) => ( components: { learnMoreLink: ( diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/unlocked.jsx b/client/my-sites/domains/domain-management/transfer/transfer-out/unlocked.jsx index c5e7b8b105d86..67324933208a4 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/unlocked.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/unlocked.jsx @@ -18,7 +18,7 @@ import Button from 'components/button'; import { requestTransferCode, cancelTransferRequest } from 'lib/upgrades/actions'; import notices from 'notices'; import { displayRequestTransferCodeResponseNotice } from './shared'; -import support from 'lib/url/support'; +import { CALYPSO_CONTACT, TRANSFER_DOMAIN_REGISTRATION } from 'lib/url/support'; class Unlocked extends React.Component { state = { @@ -71,7 +71,7 @@ class Unlocked extends React.Component { if ( error ) { const contactLink = ( - + ); let errorMessage; @@ -294,11 +294,7 @@ class Unlocked extends React.Component { { submitting &&

{ translate( 'Sending request…' ) }

} { domainStateMessage &&

{ domainStateMessage }

} { this.renderBody( domain ) } -
+ { translate( 'Learn More.' ) }
diff --git a/client/my-sites/exporter/guided-transfer-card/in-progress.jsx b/client/my-sites/exporter/guided-transfer-card/in-progress.jsx index e11b22b501366..1ac633d1ada77 100644 --- a/client/my-sites/exporter/guided-transfer-card/in-progress.jsx +++ b/client/my-sites/exporter/guided-transfer-card/in-progress.jsx @@ -13,7 +13,7 @@ import Gridicon from 'gridicons'; */ import Button from 'components/button'; import Card from 'components/card'; -import supportUrls from 'lib/url/support'; +import { GUIDED_TRANSFER } from 'lib/url/support'; const GuidedTransferInProgress = ( { translate } ) => ( @@ -29,9 +29,7 @@ const GuidedTransferInProgress = ( { translate } ) => ( 'will work with you to set up a day to perform the transfer.' ) }

- +
); diff --git a/client/my-sites/exporter/guided-transfer-card/index.jsx b/client/my-sites/exporter/guided-transfer-card/index.jsx index 69b461113bb9e..fb1ce601ca52a 100644 --- a/client/my-sites/exporter/guided-transfer-card/index.jsx +++ b/client/my-sites/exporter/guided-transfer-card/index.jsx @@ -23,7 +23,7 @@ import { getSiteSlug } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getProductDisplayCost } from 'state/products-list/selectors'; import InfoPopover from 'components/info-popover'; -import SUPPORT_URLS from 'lib/url/support'; +import { GUIDED_TRANSFER } from 'lib/url/support'; const Feature = ( { children } ) => (
  • @@ -97,7 +97,7 @@ class GuidedTransferCard extends Component { { components: { strong: } } ) }
    - { translate( 'Learn more.' ) } + { translate( 'Learn more.' ) }