Skip to content

Commit

Permalink
Update .pot file + i18n comments
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Nov 1, 2023
1 parent 74876f9 commit c1bca99
Show file tree
Hide file tree
Showing 5 changed files with 1,055 additions and 585 deletions.
6 changes: 4 additions & 2 deletions assets/js/features/components/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ export default ({
*/
const requiredFeatureNotice =
name === 'active'
? __('The %s feature must be enabled to use this feature.', 'elasticpress')
: __('The %s feature must be enabled to use the following setting.', 'elasticpress');
? /* translators: Feature name */
__('The %s feature must be enabled to use this feature.', 'elasticpress')
: /* translators: Feature name */
__('The %s feature must be enabled to use the following setting.', 'elasticpress');

/**
* The notice to display if a sync is required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies.
*/
import { useLayoutEffect, useState, WPElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { _x, sprintf } from '@wordpress/i18n';

/**
* Internal dependencies.
Expand Down Expand Up @@ -140,7 +140,7 @@ export default ({ defaultIsOpen, label }) => {
<ActiveContraint
label={sprintf(
/* translators: %1$s: Minimum price. %2$s: Maximum price. */
__('%1$s — %2$s', 'elasticpress'),
_x('%1$s — %2$s', 'Price range', 'elasticpress'),
minPrice,
maxPrice,
)}
Expand Down
6 changes: 4 additions & 2 deletions assets/js/sync-ui/components/previous-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import classnames from 'classnames';
import { Icon } from '@wordpress/components';
import { useMemo, WPElement } from '@wordpress/element';
import { dateI18n } from '@wordpress/date';
import { __, _n, sprintf } from '@wordpress/i18n';
import { __, _n, _x, sprintf } from '@wordpress/i18n';

/**
* Internal dependencies.
Expand Down Expand Up @@ -44,6 +44,7 @@ export default ({ failures, method, stateDatetime, status, trigger }) => {
case 'with_errors':
return failures
? sprintf(
/* translators: number of errors */
_n(
'Completed with %d error.',
'Completed with %d errors.',
Expand Down Expand Up @@ -109,8 +110,9 @@ export default ({ failures, method, stateDatetime, status, trigger }) => {
<div className="ep-previous-sync__title">
{why
? sprintf(
/* translators: %1$s Sync date and time. %2%s sync trigger. */ __(
/* translators: %1$s Sync date and time. %2%s sync trigger. */ _x(
'%1$s — %2$s',
'Sync info',
'elasticpress',
),
when,
Expand Down
1 change: 1 addition & 0 deletions assets/js/weighting/components/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default ({ group, postType }) => {
const isCustomField = customFields.some((f) => f.key === key);

if (isDefaultField || isCustomField) {
/* translators: Field name */
createNotice('info', sprintf(__('%s is already being synced.', 'elasticpress'), toAdd));
return;
}
Expand Down
Loading

0 comments on commit c1bca99

Please sign in to comment.