Skip to content

Commit

Permalink
[i18n] Translate Agg_response, Agg_table (#26875)
Browse files Browse the repository at this point in the history
* Translate agg_response

* Translate agg_table

* Fix issues
  • Loading branch information
Nox911 authored Dec 14, 2018
1 parent 71ca369 commit 34a2a47
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
12 changes: 10 additions & 2 deletions src/ui/public/agg_response/hierarchical/_tooltip.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<table class="visTooltip__table">
<thead>
<tr class="eui-textLeft visTooltip__label">
<th scope="col">field</th>
<th scope="col">value</th>
<th
scope="col"
i18n-id="common.ui.aggResponse.fieldLabel"
i18n-default-message="field"
></th>
<th
scope="col"
i18n-id="common.ui.aggResponse.valueLabel"
i18n-default-message="value"
></th>
<th scope="col">{{metricCol.label}}</th>
</tr>
</thead>
Expand Down
5 changes: 4 additions & 1 deletion src/ui/public/agg_response/point_series/_fake_x_aspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
*/

import { AggType } from '../../agg_types/agg_type';
import { i18n } from '@kbn/i18n';

const allAgg = new AggType({
name: 'all',
title: 'All docs',
title: i18n.translate('common.ui.aggResponse.allDocsTitle', {
defaultMessage: 'All docs'
}),
ordered: false,
hasNoDsl: true
});
Expand Down
17 changes: 14 additions & 3 deletions src/ui/public/agg_table/agg_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@
totalFunc="totalFunc">

<div class="kbnAggTable__controls">
<small>Export:</small>&nbsp;&nbsp;
<small
i18n-id="common.ui.aggTable.exportLabel"
i18n-default-message="Export:"
></small>&nbsp;&nbsp;
<a class="small" ng-click="aggTable.exportAsCsv(false)">
Raw <i aria-hidden="true" class="fa fa-download"></i>
<span
i18n-id="common.ui.aggTable.rawLabel"
i18n-default-message="Raw"
></span>
<i aria-hidden="true" class="fa fa-download"></i>
</a>&nbsp;&nbsp;&nbsp;
<a class="small" ng-click="aggTable.exportAsCsv(true)">
Formatted <i aria-hidden="true" class="fa fa-download"></i>
<span
i18n-id="common.ui.aggTable.formattedLabel"
i18n-default-message="Formatted"
></span>
<i aria-hidden="true" class="fa fa-download"></i>
</a>
<paginate-controls></paginate-controls>
</div>
Expand Down

0 comments on commit 34a2a47

Please sign in to comment.