Translations for Table Vis plugin (#23679) (#24729)

add translations for table vis plugin
This commit is contained in:
pavel06081991 2018-10-30 15:12:24 +03:00 committed by GitHub
parent a302580162
commit fc70d90abe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 12 deletions

View file

@ -6,6 +6,7 @@
"kbnVislibVisTypes": "src/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/core_plugins/markdown_vis",
"metricVis": "src/core_plugins/metric_vis",
"tableVis": "src/core_plugins/table_vis",
"regionMap": "src/core_plugins/region_map",
"statusPage": "src/core_plugins/status_page",
"tileMap": "src/core_plugins/tile_map",

View file

@ -1,7 +1,10 @@
<div ng-controller="KbnTableVisController" class="table-vis">
<div ng-if="!hasSomeRows && hasSomeRows !== null" class="table-vis-error">
<h2 aria-hidden="true"><i aria-hidden="true" class="fa fa-meh-o"></i></h2>
<h4>No results found</h4>
<h4
i18n-id="tableVis.vis.noResultsFoundTitle"
i18n-default-message="No results found"
></h4>
</div>
<div ng-if="tableGroups" class="table-vis-container" data-test-subj="tableVis">

View file

@ -17,6 +17,7 @@
* under the License.
*/
import { i18n } from '@kbn/i18n';
import './table_vis_controller';
import './table_vis_params';
import 'ui/agg_table';
@ -51,9 +52,13 @@ function TableVisTypeProvider(Private) {
return VisFactory.createAngularVisualization({
type: 'table',
name: 'table',
title: 'Data Table',
title: i18n.translate('tableVis.tableVisTitle', {
defaultMessage: 'Data Table',
}),
icon: 'visTable',
description: 'Display values in a table',
description: i18n.translate('tableVis.tableVisDescription', {
defaultMessage: 'Display values in a table',
}),
category: CATEGORY.DATA,
visConfig: {
defaults: {
@ -75,7 +80,9 @@ function TableVisTypeProvider(Private) {
{
group: 'metrics',
name: 'metric',
title: 'Metric',
title: i18n.translate('tableVis.tableVisEditorConfig.schemas.metricTitle', {
defaultMessage: 'Metric',
}),
aggFilter: ['!geo_centroid', '!geo_bounds'],
min: 1,
defaults: [
@ -85,13 +92,17 @@ function TableVisTypeProvider(Private) {
{
group: 'buckets',
name: 'bucket',
title: 'Split Rows',
title: i18n.translate('tableVis.tableVisEditorConfig.schemas.bucketTitle', {
defaultMessage: 'Split Rows',
}),
aggFilter: ['!filter']
},
{
group: 'buckets',
name: 'split',
title: 'Split Table',
title: i18n.translate('tableVis.tableVisEditorConfig.schemas.splitTitle', {
defaultMessage: 'Split Table',
}),
aggFilter: ['!filter']
}
])

View file

@ -1,40 +1,60 @@
<div class="kuiSideBarSection">
<div class="form-group">
<label for="datatableVisualizationPerPage">Per Page</label>
<label
for="datatableVisualizationPerPage"
i18n-id="tableVis.params.perPageLabel"
i18n-default-message="Per Page"
></label>
<input type="number" ng-model="editorState.params.perPage" class="form-control" id="datatableVisualizationPerPage">
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="editorState.params.showMetricsAtAllLevels" data-test-subj="showMetricsAtAllLevels">
Show metrics for every bucket/level
<span
i18n-id="tableVis.params.showMetricsLabel"
i18n-default-message="Show metrics for every bucket/level"
></span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="editorState.params.showPartialRows">
Show partial rows
<span
i18n-id="tableVis.params.showPartialRowsLabel"
i18n-default-message="Show partial rows"
></span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="metricsAtAllLevels" disabled>
Calculate metrics for every bucket/level
<span
i18n-id="tableVis.params.calculateMetricsLabel"
i18n-default-message="Calculate metrics for every bucket/level"
></span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="editorState.params.showTotal">
Show total
<span
i18n-id="tableVis.params.showTotalLabel"
i18n-default-message="Show total"
></span>
</label>
</div>
<div>
<label for="datatableVisualizationTotalFunction">Total function</label>
<label
for="datatableVisualizationTotalFunction"
i18n-id="tableVis.params.totalFunctionLabel"
i18n-default-message="Total function"
></label>
<select ng-disabled="!editorState.params.showTotal"
class="form-control"
ng-model="editorState.params.totalFunc"