Skip to content

Commit

Permalink
JS Format
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Dec 11, 2024
1 parent 01abeef commit fdaf0eb
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export default ({ attributes }) => {
? __(
'Preview unavailable. The selected taxonomy has no terms assigned to searchable content.',
'elasticpress',
)
)
: __(
'Preview unavailable. There is no searchable content available with the selected metadata.',
'elasticpress',
)}
)}
</Warning>
);
};
6 changes: 3 additions & 3 deletions assets/js/features/components/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default ({
value: o.value,
label: <span dangerouslySetInnerHTML={{ __html: safeHTML(o.label) }} />, // eslint-disable-line react/no-danger
};
})
})
: [];

/**
Expand All @@ -85,9 +85,9 @@ export default ({
const requiredFeatureNotice =
name === 'active'
? /* translators: Feature name */
__('The %s feature must be enabled to use this feature.', 'elasticpress')
__('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 %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 @@ -238,7 +238,7 @@ export default ({ disabled, label, locale, options, onChange, selected, sortBy }
'elasticpress',
),
options.length - optionsLimit,
)}
)}
</SmallButton>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default ({ defaultIsOpen, label, postTypes, name }) => {
__('%1$s (%2$s)', 'elasticpress'),
label,
typeLabels.join(typeSeparator),
)
)
: label;
}, [label, postTypes, name]);

Expand Down
4 changes: 2 additions & 2 deletions assets/js/ordering/pointers.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export class Pointers extends Component {
const searchResults = searchResultsFromState[searchText]
? searchResultsFromState[searchText].filter(
(item) => renderedIds.indexOf(item.ID) === -1,
)
)
: false;

return (
Expand Down Expand Up @@ -370,7 +370,7 @@ export class Pointers extends Component {
: __(
'Remove custom result from results list',
'elasticpress',
);
);

return (
<Fragment key={item.ID}>
Expand Down
4 changes: 2 additions & 2 deletions assets/js/sync-ui/apps/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default () => {
? __(
'If you are missing data in your search results or have recently added custom content types to your site, you should run a sync to reflect these changes.',
'elasticpress',
)
)
: sprintf(
/* translators: %s: Index type. ElasticPress.io or Elasticsearch. */
__(
Expand All @@ -121,7 +121,7 @@ export default () => {
isEpio
? __('on ElasticPress.io', 'elasticpress')
: __('in Elasticsearch', 'elasticpress'),
)}
)}
</p>
<Panel className="ep-sync-panel">
<PanelBody className="ep-sync-panel__controls">
Expand Down
4 changes: 2 additions & 2 deletions assets/js/sync-ui/components/previous-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default ({ failures, method, stateDatetime, status, trigger }) => {
'elasticpress',
),
failures,
)
)
: __('Completed with errors.', 'elasticpress');
case 'aborted':
return __('Stopped.', 'elasticpress');
Expand Down Expand Up @@ -119,7 +119,7 @@ export default ({ failures, method, stateDatetime, status, trigger }) => {
),
when,
why,
)
)
: when}
</div>
<div className="ep-previous-sync__help">{how}</div>
Expand Down
5 changes: 3 additions & 2 deletions assets/js/sync-ui/components/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,20 @@ export default () => {
})}
>
<Icon icon={sync} />
<div className="ep-sync-progress__details">
<div id="ep-sync-progress-details" className="ep-sync-progress__details">
<strong>{label}</strong>
{syncStartDateTime
? createInterpolateElement(
sprintf(why, dateI18n('g:ia l F jS, Y', syncStartDateTime)),
{
time: <time dateTime={dateI18n('c', syncStartDateTime)} />,
},
)
)
: null}
</div>
<div className="ep-sync-progress__progress-bar">
<div
aria-labelledby="ep-sync-progress-details"
aria-valuemax={100}
aria-valuemin={0}
aria-valuenow={now}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/sync/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export const SyncProvider = ({
isEpio
? __('ElasticPress.io', 'elasticpress')
: __('Elasticsearch', 'elasticpress'),
)
)
: __('Sync interrupted by WP-CLI command.', 'elasticpress');

logMessage(message, 'info');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default ({ children, id, isBusy, onSelect, ...props }) => {
'elasticpress',
),
children.length,
)
)
: '';
}, [children, isBusy]);

Expand Down

0 comments on commit fdaf0eb

Please sign in to comment.