Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in JS packages

This commit is contained in:
RJChow 2022-03-31 20:36:08 +08:00
parent 09a0d2568e
commit 12a818c04d
56 changed files with 215 additions and 292 deletions

View File

@ -59,7 +59,7 @@ const getScreenReaderText = ( {
/* translators: Sentence fragment describing a product attribute match. Example: "Color Is Not Blue" - attribute = Color, equals = Is Not, value = Blue */ /* translators: Sentence fragment describing a product attribute match. Example: "Color Is Not Blue" - attribute = Color, equals = Is Not, value = Blue */
mixedString: __( mixedString: __(
'{{attribute /}} {{equals /}} {{value /}}', '{{attribute /}} {{equals /}} {{value /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
attribute: <Fragment>{ attributeName }</Fragment>, attribute: <Fragment>{ attributeName }</Fragment>,
@ -202,14 +202,14 @@ const AttributeFilter = ( props ) => {
type="attributes" type="attributes"
placeholder={ __( placeholder={ __(
'Attribute name', 'Attribute name',
'woocommerce-admin' 'woocommerce'
) } ) }
multiple={ false } multiple={ false }
selected={ selectedAttribute } selected={ selectedAttribute }
inlineTags inlineTags
aria-label={ __( aria-label={ __(
'Attribute name', 'Attribute name',
'woocommerce-admin' 'woocommerce'
) } ) }
/> />
) : ( ) : (
@ -225,7 +225,7 @@ const AttributeFilter = ( props ) => {
className="woocommerce-filters-advanced__input woocommerce-search" className="woocommerce-filters-advanced__input woocommerce-search"
placeholder={ __( placeholder={ __(
'Attribute value', 'Attribute value',
'woocommerce-admin' 'woocommerce'
) } ) }
inlineTags inlineTags
isSearchable isSearchable

View File

@ -16,8 +16,8 @@ import moment from 'moment';
import DatePicker from '../calendar/date-picker'; import DatePicker from '../calendar/date-picker';
import { textContent } from './utils'; import { textContent } from './utils';
const dateStringFormat = __( 'MMM D, YYYY', 'woocommerce-admin' ); const dateStringFormat = __( 'MMM D, YYYY', 'woocommerce' );
const dateFormat = __( 'MM/DD/YYYY', 'woocommerce-admin' ); const dateFormat = __( 'MM/DD/YYYY', 'woocommerce' );
class DateFilter extends Component { class DateFilter extends Component {
constructor( { filter } ) { constructor( { filter } ) {
@ -48,7 +48,7 @@ class DateFilter extends Component {
return _x( return _x(
'{{after /}}{{span}} and {{/span}}{{before /}}', '{{after /}}{{span}} and {{/span}}{{before /}}',
'Date range inputs arranged on a single line', 'Date range inputs arranged on a single line',
'woocommerce-admin' 'woocommerce'
); );
} }

View File

@ -32,8 +32,8 @@ import AdvancedFilterItem from './item';
import { Text } from '../experimental'; import { Text } from '../experimental';
const matches = [ const matches = [
{ value: 'all', label: __( 'All', 'woocommerce-admin' ) }, { value: 'all', label: __( 'All', 'woocommerce' ) },
{ value: 'any', label: __( 'Any', 'woocommerce-admin' ) }, { value: 'any', label: __( 'Any', 'woocommerce' ) },
]; ];
/** /**
@ -154,7 +154,7 @@ class AdvancedFilters extends Component {
onChange={ this.onMatchChange } onChange={ this.onMatchChange }
aria-label={ __( aria-label={ __(
'Choose to apply any or all filters', 'Choose to apply any or all filters',
'woocommerce-admin' 'woocommerce'
) } ) }
/> />
), ),
@ -330,10 +330,7 @@ class AdvancedFilters extends Component {
aria-expanded={ isOpen } aria-expanded={ isOpen }
> >
<AddOutlineIcon /> <AddOutlineIcon />
{ __( { __( 'Add a Filter', 'woocommerce' ) }
'Add a Filter',
'woocommerce-admin'
) }
</Button> </Button>
) } ) }
renderContent={ ( { onClose } ) => ( renderContent={ ( { onClose } ) => (
@ -364,7 +361,7 @@ class AdvancedFilters extends Component {
<div className="woocommerce-filters-advanced__controls"> <div className="woocommerce-filters-advanced__controls">
{ updateDisabled && ( { updateDisabled && (
<Button isPrimary disabled> <Button isPrimary disabled>
{ __( 'Filter', 'woocommerce-admin' ) } { __( 'Filter', 'woocommerce' ) }
</Button> </Button>
) } ) }
{ ! updateDisabled && ( { ! updateDisabled && (
@ -374,7 +371,7 @@ class AdvancedFilters extends Component {
href={ updateHref } href={ updateHref }
onClick={ this.onFilter } onClick={ this.onFilter }
> >
{ __( 'Filter', 'woocommerce-admin' ) } { __( 'Filter', 'woocommerce' ) }
</Link> </Link>
) } ) }
{ activeFilters.length > 0 && ( { activeFilters.length > 0 && (
@ -383,10 +380,7 @@ class AdvancedFilters extends Component {
href={ this.getUpdateHref( [] ) } href={ this.getUpdateHref( [] ) }
onClick={ this.clearFilters } onClick={ this.clearFilters }
> >
{ __( { __( 'Clear all filters', 'woocommerce' ) }
'Clear all filters',
'woocommerce-admin'
) }
</Link> </Link>
) } ) }
</div> </div>

View File

@ -21,7 +21,7 @@ class NumberFilter extends Component {
return _x( return _x(
'{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}', '{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}',
'Numerical range inputs arranged on a single line', 'Numerical range inputs arranged on a single line',
'woocommerce-admin' 'woocommerce'
); );
} }
@ -151,7 +151,7 @@ class NumberFilter extends Component {
labelFormat = _x( labelFormat = _x(
'%(field)s maximum amount', '%(field)s maximum amount',
'maximum value input', 'maximum value input',
'woocommerce-admin' 'woocommerce'
); );
} else { } else {
/* eslint-disable-next-line max-len */ /* eslint-disable-next-line max-len */
@ -159,7 +159,7 @@ class NumberFilter extends Component {
labelFormat = _x( labelFormat = _x(
'%(field)s minimum amount', '%(field)s minimum amount',
'minimum value input', 'minimum value input',
'woocommerce-admin' 'woocommerce'
); );
} }
@ -207,7 +207,7 @@ class NumberFilter extends Component {
label: sprintf( label: sprintf(
/* eslint-disable-next-line max-len */ /* eslint-disable-next-line max-len */
/* translators: Sentence fragment, "range start" refers to the first of two numeric values the field must be between. Screenshot for context: https://cloudup.com/cmv5CLyMPNQ */ /* translators: Sentence fragment, "range start" refers to the first of two numeric values the field must be between. Screenshot for context: https://cloudup.com/cmv5CLyMPNQ */
__( '%(field)s range start', 'woocommerce-admin' ), __( '%(field)s range start', 'woocommerce' ),
{ field: get( config, [ 'labels', 'add' ] ) } { field: get( config, [ 'labels', 'add' ] ) }
), ),
onChange: rangeStartOnChange, onChange: rangeStartOnChange,
@ -220,7 +220,7 @@ class NumberFilter extends Component {
label: sprintf( label: sprintf(
/* eslint-disable-next-line max-len */ /* eslint-disable-next-line max-len */
/* translators: Sentence fragment, "range end" refers to the second of two numeric values the field must be between. Screenshot for context: https://cloudup.com/cmv5CLyMPNQ */ /* translators: Sentence fragment, "range end" refers to the second of two numeric values the field must be between. Screenshot for context: https://cloudup.com/cmv5CLyMPNQ */
__( '%(field)s range end', 'woocommerce-admin' ), __( '%(field)s range end', 'woocommerce' ),
{ field: get( config, [ 'labels', 'add' ] ) } { field: get( config, [ 'labels', 'add' ] ) }
), ),
onChange: rangeEndOnChange, onChange: rangeEndOnChange,

View File

@ -96,12 +96,12 @@ class DatePicker extends Component {
onChange={ this.onInputChange } onChange={ this.onInputChange }
onBlur={ partial( this.handleBlur, isOpen, onToggle ) } onBlur={ partial( this.handleBlur, isOpen, onToggle ) }
dateFormat={ dateFormat } dateFormat={ dateFormat }
label={ __( 'Choose a date', 'woocommerce-admin' ) } label={ __( 'Choose a date', 'woocommerce' ) }
error={ error } error={ error }
describedBy={ sprintf( describedBy={ sprintf(
__( __(
'Date input describing a selected date in format %s', 'Date input describing a selected date in format %s',
'woocommerce-admin' 'woocommerce'
), ),
dateFormat dateFormat
) } ) }
@ -118,7 +118,7 @@ class DatePicker extends Component {
renderContent={ ( { onToggle } ) => ( renderContent={ ( { onToggle } ) => (
<Section component={ false }> <Section component={ false }>
<H className="woocommerce-calendar__date-picker-title"> <H className="woocommerce-calendar__date-picker-title">
{ __( 'select a date', 'woocommerce-admin' ) } { __( 'select a date', 'woocommerce' ) }
</H> </H>
<div className="woocommerce-calendar__react-dates is-core-datepicker"> <div className="woocommerce-calendar__react-dates is-core-datepicker">
<WpDatePicker <WpDatePicker

View File

@ -191,30 +191,30 @@ class DateRange extends Component {
value={ afterText } value={ afterText }
onChange={ partial( this.onInputChange, 'after' ) } onChange={ partial( this.onInputChange, 'after' ) }
dateFormat={ shortDateFormat } dateFormat={ shortDateFormat }
label={ __( 'Start Date', 'woocommerce-admin' ) } label={ __( 'Start Date', 'woocommerce' ) }
error={ afterError } error={ afterError }
describedBy={ sprintf( describedBy={ sprintf(
__( __(
"Date input describing a selected date range's start date in format %s", "Date input describing a selected date range's start date in format %s",
'woocommerce-admin' 'woocommerce'
), ),
shortDateFormat shortDateFormat
) } ) }
onFocus={ () => this.onFocusChange( 'startDate' ) } onFocus={ () => this.onFocusChange( 'startDate' ) }
/> />
<div className="woocommerce-calendar__inputs-to"> <div className="woocommerce-calendar__inputs-to">
{ __( 'to', 'woocommerce-admin' ) } { __( 'to', 'woocommerce' ) }
</div> </div>
<DateInput <DateInput
value={ beforeText } value={ beforeText }
onChange={ partial( this.onInputChange, 'before' ) } onChange={ partial( this.onInputChange, 'before' ) }
dateFormat={ shortDateFormat } dateFormat={ shortDateFormat }
label={ __( 'End Date', 'woocommerce-admin' ) } label={ __( 'End Date', 'woocommerce' ) }
error={ beforeError } error={ beforeError }
describedBy={ sprintf( describedBy={ sprintf(
__( __(
"Date input describing a selected date range's end date in format %s", "Date input describing a selected date range's end date in format %s",
'woocommerce-admin' 'woocommerce'
), ),
shortDateFormat shortDateFormat
) } ) }

View File

@ -4,61 +4,55 @@
import { __, sprintf } from '@wordpress/i18n'; import { __, sprintf } from '@wordpress/i18n';
export default { export default {
calendarLabel: __( 'Calendar', 'woocommerce-admin' ), calendarLabel: __( 'Calendar', 'woocommerce' ),
closeDatePicker: __( 'Close', 'woocommerce-admin' ), closeDatePicker: __( 'Close', 'woocommerce' ),
focusStartDate: __( focusStartDate: __(
'Interact with the calendar and select start and end dates.', 'Interact with the calendar and select start and end dates.',
'woocommerce-admin' 'woocommerce'
), ),
clearDate: __( 'Clear Date', 'woocommerce-admin' ), clearDate: __( 'Clear Date', 'woocommerce' ),
clearDates: __( 'Clear Dates', 'woocommerce-admin' ), clearDates: __( 'Clear Dates', 'woocommerce' ),
jumpToPrevMonth: __( jumpToPrevMonth: __(
'Move backward to switch to the previous month.', 'Move backward to switch to the previous month.',
'woocommerce-admin' 'woocommerce'
), ),
jumpToNextMonth: __( jumpToNextMonth: __(
'Move forward to switch to the next month.', 'Move forward to switch to the next month.',
'woocommerce-admin' 'woocommerce'
), ),
enterKey: __( 'Enter key', 'woocommerce-admin' ), enterKey: __( 'Enter key', 'woocommerce' ),
leftArrowRightArrow: __( 'Right and left arrow keys', 'woocommerce-admin' ), leftArrowRightArrow: __( 'Right and left arrow keys', 'woocommerce' ),
upArrowDownArrow: __( 'up and down arrow keys', 'woocommerce-admin' ), upArrowDownArrow: __( 'up and down arrow keys', 'woocommerce' ),
pageUpPageDown: __( 'page up and page down keys', 'woocommerce-admin' ), pageUpPageDown: __( 'page up and page down keys', 'woocommerce' ),
homeEnd: __( 'Home and end keys', 'woocommerce-admin' ), homeEnd: __( 'Home and end keys', 'woocommerce' ),
escape: __( 'Escape key', 'woocommerce-admin' ), escape: __( 'Escape key', 'woocommerce' ),
questionMark: __( 'Question mark', 'woocommerce-admin' ), questionMark: __( 'Question mark', 'woocommerce' ),
selectFocusedDate: __( 'Select the date in focus.', 'woocommerce-admin' ), selectFocusedDate: __( 'Select the date in focus.', 'woocommerce' ),
moveFocusByOneDay: __( moveFocusByOneDay: __(
'Move backward (left) and forward (right) by one day.', 'Move backward (left) and forward (right) by one day.',
'woocommerce-admin' 'woocommerce'
), ),
moveFocusByOneWeek: __( moveFocusByOneWeek: __(
'Move backward (up) and forward (down) by one week.', 'Move backward (up) and forward (down) by one week.',
'woocommerce-admin' 'woocommerce'
), ),
moveFocusByOneMonth: __( 'Switch months.', 'woocommerce-admin' ), moveFocusByOneMonth: __( 'Switch months.', 'woocommerce' ),
moveFocustoStartAndEndOfWeek: __( moveFocustoStartAndEndOfWeek: __(
'Go to the first or last day of a week.', 'Go to the first or last day of a week.',
'woocommerce-admin' 'woocommerce'
),
returnFocusToInput: __(
'Return to the date input field.',
'woocommerce-admin'
), ),
returnFocusToInput: __( 'Return to the date input field.', 'woocommerce' ),
keyboardNavigationInstructions: __( keyboardNavigationInstructions: __(
'Press the down arrow key to interact with the calendar and select a date.', 'Press the down arrow key to interact with the calendar and select a date.',
'woocommerce-admin' 'woocommerce'
), ),
chooseAvailableStartDate: ( { date } ) => chooseAvailableStartDate: ( { date } ) =>
sprintf( sprintf( __( 'Select %s as a start date.', 'woocommerce' ), date ),
__( 'Select %s as a start date.', 'woocommerce-admin' ),
date
),
chooseAvailableEndDate: ( { date } ) => chooseAvailableEndDate: ( { date } ) =>
sprintf( __( 'Select %s as an end date.', 'woocommerce-admin' ), date ), sprintf( __( 'Select %s as an end date.', 'woocommerce' ), date ),
chooseAvailableDate: ( { date } ) => date, chooseAvailableDate: ( { date } ) => date,
dateIsUnavailable: ( { date } ) => dateIsUnavailable: ( { date } ) =>
sprintf( __( '%s is not selectable.', 'woocommerce-admin' ), date ), sprintf( __( '%s is not selectable.', 'woocommerce' ), date ),
dateIsSelected: ( { date } ) => dateIsSelected: ( { date } ) =>
sprintf( __( 'Selected. %s', 'woocommerce-admin' ), date ), sprintf( __( 'Selected. %s', 'woocommerce' ), date ),
}; };

View File

@ -122,7 +122,7 @@ class D3Legend extends Component {
? sprintf( ? sprintf(
__( __(
'You may select up to %d items.', 'You may select up to %d items.',
'woocommerce-admin' 'woocommerce'
), ),
selectionLimit selectionLimit
) )

View File

@ -238,12 +238,12 @@ class Chart extends Component {
} }
const intervalLabels = { const intervalLabels = {
hour: __( 'By hour', 'woocommerce-admin' ), hour: __( 'By hour', 'woocommerce' ),
day: __( 'By day', 'woocommerce-admin' ), day: __( 'By day', 'woocommerce' ),
week: __( 'By week', 'woocommerce-admin' ), week: __( 'By week', 'woocommerce' ),
month: __( 'By month', 'woocommerce-admin' ), month: __( 'By month', 'woocommerce' ),
quarter: __( 'By quarter', 'woocommerce-admin' ), quarter: __( 'By quarter', 'woocommerce' ),
year: __( 'By year', 'woocommerce-admin' ), year: __( 'By year', 'woocommerce' ),
}; };
return ( return (
@ -390,10 +390,7 @@ class Chart extends Component {
chartType === 'line', chartType === 'line',
} }
) } ) }
title={ __( title={ __( 'Line chart', 'woocommerce' ) }
'Line chart',
'woocommerce-admin'
) }
aria-checked={ chartType === 'line' } aria-checked={ chartType === 'line' }
role="menuitemradio" role="menuitemradio"
tabIndex={ chartType === 'line' ? 0 : -1 } tabIndex={ chartType === 'line' ? 0 : -1 }
@ -412,7 +409,7 @@ class Chart extends Component {
chartType === 'bar', chartType === 'bar',
} }
) } ) }
title={ __( 'Bar chart', 'woocommerce-admin' ) } title={ __( 'Bar chart', 'woocommerce' ) }
aria-checked={ chartType === 'bar' } aria-checked={ chartType === 'bar' }
role="menuitemradio" role="menuitemradio"
tabIndex={ chartType === 'bar' ? 0 : -1 } tabIndex={ chartType === 'bar' ? 0 : -1 }
@ -440,7 +437,7 @@ class Chart extends Component {
<span className="screen-reader-text"> <span className="screen-reader-text">
{ __( { __(
'Your requested data is loading', 'Your requested data is loading',
'woocommerce-admin' 'woocommerce'
) } ) }
</span> </span>
<ChartPlaceholder height={ chartHeight } /> <ChartPlaceholder height={ chartHeight } />

View File

@ -126,7 +126,7 @@ export class CompareFilter extends Component {
</CompareButton> </CompareButton>
{ selected.length > 0 && ( { selected.length > 0 && (
<Button isLink={ true } onClick={ this.clearQuery }> <Button isLink={ true } onClick={ this.clearQuery }>
{ __( 'Clear all', 'woocommerce-admin' ) } { __( 'Clear all', 'woocommerce' ) }
</Button> </Button>
) } ) }
</CardFooter> </CardFooter>

View File

@ -21,7 +21,7 @@ class ComparePeriods extends Component {
selected={ compare } selected={ compare }
onSelect={ onSelect } onSelect={ onSelect }
name="compare" name="compare"
legend={ __( 'compare to', 'woocommerce-admin' ) } legend={ __( 'compare to', 'woocommerce' ) }
/> />
); );
} }

View File

@ -65,25 +65,22 @@ class DatePickerContent extends Component {
return ( return (
<div> <div>
<H className="screen-reader-text" tabIndex="0"> <H className="screen-reader-text" tabIndex="0">
{ __( { __( 'Select date range and comparison', 'woocommerce' ) }
'Select date range and comparison',
'woocommerce-admin'
) }
</H> </H>
<Section component={ false }> <Section component={ false }>
<H className="woocommerce-filters-date__text"> <H className="woocommerce-filters-date__text">
{ __( 'select a date range', 'woocommerce-admin' ) } { __( 'select a date range', 'woocommerce' ) }
</H> </H>
<TabPanel <TabPanel
tabs={ [ tabs={ [
{ {
name: 'period', name: 'period',
title: __( 'Presets', 'woocommerce-admin' ), title: __( 'Presets', 'woocommerce' ),
className: 'woocommerce-filters-date__tab', className: 'woocommerce-filters-date__tab',
}, },
{ {
name: 'custom', name: 'custom',
title: __( 'Custom', 'woocommerce-admin' ), title: __( 'Custom', 'woocommerce' ),
className: 'woocommerce-filters-date__tab', className: 'woocommerce-filters-date__tab',
}, },
] } ] }
@ -130,10 +127,7 @@ class DatePickerContent extends Component {
ref={ this.controlsRef } ref={ this.controlsRef }
> >
<H className="woocommerce-filters-date__text"> <H className="woocommerce-filters-date__text">
{ __( { __( 'compare to', 'woocommerce' ) }
'compare to',
'woocommerce-admin'
) }
</H> </H>
<ComparePeriods <ComparePeriods
onSelect={ onUpdate } onSelect={ onUpdate }
@ -149,10 +143,7 @@ class DatePickerContent extends Component {
! ( after || before ) ! ( after || before )
} }
> >
{ __( { __( 'Reset', 'woocommerce' ) }
'Reset',
'woocommerce-admin'
) }
</Button> </Button>
) } ) }
{ isValidSelection( selected.name ) ? ( { isValidSelection( selected.name ) ? (
@ -166,7 +157,7 @@ class DatePickerContent extends Component {
> >
{ __( { __(
'Update', 'Update',
'woocommerce-admin' 'woocommerce'
) } ) }
</Button> </Button>
) : ( ) : (
@ -177,7 +168,7 @@ class DatePickerContent extends Component {
> >
{ __( { __(
'Update', 'Update',
'woocommerce-admin' 'woocommerce'
) } ) }
</Button> </Button>
) } ) }

View File

@ -14,7 +14,7 @@ import classnames from 'classnames';
import DatePickerContent from './content'; import DatePickerContent from './content';
import DropdownButton from '../dropdown-button'; import DropdownButton from '../dropdown-button';
const shortDateFormat = __( 'MM/DD/YYYY', 'woocommerce-admin' ); const shortDateFormat = __( 'MM/DD/YYYY', 'woocommerce' );
/** /**
* Select a range of dates or single dates. * Select a range of dates or single dates.
@ -86,7 +86,7 @@ class DateRangeFilterPicker extends Component {
const { primaryDate, secondaryDate } = this.props.dateQuery; const { primaryDate, secondaryDate } = this.props.dateQuery;
return [ return [
`${ primaryDate.label } (${ primaryDate.range })`, `${ primaryDate.label } (${ primaryDate.range })`,
`${ __( 'vs.', 'woocommerce-admin' ) } ${ secondaryDate.label } (${ `${ __( 'vs.', 'woocommerce' ) } ${ secondaryDate.label } (${
secondaryDate.range secondaryDate.range
})`, })`,
]; ];
@ -135,7 +135,7 @@ class DateRangeFilterPicker extends Component {
return ( return (
<div className="woocommerce-filters-filter"> <div className="woocommerce-filters-filter">
<span className="woocommerce-filters-label"> <span className="woocommerce-filters-label">
{ __( 'Date range', 'woocommerce-admin' ) }: { __( 'Date range', 'woocommerce' ) }:
</span> </span>
<Dropdown <Dropdown
contentClassName={ contentClasses } contentClassName={ contentClasses }

View File

@ -25,7 +25,7 @@ class PresetPeriods extends Component {
selected={ period } selected={ period }
onSelect={ onSelect } onSelect={ onSelect }
name="period" name="period"
legend={ __( 'select a preset period', 'woocommerce-admin' ) } legend={ __( 'select a preset period', 'woocommerce' ) }
/> />
); );
} }

View File

@ -55,7 +55,7 @@ export const DynamicForm: React.FC< DynamicFormProps > = ( {
onSubmit = () => {}, onSubmit = () => {},
onChange = () => {}, onChange = () => {},
validate = () => ( {} ), validate = () => ( {} ),
submitLabel = __( 'Proceed', 'woocommerce-admin' ), submitLabel = __( 'Proceed', 'woocommerce' ),
} ) => { } ) => {
// Support accepting fields in the format provided by the API (object), but transform to Array // Support accepting fields in the format provided by the API (object), but transform to Array
const fields = const fields =

View File

@ -305,7 +305,7 @@ class FilterPicker extends Component {
expandOnMobile expandOnMobile
headerTitle={ __( headerTitle={ __(
'filter report to show:', 'filter report to show:',
'woocommerce-admin' 'woocommerce'
) } ) }
renderToggle={ ( { isOpen, onToggle } ) => ( renderToggle={ ( { isOpen, onToggle } ) => (
<DropdownButton <DropdownButton

View File

@ -121,7 +121,7 @@ class ReportFilters extends Component {
return ( return (
<Fragment> <Fragment>
<H className="screen-reader-text"> <H className="screen-reader-text">
{ __( 'Filters', 'woocommerce-admin' ) } { __( 'Filters', 'woocommerce' ) }
</H> </H>
<Section component="div" className="woocommerce-filters"> <Section component="div" className="woocommerce-filters">
<div className="woocommerce-filters__basic-filters"> <div className="woocommerce-filters__basic-filters">

View File

@ -76,7 +76,7 @@ class ImageUpload extends Component {
className="woocommerce-image-upload__remove-image" className="woocommerce-image-upload__remove-image"
onClick={ this.removeImage } onClick={ this.removeImage }
> >
{ __( 'Remove image', 'woocommerce-admin' ) } { __( 'Remove image', 'woocommerce' ) }
</Button> </Button>
</div> </div>
) } ) }
@ -94,7 +94,7 @@ class ImageUpload extends Component {
isSecondary isSecondary
> >
<Icon icon={ upload } /> <Icon icon={ upload } />
{ __( 'Add an image', 'woocommerce-admin' ) } { __( 'Add an image', 'woocommerce' ) }
</Button> </Button>
</div> </div>
) } ) }

View File

@ -108,7 +108,7 @@ class Pagination extends Component {
aria-live="polite" aria-live="polite"
> >
{ sprintf( { sprintf(
__( 'Page %d of %d', 'woocommerce-admin' ), __( 'Page %d of %d', 'woocommerce' ),
page, page,
this.pageCount this.pageCount
) } ) }
@ -119,7 +119,7 @@ class Pagination extends Component {
className={ previousLinkClass } className={ previousLinkClass }
disabled={ ! ( page > 1 ) } disabled={ ! ( page > 1 ) }
onClick={ this.previousPage } onClick={ this.previousPage }
label={ __( 'Previous Page', 'woocommerce-admin' ) } label={ __( 'Previous Page', 'woocommerce' ) }
> >
<Icon icon={ chevronLeft } /> <Icon icon={ chevronLeft } />
</Button> </Button>
@ -127,7 +127,7 @@ class Pagination extends Component {
className={ nextLinkClass } className={ nextLinkClass }
disabled={ ! ( page < this.pageCount ) } disabled={ ! ( page < this.pageCount ) }
onClick={ this.nextPage } onClick={ this.nextPage }
label={ __( 'Next Page', 'woocommerce-admin' ) } label={ __( 'Next Page', 'woocommerce' ) }
> >
<Icon icon={ chevronRight } /> <Icon icon={ chevronRight } />
</Button> </Button>
@ -154,7 +154,7 @@ class Pagination extends Component {
htmlFor={ instanceId } htmlFor={ instanceId }
className="woocommerce-pagination__page-picker-label" className="woocommerce-pagination__page-picker-label"
> >
{ __( 'Go to page', 'woocommerce-admin' ) } { __( 'Go to page', 'woocommerce' ) }
<input <input
id={ instanceId } id={ instanceId }
className={ inputClass } className={ inputClass }
@ -181,7 +181,7 @@ class Pagination extends Component {
return ( return (
<div className="woocommerce-pagination__per-page-picker"> <div className="woocommerce-pagination__per-page-picker">
<SelectControl <SelectControl
label={ __( 'Rows per page', 'woocommerce-admin' ) } label={ __( 'Rows per page', 'woocommerce' ) }
labelPosition="side" labelPosition="side"
value={ this.props.perPage } value={ this.props.perPage }
onChange={ this.perPageChange } onChange={ this.perPageChange }

View File

@ -91,13 +91,10 @@ export class Plugins extends Component {
isBusy={ isRequesting } isBusy={ isRequesting }
onClick={ this.installAndActivate } onClick={ this.installAndActivate }
> >
{ __( 'Retry', 'woocommerce-admin' ) } { __( 'Retry', 'woocommerce' ) }
</Button> </Button>
<Button onClick={ this.skipInstaller }> <Button onClick={ this.skipInstaller }>
{ __( { __( 'Continue without installing', 'woocommerce' ) }
'Continue without installing',
'woocommerce-admin'
) }
</Button> </Button>
</Fragment> </Fragment>
); );
@ -115,7 +112,7 @@ export class Plugins extends Component {
isBusy={ isRequesting } isBusy={ isRequesting }
onClick={ this.skipInstaller } onClick={ this.skipInstaller }
> >
{ __( 'Continue', 'woocommerce-admin' ) } { __( 'Continue', 'woocommerce' ) }
</Button> </Button>
</Fragment> </Fragment>
); );
@ -128,14 +125,14 @@ export class Plugins extends Component {
isPrimary isPrimary
onClick={ this.installAndActivate } onClick={ this.installAndActivate }
> >
{ __( 'Install & enable', 'woocommerce-admin' ) } { __( 'Install & enable', 'woocommerce' ) }
</Button> </Button>
<Button isTertiary onClick={ this.skipInstaller }> <Button isTertiary onClick={ this.skipInstaller }>
{ skipText || __( 'No thanks', 'woocommerce-admin' ) } { skipText || __( 'No thanks', 'woocommerce' ) }
</Button> </Button>
{ onAbort && ( { onAbort && (
<Button isTertiary onClick={ onAbort }> <Button isTertiary onClick={ onAbort }>
{ abortText || __( 'Abort', 'woocommerce-admin' ) } { abortText || __( 'Abort', 'woocommerce' ) }
</Button> </Button>
) } ) }
</Fragment> </Fragment>

View File

@ -38,7 +38,7 @@ class Rating extends Component {
}; };
const label = sprintf( const label = sprintf(
__( '%1$s out of %2$s stars.', 'woocommerce-admin' ), __( '%1$s out of %2$s stars.', 'woocommerce' ),
rating, rating,
totalStars totalStars
); );

View File

@ -28,22 +28,17 @@ import SearchListItem from './item';
import Tag from '../tag'; import Tag from '../tag';
const defaultMessages = { const defaultMessages = {
clear: __( 'Clear all selected items', 'woocommerce-admin' ), clear: __( 'Clear all selected items', 'woocommerce' ),
noItems: __( 'No items found.', 'woocommerce-admin' ), noItems: __( 'No items found.', 'woocommerce' ),
noResults: __( 'No results for %s', 'woocommerce-admin' ), noResults: __( 'No results for %s', 'woocommerce' ),
search: __( 'Search for items', 'woocommerce-admin' ), search: __( 'Search for items', 'woocommerce' ),
selected: ( n ) => selected: ( n ) =>
sprintf( sprintf(
/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */
_n( _n( '%d item selected', '%d items selected', n, 'woocommerce' ),
'%d item selected',
'%d items selected',
n,
'woocommerce-admin'
),
n n
), ),
updated: __( 'Search results updated.', 'woocommerce-admin' ), updated: __( 'Search results updated.', 'woocommerce' ),
}; };
/** /**
@ -201,7 +196,7 @@ export const SearchListControl = ( props ) => {
onClick={ onChange( [] ) } onClick={ onChange( [] ) }
aria-label={ messages.clear } aria-label={ messages.clear }
> >
{ __( 'Clear all', 'woocommerce-admin' ) } { __( 'Clear all', 'woocommerce' ) }
</Button> </Button>
) : null } ) : null }
</div> </div>

View File

@ -122,7 +122,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All attributes with names that include {{query /}}', 'All attributes with names that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -122,7 +122,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All categories with titles that include {{query /}}', 'All categories with titles that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -121,7 +121,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All coupons with codes that include {{query /}}', 'All coupons with codes that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -122,7 +122,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All customers with names that include {{query /}}', 'All customers with names that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -122,7 +122,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All products with titles that include {{query /}}', 'All products with titles that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -121,7 +121,7 @@ export default {
{ interpolateComponents( { { interpolateComponents( {
mixedString: __( mixedString: __(
'All taxes with codes that include {{query /}}', 'All taxes with codes that include {{query /}}',
'woocommerce-admin' 'woocommerce'
), ),
components: { components: {
query: ( query: (

View File

@ -37,7 +37,7 @@ export function getTaxCode( tax ) {
return [ return [
tax.country, tax.country,
tax.state, tax.state,
tax.name || __( 'TAX', 'woocommerce-admin' ), tax.name || __( 'TAX', 'woocommerce' ),
tax.priority, tax.priority,
] ]
.filter( Boolean ) .filter( Boolean )

View File

@ -252,7 +252,7 @@ class Control extends Component {
> >
{ __( { __(
'Move backward for selected items', 'Move backward for selected items',
'woocommerce-admin' 'woocommerce'
) } ) }
</span> </span>
) } ) }

View File

@ -173,17 +173,14 @@ export class SelectControl extends Component {
'%d result found, use up and down arrow keys to navigate.', '%d result found, use up and down arrow keys to navigate.',
'%d results found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.',
searchOptions.length, searchOptions.length,
'woocommerce-admin' 'woocommerce'
), ),
searchOptions.length searchOptions.length
), ),
'assertive' 'assertive'
); );
} else { } else {
debouncedSpeak( debouncedSpeak( __( 'No results.', 'woocommerce' ), 'assertive' );
__( 'No results.', 'woocommerce-admin' ),
'assertive'
);
} }
} }

View File

@ -53,7 +53,7 @@ class Tags extends Component {
return null; return null;
} }
const screenReaderLabel = sprintf( const screenReaderLabel = sprintf(
__( '%1$s (%2$s of %3$s)', 'woocommerce-admin' ), __( '%1$s (%2$s of %3$s)', 'woocommerce' ),
item.label, item.label,
i + 1, i + 1,
selected.length selected.length
@ -80,7 +80,7 @@ class Tags extends Component {
className="clear-icon" className="clear-icon"
/> />
<span className="screen-reader-text"> <span className="screen-reader-text">
{ __( 'Clear all', 'woocommerce-admin' ) } { __( 'Clear all', 'woocommerce' ) }
</span> </span>
</Button> </Button>
) } ) }

View File

@ -78,7 +78,7 @@ SummaryList.propTypes = {
}; };
SummaryList.defaultProps = { SummaryList.defaultProps = {
label: __( 'Performance Indicators', 'woocommerce-admin' ), label: __( 'Performance Indicators', 'woocommerce' ),
}; };
export default withViewportMatch( { export default withViewportMatch( {

View File

@ -31,7 +31,7 @@ const Menu = ( { label, orientation, itemCount, items } ) => {
{ __( { __(
'List of data points available for filtering. Use arrow keys to cycle through ' + 'List of data points available for filtering. Use arrow keys to cycle through ' +
'the list. Click a data point for a detailed report.', 'the list. Click a data point for a detailed report.',
'woocommerce-admin' 'woocommerce'
) } ) }
</p> </p>
<ul className={ classes }>{ items }</ul> <ul className={ classes }>{ items }</ul>

View File

@ -65,18 +65,18 @@ const SummaryNumber = ( {
let screenReaderLabel = let screenReaderLabel =
delta > 0 delta > 0
? sprintf( ? sprintf(
__( 'Up %f%% from %s', 'woocommerce-admin' ), __( 'Up %f%% from %s', 'woocommerce' ),
delta, delta,
prevLabel prevLabel
) )
: sprintf( : sprintf(
__( 'Down %f%% from %s', 'woocommerce-admin' ), __( 'Down %f%% from %s', 'woocommerce' ),
Math.abs( delta ), Math.abs( delta ),
prevLabel prevLabel
); );
if ( ! delta ) { if ( ! delta ) {
screenReaderLabel = sprintf( screenReaderLabel = sprintf(
__( 'No change from %s', 'woocommerce-admin' ), __( 'No change from %s', 'woocommerce' ),
prevLabel prevLabel
); );
} }
@ -131,7 +131,7 @@ const SummaryNumber = ( {
<Text variant="title.small" size="20" lineHeight="28px"> <Text variant="title.small" size="20" lineHeight="28px">
{ ! isNil( value ) { ! isNil( value )
? value ? value
: __( 'N/A', 'woocommerce-admin' ) } : __( 'N/A', 'woocommerce' ) }
</Text> </Text>
</div> </div>
@ -139,7 +139,7 @@ const SummaryNumber = ( {
text={ text={
! isNil( prevValue ) ! isNil( prevValue )
? `${ prevLabel } ${ prevValue }` ? `${ prevLabel } ${ prevValue }`
: __( 'N/A', 'woocommerce-admin' ) : __( 'N/A', 'woocommerce' )
} }
position="top center" position="top center"
> >
@ -151,10 +151,10 @@ const SummaryNumber = ( {
<Text variant="caption" size="12" lineHeight="16px"> <Text variant="caption" size="12" lineHeight="16px">
{ ! isNil( delta ) { ! isNil( delta )
? sprintf( ? sprintf(
__( '%f%%', 'woocommerce-admin' ), __( '%f%%', 'woocommerce' ),
delta delta
) )
: __( 'N/A', 'woocommerce-admin' ) } : __( 'N/A', 'woocommerce' ) }
</Text> </Text>
</div> </div>
</Tooltip> </Tooltip>
@ -235,7 +235,7 @@ SummaryNumber.defaultProps = {
href: '', href: '',
hrefType: 'wc-admin', hrefType: 'wc-admin',
isOpen: false, isOpen: false,
prevLabel: __( 'Previous period:', 'woocommerce-admin' ), prevLabel: __( 'Previous period:', 'woocommerce' ),
reverseTrend: false, reverseTrend: false,
selected: false, selected: false,
onLinkClickCallback: noop, onLinkClickCallback: noop,

View File

@ -177,15 +177,12 @@ class TableCard extends Component {
<EllipsisMenu <EllipsisMenu
label={ __( label={ __(
'Choose which values to display', 'Choose which values to display',
'woocommerce-admin' 'woocommerce'
) } ) }
renderContent={ () => ( renderContent={ () => (
<Fragment> <Fragment>
<MenuTitle> <MenuTitle>
{ __( { __( 'Columns:', 'woocommerce' ) }
'Columns:',
'woocommerce-admin'
) }
</MenuTitle> </MenuTitle>
{ allHeaders.map( { allHeaders.map(
( { key, label, required } ) => { ( { key, label, required } ) => {
@ -220,7 +217,7 @@ class TableCard extends Component {
<span className="screen-reader-text"> <span className="screen-reader-text">
{ __( { __(
'Your requested data is loading', 'Your requested data is loading',
'woocommerce-admin' 'woocommerce'
) } ) }
</span> </span>
<TablePlaceholder <TablePlaceholder

View File

@ -178,10 +178,7 @@ class Table extends Component {
{ caption } { caption }
{ tabIndex === '0' && ( { tabIndex === '0' && (
<small> <small>
{ __( { __( '(scroll to see more)', 'woocommerce' ) }
'(scroll to see more)',
'woocommerce-admin'
) }
</small> </small>
) } ) }
</caption> </caption>
@ -226,14 +223,14 @@ class Table extends Component {
? sprintf( ? sprintf(
__( __(
'Sort by %s in ascending order', 'Sort by %s in ascending order',
'woocommerce-admin' 'woocommerce'
), ),
screenReaderLabel || label screenReaderLabel || label
) )
: sprintf( : sprintf(
__( __(
'Sort by %s in descending order', 'Sort by %s in descending order',
'woocommerce-admin' 'woocommerce'
), ),
screenReaderLabel || label screenReaderLabel || label
); );
@ -349,7 +346,7 @@ class Table extends Component {
> >
{ __( { __(
'No data to display', 'No data to display',
'woocommerce-admin' 'woocommerce'
) } ) }
</td> </td>
</tr> </tr>

View File

@ -77,10 +77,7 @@ const Tag = ( {
<Button <Button
className="woocommerce-tag__remove" className="woocommerce-tag__remove"
onClick={ remove( id ) } onClick={ remove( id ) }
label={ sprintf( label={ sprintf( __( 'Remove %s', 'woocommerce' ), label ) }
__( 'Remove %s', 'woocommerce-admin' ),
label
) }
aria-describedby={ labelId } aria-describedby={ labelId }
> >
<Icon <Icon

View File

@ -29,7 +29,7 @@ const Timeline = ( props ) => {
return ( return (
<div className={ timelineClassName }> <div className={ timelineClassName }>
<p className={ 'timeline_no_events' }> <p className={ 'timeline_no_events' }>
{ __( 'No data to display', 'woocommerce-admin' ) } { __( 'No data to display', 'woocommerce' ) }
</p> </p>
</div> </div>
); );
@ -123,9 +123,9 @@ Timeline.defaultProps = {
groupBy: 'day', groupBy: 'day',
orderBy: 'desc', orderBy: 'desc',
/* translators: PHP date format string used to display dates, see php.net/date. */ /* translators: PHP date format string used to display dates, see php.net/date. */
dateFormat: __( 'F j, Y', 'woocommerce-admin' ), dateFormat: __( 'F j, Y', 'woocommerce' ),
/* translators: PHP clock format string used to display times, see php.net/date. */ /* translators: PHP clock format string used to display times, see php.net/date. */
clockFormat: __( 'g:ia', 'woocommerce-admin' ), clockFormat: __( 'g:ia', 'woocommerce' ),
}; };
export { orderByOptions, groupByOptions } from './util'; export { orderByOptions, groupByOptions } from './util';

View File

@ -22,7 +22,7 @@ const ViewMoreList = ( { items } ) => {
<Tag <Tag
className="woocommerce-view-more-list" className="woocommerce-view-more-list"
label={ sprintf( label={ sprintf(
__( '+%d more', 'woocommerce-admin' ), __( '+%d more', 'woocommerce' ),
items.length - 1 items.length - 1
) } ) }
popoverContents={ popoverContents={

View File

@ -36,23 +36,23 @@ function CustomerFeedbackModal( {
} ): JSX.Element | null { } ): JSX.Element | null {
const options = [ const options = [
{ {
label: __( 'Very difficult', 'woocommerce-admin' ), label: __( 'Very difficult', 'woocommerce' ),
value: '1', value: '1',
}, },
{ {
label: __( 'Somewhat difficult', 'woocommerce-admin' ), label: __( 'Somewhat difficult', 'woocommerce' ),
value: '2', value: '2',
}, },
{ {
label: __( 'Neutral', 'woocommerce-admin' ), label: __( 'Neutral', 'woocommerce' ),
value: '3', value: '3',
}, },
{ {
label: __( 'Somewhat easy', 'woocommerce-admin' ), label: __( 'Somewhat easy', 'woocommerce' ),
value: '4', value: '4',
}, },
{ {
label: __( 'Very easy', 'woocommerce-admin' ), label: __( 'Very easy', 'woocommerce' ),
value: '5', value: '5',
}, },
]; ];
@ -86,7 +86,7 @@ function CustomerFeedbackModal( {
return ( return (
<Modal <Modal
className="woocommerce-customer-effort-score" className="woocommerce-customer-effort-score"
title={ __( 'Please share your feedback', 'woocommerce-admin' ) } title={ __( 'Please share your feedback', 'woocommerce' ) }
onRequestClose={ closeModal } onRequestClose={ closeModal }
shouldCloseOnClickOutside={ false } shouldCloseOnClickOutside={ false }
> >
@ -111,13 +111,10 @@ function CustomerFeedbackModal( {
{ ( score === 1 || score === 2 ) && ( { ( score === 1 || score === 2 ) && (
<div className="woocommerce-customer-effort-score__comments"> <div className="woocommerce-customer-effort-score__comments">
<TextareaControl <TextareaControl
label={ __( label={ __( 'Comments (Optional)', 'woocommerce' ) }
'Comments (Optional)',
'woocommerce-admin'
) }
help={ __( help={ __(
'Your feedback will go to the WooCommerce development team', 'Your feedback will go to the WooCommerce development team',
'woocommerce-admin' 'woocommerce'
) } ) }
value={ comments } value={ comments }
onChange={ ( value: string ) => setComments( value ) } onChange={ ( value: string ) => setComments( value ) }
@ -134,7 +131,7 @@ function CustomerFeedbackModal( {
<Text variant="body" as="p"> <Text variant="body" as="p">
{ __( { __(
'Please provide feedback by selecting an option above.', 'Please provide feedback by selecting an option above.',
'woocommerce-admin' 'woocommerce'
) } ) }
</Text> </Text>
</div> </div>
@ -142,10 +139,10 @@ function CustomerFeedbackModal( {
<div className="woocommerce-customer-effort-score__buttons"> <div className="woocommerce-customer-effort-score__buttons">
<Button isTertiary onClick={ closeModal } name="cancel"> <Button isTertiary onClick={ closeModal } name="cancel">
{ __( 'Cancel', 'woocommerce-admin' ) } { __( 'Cancel', 'woocommerce' ) }
</Button> </Button>
<Button isPrimary onClick={ sendScore } name="send"> <Button isPrimary onClick={ sendScore } name="send">
{ __( 'Send', 'woocommerce-admin' ) } { __( 'Send', 'woocommerce' ) }
</Button> </Button>
</div> </div>
</Modal> </Modal>

View File

@ -49,7 +49,7 @@ export function CustomerEffortScore( {
createNotice( 'success', label, { createNotice( 'success', label, {
actions: [ actions: [
{ {
label: __( 'Give feedback', 'woocommerce-admin' ), label: __( 'Give feedback', 'woocommerce' ),
onClick: () => { onClick: () => {
setVisible( true ); setVisible( true );
onModalShownCallback(); onModalShownCallback();

View File

@ -17,7 +17,7 @@ const reducer = (
errors: {}, errors: {},
lastImportStartTimestamp: 0, lastImportStartTimestamp: 0,
period: { period: {
date: moment().format( __( 'MM/DD/YYYY', 'woocommerce-admin' ) ), date: moment().format( __( 'MM/DD/YYYY', 'woocommerce' ) ),
label: 'all', label: 'all',
}, },
skipPrevious: true, skipPrevious: true,

View File

@ -40,7 +40,7 @@ export function* getNotes( query = {} ) {
/* translators: %s = link to developer blog */ /* translators: %s = link to developer blog */
__( __(
'WooCommerce Admin will soon limit inbox note contents to 320 characters. For more information, please visit %s. The following notes currently exceeds that limit:', 'WooCommerce Admin will soon limit inbox note contents to 320 characters. For more information, please visit %s. The following notes currently exceeds that limit:',
'woocommerce-admin' 'woocommerce'
), ),
'https://developer.woocommerce.com/?p=10749' 'https://developer.woocommerce.com/?p=10749'
) + ) +

View File

@ -96,7 +96,7 @@ const formatErrorMessage = (
'Could not %(actionType)s %(pluginName)s plugin, %(error)s', 'Could not %(actionType)s %(pluginName)s plugin, %(error)s',
'Could not %(actionType)s the following plugins: %(pluginName)s with these Errors: %(error)s', 'Could not %(actionType)s the following plugins: %(pluginName)s with these Errors: %(error)s',
Object.keys( pluginErrors ).length || 1, Object.keys( pluginErrors ).length || 1,
'woocommerce-admin' 'woocommerce'
), ),
{ {
actionType, actionType,

View File

@ -10,64 +10,49 @@ export const PAYPAL_NAMESPACE = '/wc-paypal/v1';
* Plugin slugs and names as key/value pairs. * Plugin slugs and names as key/value pairs.
*/ */
export const pluginNames = { export const pluginNames = {
'facebook-for-woocommerce': __( 'facebook-for-woocommerce': __( 'Facebook for WooCommerce', 'woocommerce' ),
'Facebook for WooCommerce', jetpack: __( 'Jetpack', 'woocommerce' ),
'woocommerce-admin'
),
jetpack: __( 'Jetpack', 'woocommerce-admin' ),
'klarna-checkout-for-woocommerce': __( 'klarna-checkout-for-woocommerce': __(
'Klarna Checkout for WooCommerce', 'Klarna Checkout for WooCommerce',
'woocommerce-admin' 'woocommerce'
), ),
'klarna-payments-for-woocommerce': __( 'klarna-payments-for-woocommerce': __(
'Klarna Payments for WooCommerce', 'Klarna Payments for WooCommerce',
'woocommerce-admin' 'woocommerce'
), ),
'mailchimp-for-woocommerce': __( 'mailchimp-for-woocommerce': __(
'Mailchimp for WooCommerce', 'Mailchimp for WooCommerce',
'woocommerce-admin' 'woocommerce'
), ),
'creative-mail-by-constant-contact': __( 'creative-mail-by-constant-contact': __(
'Creative Mail for WooCommerce', 'Creative Mail for WooCommerce',
'woocommerce-admin' 'woocommerce'
), ),
'woocommerce-gateway-paypal-express-checkout': __( 'woocommerce-gateway-paypal-express-checkout': __(
'WooCommerce PayPal', 'WooCommerce PayPal',
'woocommerce-admin' 'woocommerce'
),
'woocommerce-gateway-stripe': __(
'WooCommerce Stripe',
'woocommerce-admin'
),
'woocommerce-payfast-gateway': __(
'WooCommerce PayFast',
'woocommerce-admin'
),
'woocommerce-payments': __( 'WooCommerce Payments', 'woocommerce-admin' ),
'woocommerce-services': __(
'WooCommerce Shipping & Tax',
'woocommerce-admin'
), ),
'woocommerce-gateway-stripe': __( 'WooCommerce Stripe', 'woocommerce' ),
'woocommerce-payfast-gateway': __( 'WooCommerce PayFast', 'woocommerce' ),
'woocommerce-payments': __( 'WooCommerce Payments', 'woocommerce' ),
'woocommerce-services': __( 'WooCommerce Shipping & Tax', 'woocommerce' ),
'woocommerce-services:shipping': __( 'woocommerce-services:shipping': __(
'WooCommerce Shipping & Tax', 'WooCommerce Shipping & Tax',
'woocommerce-admin' 'woocommerce'
), ),
'woocommerce-services:tax': __( 'woocommerce-services:tax': __(
'WooCommerce Shipping & Tax', 'WooCommerce Shipping & Tax',
'woocommerce-admin' 'woocommerce'
), ),
'woocommerce-shipstation-integration': __( 'woocommerce-shipstation-integration': __(
'WooCommerce ShipStation Gateway', 'WooCommerce ShipStation Gateway',
'woocommerce-admin' 'woocommerce'
), ),
'woocommerce-mercadopago': __( 'woocommerce-mercadopago': __(
'Mercado Pago payments for WooCommerce', 'Mercado Pago payments for WooCommerce',
'woocommerce-admin' 'woocommerce'
), ),
'google-listings-and-ads': __( 'google-listings-and-ads': __( 'Google Listings and Ads', 'woocommerce' ),
'Google Listings and Ads', 'woo-razorpay': __( 'Razorpay', 'woocommerce' ),
'woocommerce-admin' mailpoet: __( 'MailPoet', 'woocommerce' ),
),
'woo-razorpay': __( 'Razorpay', 'woocommerce-admin' ),
mailpoet: __( 'MailPoet', 'woocommerce-admin' ),
}; };

View File

@ -98,7 +98,7 @@ export function* persistSettingsForGroup( group ) {
throw new Error( throw new Error(
__( __(
'There was a problem updating your settings.', 'There was a problem updating your settings.',
'woocommerce-admin' 'woocommerce'
) )
); );
} }

View File

@ -31,27 +31,27 @@ export const defaultDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss';
*/ */
export const presetValues = [ export const presetValues = [
{ value: 'today', label: __( 'Today', 'woocommerce-admin' ) }, { value: 'today', label: __( 'Today', 'woocommerce' ) },
{ value: 'yesterday', label: __( 'Yesterday', 'woocommerce-admin' ) }, { value: 'yesterday', label: __( 'Yesterday', 'woocommerce' ) },
{ value: 'week', label: __( 'Week to date', 'woocommerce-admin' ) }, { value: 'week', label: __( 'Week to date', 'woocommerce' ) },
{ value: 'last_week', label: __( 'Last week', 'woocommerce-admin' ) }, { value: 'last_week', label: __( 'Last week', 'woocommerce' ) },
{ value: 'month', label: __( 'Month to date', 'woocommerce-admin' ) }, { value: 'month', label: __( 'Month to date', 'woocommerce' ) },
{ value: 'last_month', label: __( 'Last month', 'woocommerce-admin' ) }, { value: 'last_month', label: __( 'Last month', 'woocommerce' ) },
{ value: 'quarter', label: __( 'Quarter to date', 'woocommerce-admin' ) }, { value: 'quarter', label: __( 'Quarter to date', 'woocommerce' ) },
{ value: 'last_quarter', label: __( 'Last quarter', 'woocommerce-admin' ) }, { value: 'last_quarter', label: __( 'Last quarter', 'woocommerce' ) },
{ value: 'year', label: __( 'Year to date', 'woocommerce-admin' ) }, { value: 'year', label: __( 'Year to date', 'woocommerce' ) },
{ value: 'last_year', label: __( 'Last year', 'woocommerce-admin' ) }, { value: 'last_year', label: __( 'Last year', 'woocommerce' ) },
{ value: 'custom', label: __( 'Custom', 'woocommerce-admin' ) }, { value: 'custom', label: __( 'Custom', 'woocommerce' ) },
]; ];
export const periods = [ export const periods = [
{ {
value: 'previous_period', value: 'previous_period',
label: __( 'Previous period', 'woocommerce-admin' ), label: __( 'Previous period', 'woocommerce' ),
}, },
{ {
value: 'previous_year', value: 'previous_year',
label: __( 'Previous year', 'woocommerce-admin' ), label: __( 'Previous year', 'woocommerce' ),
}, },
]; ];
@ -109,7 +109,7 @@ export function getRangeLabel( after, before ) {
const isSameMonth = isSameYear && after.month() === before.month(); const isSameMonth = isSameYear && after.month() === before.month();
const isSameDay = const isSameDay =
isSameYear && isSameMonth && after.isSame( before, 'day' ); isSameYear && isSameMonth && after.isSame( before, 'day' );
const fullDateFormat = __( 'MMM D, YYYY', 'woocommerce-admin' ); const fullDateFormat = __( 'MMM D, YYYY', 'woocommerce' );
if ( isSameDay ) { if ( isSameDay ) {
return after.format( fullDateFormat ); return after.format( fullDateFormat );
@ -119,7 +119,7 @@ export function getRangeLabel( after, before ) {
.format( fullDateFormat ) .format( fullDateFormat )
.replace( afterDate, `${ afterDate } - ${ before.date() }` ); .replace( afterDate, `${ afterDate } - ${ before.date() }` );
} else if ( isSameYear ) { } else if ( isSameYear ) {
const monthDayFormat = __( 'MMM D', 'woocommerce-admin' ); const monthDayFormat = __( 'MMM D', 'woocommerce' );
return `${ after.format( monthDayFormat ) } - ${ before.format( return `${ after.format( monthDayFormat ) } - ${ before.format(
fullDateFormat fullDateFormat
) }`; ) }`;
@ -646,15 +646,9 @@ export function getDateFormatsForIntervalD3( interval, ticks = 0 ) {
x2Format = '%Y'; x2Format = '%Y';
} }
// eslint-disable-next-line @wordpress/i18n-translator-comments // eslint-disable-next-line @wordpress/i18n-translator-comments
screenReaderFormat = __( screenReaderFormat = __( 'Week of %B %-d, %Y', 'woocommerce' );
'Week of %B %-d, %Y',
'woocommerce-admin'
);
// eslint-disable-next-line @wordpress/i18n-translator-comments // eslint-disable-next-line @wordpress/i18n-translator-comments
tooltipLabelFormat = __( tooltipLabelFormat = __( 'Week of %B %-d, %Y', 'woocommerce' );
'Week of %B %-d, %Y',
'woocommerce-admin'
);
break; break;
case 'quarter': case 'quarter':
case 'month': case 'month':
@ -720,10 +714,10 @@ export function getDateFormatsForIntervalPhp( interval, ticks = 0 ) {
} }
// Since some alphabet letters have php associated formats, we need to escape them first. // Since some alphabet letters have php associated formats, we need to escape them first.
const escapedWeekOfStr = __( const escapedWeekOfStr = __( 'Week of', 'woocommerce' ).replace(
'Week of', /(\w)/g,
'woocommerce-admin' '\\$1'
).replace( /(\w)/g, '\\$1' ); );
screenReaderFormat = `${ escapedWeekOfStr } F j, Y`; screenReaderFormat = `${ escapedWeekOfStr } F j, Y`;
tooltipLabelFormat = `${ escapedWeekOfStr } F j, Y`; tooltipLabelFormat = `${ escapedWeekOfStr } F j, Y`;
@ -765,11 +759,11 @@ export function loadLocaleData( { userLocale, weekdaysShort } ) {
if ( moment.locale() !== 'en' ) { if ( moment.locale() !== 'en' ) {
moment.updateLocale( userLocale, { moment.updateLocale( userLocale, {
longDateFormat: { longDateFormat: {
L: __( 'MM/DD/YYYY', 'woocommerce-admin' ), L: __( 'MM/DD/YYYY', 'woocommerce' ),
LL: __( 'MMMM D, YYYY', 'woocommerce-admin' ), LL: __( 'MMMM D, YYYY', 'woocommerce' ),
LLL: __( 'D MMMM YYYY LT', 'woocommerce-admin' ), LLL: __( 'D MMMM YYYY LT', 'woocommerce' ),
LLLL: __( 'dddd, D MMMM YYYY LT', 'woocommerce-admin' ), LLLL: __( 'dddd, D MMMM YYYY LT', 'woocommerce' ),
LT: __( 'HH:mm', 'woocommerce-admin' ), LT: __( 'HH:mm', 'woocommerce' ),
}, },
weekdaysMin: weekdaysShort, weekdaysMin: weekdaysShort,
} ); } );
@ -777,16 +771,10 @@ export function loadLocaleData( { userLocale, weekdaysShort } ) {
} }
export const dateValidationMessages = { export const dateValidationMessages = {
invalid: __( 'Invalid date', 'woocommerce-admin' ), invalid: __( 'Invalid date', 'woocommerce' ),
future: __( 'Select a date in the past', 'woocommerce-admin' ), future: __( 'Select a date in the past', 'woocommerce' ),
startAfterEnd: __( startAfterEnd: __( 'Start date must be before end date', 'woocommerce' ),
'Start date must be before end date', endBeforeStart: __( 'Start date must be before end date', 'woocommerce' ),
'woocommerce-admin'
),
endBeforeStart: __(
'Start date must be before end date',
'woocommerce-admin'
),
}; };
/** /**

View File

@ -68,7 +68,7 @@ async function fetchLatestTagFromPage( image, nameSearch, page ) {
}); });
req.end(); req.end();
} }
) );
} }
/** /**

View File

@ -69,12 +69,12 @@ const OptionalTaskTooltip: React.FC< {
if ( level === 1 && ! completed ) { if ( level === 1 && ! completed ) {
tooltip = __( tooltip = __(
'This task is required to keep your store running', 'This task is required to keep your store running',
'woocommerce-admin' 'woocommerce'
); );
} else if ( level === 2 && ! completed ) { } else if ( level === 2 && ! completed ) {
tooltip = __( tooltip = __(
'This task is required to set up your extension', 'This task is required to set up your extension',
'woocommerce-admin' 'woocommerce'
); );
} }
if ( tooltip === '' ) { if ( tooltip === '' ) {
@ -236,7 +236,7 @@ export const TaskItem: React.FC< TaskItemProps > = ( {
</div> </div>
{ showEllipsisMenu && ( { showEllipsisMenu && (
<EllipsisMenu <EllipsisMenu
label={ __( 'Task Options', 'woocommerce-admin' ) } label={ __( 'Task Options', 'woocommerce' ) }
className="woocommerce-task-list__item-after" className="woocommerce-task-list__item-after"
onToggle={ ( e: React.MouseEvent | React.KeyboardEvent ) => onToggle={ ( e: React.MouseEvent | React.KeyboardEvent ) =>
e.stopPropagation() e.stopPropagation()
@ -254,7 +254,7 @@ export const TaskItem: React.FC< TaskItemProps > = ( {
onDismiss(); onDismiss();
} } } }
> >
{ __( 'Dismiss', 'woocommerce-admin' ) } { __( 'Dismiss', 'woocommerce' ) }
</Button> </Button>
) } ) }
{ onSnooze && ! completed && ( { onSnooze && ! completed && (
@ -264,10 +264,7 @@ export const TaskItem: React.FC< TaskItemProps > = ( {
onSnooze(); onSnooze();
} } } }
> >
{ __( { __( 'Remind me later', 'woocommerce' ) }
'Remind me later',
'woocommerce-admin'
) }
</Button> </Button>
) } ) }
{ onDelete && completed && ( { onDelete && completed && (
@ -281,7 +278,7 @@ export const TaskItem: React.FC< TaskItemProps > = ( {
onDelete(); onDelete();
} } } }
> >
{ __( 'Delete', 'woocommerce-admin' ) } { __( 'Delete', 'woocommerce' ) }
</Button> </Button>
) } ) }
</div> </div>

View File

@ -14,13 +14,13 @@ type ConfirmationModalProps = {
export const InboxDismissConfirmationModal: React.FC< ConfirmationModalProps > = ( { export const InboxDismissConfirmationModal: React.FC< ConfirmationModalProps > = ( {
onClose, onClose,
onDismiss, onDismiss,
buttonLabel = __( "Yes, I'm sure", 'woocommerce-admin' ), buttonLabel = __( "Yes, I'm sure", 'woocommerce' ),
} ) => { } ) => {
const [ inAction, setInAction ] = useState( false ); const [ inAction, setInAction ] = useState( false );
return ( return (
<Modal <Modal
title={ __( 'Are you sure?', 'woocommerce-admin' ) } title={ __( 'Are you sure?', 'woocommerce' ) }
onRequestClose={ () => onClose() } onRequestClose={ () => onClose() }
className="woocommerce-inbox-dismiss-confirmation_modal" className="woocommerce-inbox-dismiss-confirmation_modal"
> >
@ -28,12 +28,12 @@ export const InboxDismissConfirmationModal: React.FC< ConfirmationModalProps > =
<p> <p>
{ __( { __(
'Dismissed messages cannot be viewed again', 'Dismissed messages cannot be viewed again',
'woocommerce-admin' 'woocommerce'
) } ) }
</p> </p>
<div className="woocommerce-inbox-dismiss-confirmation_buttons"> <div className="woocommerce-inbox-dismiss-confirmation_buttons">
<Button isSecondary onClick={ () => onClose() }> <Button isSecondary onClick={ () => onClose() }>
{ __( 'Cancel', 'woocommerce-admin' ) } { __( 'Cancel', 'woocommerce' ) }
</Button> </Button>
<Button <Button
isSecondary isSecondary

View File

@ -95,7 +95,7 @@ const InboxNoteCard: React.FC< InboxNoteProps > = ( {
className="woocommerce-admin-dismiss-notification" className="woocommerce-admin-dismiss-notification"
onClick={ () => onDismiss && onDismiss( note ) } onClick={ () => onDismiss && onDismiss( note ) }
> >
{ __( 'Dismiss', 'woocommerce-admin' ) } { __( 'Dismiss', 'woocommerce' ) }
</Button> </Button>
); );
}; };

View File

@ -6,8 +6,8 @@ import { createElement } from '@wordpress/element';
export const RecommendedRibbon = ( { isLocalPartner = false } ) => { export const RecommendedRibbon = ( { isLocalPartner = false } ) => {
const text = isLocalPartner const text = isLocalPartner
? __( 'Local Partner', 'woocommerce-admin' ) ? __( 'Local Partner', 'woocommerce' )
: __( 'Recommended', 'woocommerce-admin' ); : __( 'Recommended', 'woocommerce' );
return ( return (
<div className={ 'woocommerce-task-payment__recommended-ribbon' }> <div className={ 'woocommerce-task-payment__recommended-ribbon' }>

View File

@ -11,7 +11,7 @@ export const SetupRequired = () => {
<span className="woocommerce-task-payment__setup_required"> <span className="woocommerce-task-payment__setup_required">
<NoticeOutlineIcon /> <NoticeOutlineIcon />
<Text variant="small" size="14" lineHeight="20px"> <Text variant="small" size="14" lineHeight="20px">
{ __( 'Setup required', 'woocommerce-admin' ) } { __( 'Setup required', 'woocommerce' ) }
</Text> </Text>
</span> </span>
); );

View File

@ -22,7 +22,7 @@ import UnionPay from '../images/cards/unionpay.js';
export const WCPayAcceptedMethods = () => ( export const WCPayAcceptedMethods = () => (
<> <>
<Text as="h3" variant="label" weight="600" size="12" lineHeight="16px"> <Text as="h3" variant="label" weight="600" size="12" lineHeight="16px">
{ __( 'Accepted payment methods', 'woocommerce-admin' ) } { __( 'Accepted payment methods', 'woocommerce' ) }
</Text> </Text>
<div className="woocommerce-task-payment-wcpay__accepted"> <div className="woocommerce-task-payment-wcpay__accepted">

View File

@ -46,7 +46,7 @@ export const WCPayCardBody = ( {
href="https://woocommerce.com/payments/?utm_medium=product" href="https://woocommerce.com/payments/?utm_medium=product"
onClick={ onLinkClick } onClick={ onLinkClick }
> >
{ __( 'Learn more', 'woocommerce-admin' ) } { __( 'Learn more', 'woocommerce' ) }
</Link> </Link>
</Text> </Text>