Skip to content

Commit

Permalink
Update translation IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed Dec 13, 2019
1 parent 4a04087 commit 436b33c
Show file tree
Hide file tree
Showing 84 changed files with 576 additions and 582 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class AggType<
if (config.customLabels !== false) {
params.push({
name: 'customLabel',
displayName: i18n.translate('common.ui.aggTypes.string.customLabel', {
displayName: i18n.translate('data.search.aggs.string.customLabel', {
defaultMessage: 'Custom label',
}),
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { IBucketAggConfig } from './_bucket_agg_type';

export const intervalOptions = [
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.autoDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.autoDisplayName', {
defaultMessage: 'Auto',
}),
val: 'auto',
Expand All @@ -32,49 +32,49 @@ export const intervalOptions = [
},
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.millisecondDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.millisecondDisplayName', {
defaultMessage: 'Millisecond',
}),
val: 'ms',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.secondDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.secondDisplayName', {
defaultMessage: 'Second',
}),
val: 's',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.minuteDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.minuteDisplayName', {
defaultMessage: 'Minute',
}),
val: 'm',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.hourlyDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.hourlyDisplayName', {
defaultMessage: 'Hourly',
}),
val: 'h',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.dailyDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.dailyDisplayName', {
defaultMessage: 'Daily',
}),
val: 'd',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.weeklyDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.weeklyDisplayName', {
defaultMessage: 'Weekly',
}),
val: 'w',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.monthlyDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.monthlyDisplayName', {
defaultMessage: 'Monthly',
}),
val: 'M',
},
{
display: i18n.translate('common.ui.aggTypes.buckets.intervalOptions.yearlyDisplayName', {
display: i18n.translate('data.search.aggs.buckets.intervalOptions.yearlyDisplayName', {
defaultMessage: 'Yearly',
}),
val: 'y',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function isDateHistogramBucketAggConfig(agg: any): agg is IBucketDateHist

export const dateHistogramBucketAgg = new BucketAggType<IBucketDateHistogramAggConfig>({
name: BUCKET_TYPES.DATE_HISTOGRAM,
title: i18n.translate('common.ui.aggTypes.buckets.dateHistogramTitle', {
title: i18n.translate('data.search.aggs.buckets.dateHistogramTitle', {
defaultMessage: 'Date Histogram',
}),
ordered: {
Expand All @@ -80,7 +80,7 @@ export const dateHistogramBucketAgg = new BucketAggType<IBucketDateHistogramAggC
}

const field = agg.getFieldDisplayName();
return i18n.translate('common.ui.aggTypes.buckets.dateHistogramLabel', {
return i18n.translate('data.search.aggs.buckets.dateHistogramLabel', {
defaultMessage: '{fieldName} per {intervalDescription}',
values: {
fieldName: field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
TEXT_CONTEXT_TYPE,
} from '../../../../../../../plugins/data/public';

const dateRangeTitle = i18n.translate('common.ui.aggTypes.buckets.dateRangeTitle', {
const dateRangeTitle = i18n.translate('data.search.aggs.buckets.dateRangeTitle', {
defaultMessage: 'Date Range',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { i18n } from '@kbn/i18n';
import { BucketAggType } from './_bucket_agg_type';
import { BUCKET_TYPES } from './bucket_agg_types';

const filterTitle = i18n.translate('common.ui.aggTypes.buckets.filterTitle', {
const filterTitle = i18n.translate('data.search.aggs.buckets.filterTitle', {
defaultMessage: 'Filter',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { getQueryLog, esQuery } from '../../../../../../../plugins/data/public';
const config = chrome.getUiSettingsClient();
const storage = new Storage(window.localStorage);

const filtersTitle = i18n.translate('common.ui.aggTypes.buckets.filtersTitle', {
const filtersTitle = i18n.translate('data.search.aggs.buckets.filtersTitle', {
defaultMessage: 'Filters',
description:
'The name of an aggregation, that allows to specify multiple individual filters to group data by.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function getPrecision(val: string) {
const isOutsideCollar = (bounds: GeoBoundingBox, collar: MapCollar) =>
bounds && collar && !geoContains(collar, bounds);

const geohashGridTitle = i18n.translate('common.ui.aggTypes.buckets.geohashGridTitle', {
const geohashGridTitle = i18n.translate('data.search.aggs.buckets.geohashGridTitle', {
defaultMessage: 'Geohash',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';
import { IBucketAggConfig } from './_bucket_agg_type';
import { METRIC_TYPES } from '../metrics/metric_agg_types';

const geotileGridTitle = i18n.translate('common.ui.aggTypes.buckets.geotileGridTitle', {
const geotileGridTitle = i18n.translate('data.search.aggs.buckets.geotileGridTitle', {
defaultMessage: 'Geotile',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const getUIConfig = () => npStart.core.uiSettings;

export const histogramBucketAgg = new BucketAggType<IBucketHistogramAggConfig>({
name: BUCKET_TYPES.HISTOGRAM,
title: i18n.translate('common.ui.aggTypes.buckets.histogramTitle', {
title: i18n.translate('data.search.aggs.buckets.histogramTitle', {
defaultMessage: 'Histogram',
}),
ordered: {},
Expand Down Expand Up @@ -122,7 +122,7 @@ export const histogramBucketAgg = new BucketAggType<IBucketHistogramAggConfig>({
.catch((e: Error) => {
if (e.name === 'AbortError') return;
toastNotifications.addWarning(
i18n.translate('common.ui.aggTypes.histogram.missingMaxMinValuesWarning', {
i18n.translate('data.search.aggs.histogram.missingMaxMinValuesWarning', {
// eslint-disable-next-line max-len
defaultMessage:
'Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
TEXT_CONTEXT_TYPE,
} from '../../../../../../../plugins/data/public';

const ipRangeTitle = i18n.translate('common.ui.aggTypes.buckets.ipRangeTitle', {
const ipRangeTitle = i18n.translate('data.search.aggs.buckets.ipRangeTitle', {
defaultMessage: 'IPv4 Range',
});

Expand Down Expand Up @@ -63,7 +63,7 @@ export const ipRangeBucketAgg = new BucketAggType({
return new IpRangeFormat();
},
makeLabel(aggConfig) {
return i18n.translate('common.ui.aggTypes.buckets.ipRangeLabel', {
return i18n.translate('data.search.aggs.buckets.ipRangeLabel', {
defaultMessage: '{fieldName} IP ranges',
values: {
fieldName: aggConfig.getFieldDisplayName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { BUCKET_TYPES } from './bucket_agg_types';
const keyCaches = new WeakMap();
const formats = new WeakMap();

const rangeTitle = i18n.translate('common.ui.aggTypes.buckets.rangeTitle', {
const rangeTitle = i18n.translate('data.search.aggs.buckets.rangeTitle', {
defaultMessage: 'Range',
});

Expand All @@ -39,7 +39,7 @@ export const rangeBucketAgg = new BucketAggType({
title: rangeTitle,
createFilter: createFilterRange,
makeLabel(aggConfig) {
return i18n.translate('common.ui.aggTypes.buckets.rangesLabel', {
return i18n.translate('data.search.aggs.buckets.rangesLabel', {
defaultMessage: '{fieldName} ranges',
values: {
fieldName: aggConfig.getFieldDisplayName(),
Expand Down Expand Up @@ -72,7 +72,7 @@ export const rangeBucketAgg = new BucketAggType({
const format = agg.fieldOwnFormatter();
const gte = '\u2265';
const lt = '\u003c';
return i18n.translate('common.ui.aggTypes.buckets.ranges.rangesFormatMessage', {
return i18n.translate('data.search.aggs.buckets.ranges.rangesFormatMessage', {
defaultMessage: '{gte} {from} and {lt} {to}',
values: {
gte,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ import { isStringType, migrateIncludeExcludeFormat } from './migrate_include_exc
import { BUCKET_TYPES } from './bucket_agg_types';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';

const significantTermsTitle = i18n.translate('common.ui.aggTypes.buckets.significantTermsTitle', {
const significantTermsTitle = i18n.translate('data.search.aggs.buckets.significantTermsTitle', {
defaultMessage: 'Significant Terms',
});

export const significantTermsBucketAgg = new BucketAggType({
name: BUCKET_TYPES.SIGNIFICANT_TERMS,
title: significantTermsTitle,
makeLabel(aggConfig) {
return i18n.translate('common.ui.aggTypes.buckets.significantTermsLabel', {
return i18n.translate('data.search.aggs.buckets.significantTermsLabel', {
defaultMessage: 'Top {size} unusual terms in {fieldName}',
values: {
size: aggConfig.params.size,
Expand All @@ -56,7 +56,7 @@ export const significantTermsBucketAgg = new BucketAggType({
},
{
name: 'exclude',
displayName: i18n.translate('common.ui.aggTypes.buckets.significantTerms.excludeLabel', {
displayName: i18n.translate('data.search.aggs.buckets.significantTerms.excludeLabel', {
defaultMessage: 'Exclude',
}),
type: 'string',
Expand All @@ -66,7 +66,7 @@ export const significantTermsBucketAgg = new BucketAggType({
},
{
name: 'include',
displayName: i18n.translate('common.ui.aggTypes.buckets.significantTerms.includeLabel', {
displayName: i18n.translate('data.search.aggs.buckets.significantTerms.includeLabel', {
defaultMessage: 'Include',
}),
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const [orderAggSchema] = new Schemas([
},
]).all;

const termsTitle = i18n.translate('common.ui.aggTypes.buckets.termsTitle', {
const termsTitle = i18n.translate('data.search.aggs.buckets.termsTitle', {
defaultMessage: 'Terms',
});

Expand Down Expand Up @@ -117,11 +117,11 @@ export const termsBucketAgg = new BucketAggType({
nestedSearchSource.setField('aggs', filterAgg);

const request = inspectorAdapters.requests.start(
i18n.translate('common.ui.aggTypes.buckets.terms.otherBucketTitle', {
i18n.translate('data.search.aggs.buckets.terms.otherBucketTitle', {
defaultMessage: 'Other bucket',
}),
{
description: i18n.translate('common.ui.aggTypes.buckets.terms.otherBucketDescription', {
description: i18n.translate('data.search.aggs.buckets.terms.otherBucketDescription', {
defaultMessage:
'This request counts the number of documents that fall ' +
'outside the criterion of the data buckets.',
Expand Down Expand Up @@ -219,13 +219,13 @@ export const termsBucketAgg = new BucketAggType({
editorComponent: wrapWithInlineComp(OrderParamEditor),
options: [
{
text: i18n.translate('common.ui.aggTypes.buckets.terms.orderDescendingTitle', {
text: i18n.translate('data.search.aggs.buckets.terms.orderDescendingTitle', {
defaultMessage: 'Descending',
}),
value: 'desc',
},
{
text: i18n.translate('common.ui.aggTypes.buckets.terms.orderAscendingTitle', {
text: i18n.translate('data.search.aggs.buckets.terms.orderAscendingTitle', {
defaultMessage: 'Ascending',
}),
value: 'asc',
Expand All @@ -247,10 +247,10 @@ export const termsBucketAgg = new BucketAggType({
{
name: 'otherBucketLabel',
type: 'string',
default: i18n.translate('common.ui.aggTypes.buckets.terms.otherBucketLabel', {
default: i18n.translate('data.search.aggs.buckets.terms.otherBucketLabel', {
defaultMessage: 'Other',
}),
displayName: i18n.translate('common.ui.aggTypes.otherBucket.labelForOtherBucketLabel', {
displayName: i18n.translate('data.search.aggs.otherBucket.labelForOtherBucketLabel', {
defaultMessage: 'Label for other bucket',
}),
shouldShow: agg => agg.getParam('otherBucket'),
Expand All @@ -264,21 +264,21 @@ export const termsBucketAgg = new BucketAggType({
},
{
name: 'missingBucketLabel',
default: i18n.translate('common.ui.aggTypes.buckets.terms.missingBucketLabel', {
default: i18n.translate('data.search.aggs.buckets.terms.missingBucketLabel', {
defaultMessage: 'Missing',
description: `Default label used in charts when documents are missing a field.
Visible when you create a chart with a terms aggregation and enable "Show missing values"`,
}),
type: 'string',
displayName: i18n.translate('common.ui.aggTypes.otherBucket.labelForMissingValuesLabel', {
displayName: i18n.translate('data.search.aggs.otherBucket.labelForMissingValuesLabel', {
defaultMessage: 'Label for missing values',
}),
shouldShow: agg => agg.getParam('missingBucket'),
write: noop,
},
{
name: 'exclude',
displayName: i18n.translate('common.ui.aggTypes.buckets.terms.excludeLabel', {
displayName: i18n.translate('data.search.aggs.buckets.terms.excludeLabel', {
defaultMessage: 'Exclude',
}),
type: 'string',
Expand All @@ -288,7 +288,7 @@ export const termsBucketAgg = new BucketAggType({
},
{
name: 'include',
displayName: i18n.translate('common.ui.aggTypes.buckets.terms.includeLabel', {
displayName: i18n.translate('data.search.aggs.buckets.terms.includeLabel', {
defaultMessage: 'Include',
}),
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ import { MetricAggType } from './metric_agg_type';
import { METRIC_TYPES } from './metric_agg_types';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';

const averageTitle = i18n.translate('common.ui.aggTypes.metrics.averageTitle', {
const averageTitle = i18n.translate('data.search.aggs.metrics.averageTitle', {
defaultMessage: 'Average',
});

export const avgMetricAgg = new MetricAggType({
name: METRIC_TYPES.AVG,
title: averageTitle,
makeLabel: aggConfig => {
return i18n.translate('common.ui.aggTypes.metrics.averageLabel', {
return i18n.translate('data.search.aggs.metrics.averageLabel', {
defaultMessage: 'Average {field}',
values: { field: aggConfig.getFieldDisplayName() },
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';

const overallAverageLabel = i18n.translate('common.ui.aggTypes.metrics.overallAverageLabel', {
const overallAverageLabel = i18n.translate('data.search.aggs.metrics.overallAverageLabel', {
defaultMessage: 'overall average',
});

const averageBucketTitle = i18n.translate('common.ui.aggTypes.metrics.averageBucketTitle', {
const averageBucketTitle = i18n.translate('data.search.aggs.metrics.averageBucketTitle', {
defaultMessage: 'Average Bucket',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';

const overallMaxLabel = i18n.translate('common.ui.aggTypes.metrics.overallMaxLabel', {
const overallMaxLabel = i18n.translate('data.search.aggs.metrics.overallMaxLabel', {
defaultMessage: 'overall max',
});

const maxBucketTitle = i18n.translate('common.ui.aggTypes.metrics.maxBucketTitle', {
const maxBucketTitle = i18n.translate('data.search.aggs.metrics.maxBucketTitle', {
defaultMessage: 'Max Bucket',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';

const overallMinLabel = i18n.translate('common.ui.aggTypes.metrics.overallMinLabel', {
const overallMinLabel = i18n.translate('data.search.aggs.metrics.overallMinLabel', {
defaultMessage: 'overall min',
});

const minBucketTitle = i18n.translate('common.ui.aggTypes.metrics.minBucketTitle', {
const minBucketTitle = i18n.translate('data.search.aggs.metrics.minBucketTitle', {
defaultMessage: 'Min Bucket',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';

const overallSumLabel = i18n.translate('common.ui.aggTypes.metrics.overallSumLabel', {
const overallSumLabel = i18n.translate('data.search.aggs.metrics.overallSumLabel', {
defaultMessage: 'overall sum',
});

const sumBucketTitle = i18n.translate('common.ui.aggTypes.metrics.sumBucketTitle', {
const sumBucketTitle = i18n.translate('data.search.aggs.metrics.sumBucketTitle', {
defaultMessage: 'Sum Bucket',
});

Expand Down
Loading

0 comments on commit 436b33c

Please sign in to comment.