Skip to content

Commit

Permalink
PR feedback: Copy, sentence-casing
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Nov 18, 2020
1 parent 9bc3780 commit cc01d6b
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ import { i18n } from '@kbn/i18n';

export const TOTAL_DOCUMENTS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments',
{ defaultMessage: 'Total Documents' }
{ defaultMessage: 'Total documents' }
);

export const TOTAL_API_OPERATIONS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalApiOperations',
{ defaultMessage: 'Total API Operations' }
{ defaultMessage: 'Total API operations' }
);

export const TOTAL_QUERIES = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalQueries',
{ defaultMessage: 'Total Queries' }
{ defaultMessage: 'Total queries' }
);

export const TOTAL_CLICKS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.analytics.totalClicks',
{ defaultMessage: 'Total Clicks' }
{ defaultMessage: 'Total clicks' }
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import { i18n } from '@kbn/i18n';

export const RECENT_API_EVENTS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.apiLogs.recent',
{ defaultMessage: 'Recent API Events' }
{ defaultMessage: 'Recent API events' }
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import { DOCS_PREFIX } from '../../routes';
export const DOCUMENT_CREATION_DESCRIPTION = (
<FormattedMessage
id="xpack.enterpriseSearch.appSearch.engine.documentCreation.description"
defaultMessage="There are three ways to send documents to your Engine for indexing. You can paste raw JSON, upload a {jsonCode} file, or {postCode} to the {documentsApiLink} endpoint. Click on your choice below or see {apiStrong}."
defaultMessage="There are three ways to send documents to your engine for indexing. You can paste raw JSON, upload a {jsonCode} file, or {postCode} to the {documentsApiLink} endpoint. Click on your choice below or see {apiStrong}."
values={{
jsonCode: <EuiCode>.json</EuiCode>,
postCode: <EuiCode>POST</EuiCode>,
documentsApiLink: (
<EuiLink target="_blank" href={`${DOCS_PREFIX}/indexing-documents-guide.html`}>
Documents API
documents API
</EuiLink>
),
apiStrong: <strong>Indexing by API</strong>,
Expand All @@ -37,11 +37,11 @@ export const DOCUMENT_API_INDEXING_TITLE = i18n.translate(
export const DOCUMENT_API_INDEXING_DESCRIPTION = (
<FormattedMessage
id="xpack.enterpriseSearch.appSearch.engine.documentCreation.api.description"
defaultMessage="The {documentsApiLink} can be used to add new documents to your Engine, update documents, retrieve documents by id, and delete documents. There are a variety of {clientLibrariesLink} to help you get started."
defaultMessage="The {documentsApiLink} can be used to add new documents to your engine, update documents, retrieve documents by id, and delete documents. There are a variety of {clientLibrariesLink} to help you get started."
values={{
documentsApiLink: (
<EuiLink target="_blank" href={`${DOCS_PREFIX}/indexing-documents-guide.html`}>
Documents API
documents API
</EuiLink>
),
clientLibrariesLink: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('RecentApiLogs', () => {
});

it('renders the recent API logs table', () => {
expect(wrapper.find('h2').text()).toEqual('Recent API Events');
expect(wrapper.find('h2').text()).toEqual('Recent API events');
expect(wrapper.find(EuiButton).prop('to')).toEqual('/engines/some-engine/api-logs');
// TODO: expect(wrapper.find(ApiLogsTable)).toHaveLength(1)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ describe('TotalCharts', () => {
it('renders the total queries chart', () => {
const chart = wrapper.find('[data-test-subj="TotalQueriesChart"]');

expect(chart.find('h2').text()).toEqual('Total Queries');
expect(chart.find('h2').text()).toEqual('Total queries');
expect(chart.find(EuiButton).prop('to')).toEqual('/engines/some-engine/analytics');
// TODO: find chart component
});

it('renders the total API operations chart', () => {
const chart = wrapper.find('[data-test-subj="TotalApiOperationsChart"]');

expect(chart.find('h2').text()).toEqual('Total API Operations');
expect(chart.find('h2').text()).toEqual('Total API operations');
expect(chart.find(EuiButton).prop('to')).toEqual('/engines/some-engine/api-logs');
// TODO: find chart component
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ describe('TotalStats', () => {

const card = wrapper.find(EuiStat).at(0);
expect(card.prop('title')).toEqual(11);
expect(card.prop('description')).toEqual('Total Queries');
expect(card.prop('description')).toEqual('Total queries');
});

it('renders the total documents stat', () => {
expect(wrapper.find('[data-test-subj="TotalDocumentsCard"]')).toHaveLength(1);

const card = wrapper.find(EuiStat).at(1);
expect(card.prop('title')).toEqual(22);
expect(card.prop('description')).toEqual('Total Documents');
expect(card.prop('description')).toEqual('Total documents');
});

it('renders the total clicks stat', () => {
expect(wrapper.find('[data-test-subj="TotalClicksCard"]')).toHaveLength(1);

const card = wrapper.find(EuiStat).at(2);
expect(card.prop('title')).toEqual(33);
expect(card.prop('description')).toEqual('Total Clicks');
expect(card.prop('description')).toEqual('Total clicks');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export const OVERVIEW_TITLE = i18n.translate(

export const VIEW_ANALYTICS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.overview.analyticsLink',
{ defaultMessage: 'View Analytics' }
{ defaultMessage: 'View analytics' }
);

export const VIEW_API_LOGS = i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.overview.apiLogsLink',
{ defaultMessage: 'View API Logs' }
{ defaultMessage: 'View API logs' }
);

export const LAST_7_DAYS = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('EmptyEngineOverview', () => {

it('renders', () => {
expect(wrapper.find('h1').text()).toEqual('Engine setup');
expect(wrapper.find('h2').text()).toEqual('Setting up the “empty-engine” Engine');
expect(wrapper.find('h2').text()).toEqual('Setting up the “empty-engine” engine');
expect(wrapper.find('h3').text()).toEqual('Indexing by API');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const EmptyEngineOverview: React.FC = () => {
<EuiTitle>
<h2>
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.overview.empty.subheading', {
defaultMessage: 'Setting up the “{engineName}” Engine',
defaultMessage: 'Setting up the “{engineName}” engine',
values: { engineName },
})}
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { EngineOverviewMetrics } from './engine_overview_metrics';
describe('EngineOverviewMetrics', () => {
it('renders', () => {
const wrapper = shallow(<EngineOverviewMetrics />);
expect(wrapper.find('h1').text()).toEqual('Engine Overview');
expect(wrapper.find('h1').text()).toEqual('Engine overview');
});

it('renders an unavailable prompt if engine data is still indexing', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const EngineOverviewMetrics: React.FC = () => {
<EuiTitle size="l">
<h1>
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.overview.heading', {
defaultMessage: 'Engine Overview',
defaultMessage: 'Engine overview',
})}
</h1>
</EuiTitle>
Expand Down

0 comments on commit cc01d6b

Please sign in to comment.