diff --git a/x-pack/legacy/plugins/lens/public/datatable_visualization_plugin/visualization.tsx b/x-pack/legacy/plugins/lens/public/datatable_visualization_plugin/visualization.tsx index b81f3bc0a44f9..79333ee7f820e 100644 --- a/x-pack/legacy/plugins/lens/public/datatable_visualization_plugin/visualization.tsx +++ b/x-pack/legacy/plugins/lens/public/datatable_visualization_plugin/visualization.tsx @@ -134,7 +134,15 @@ export const datatableVisualization: Visualization< const title = i18n.translate('xpack.lens.datatable.visualizationOf', { defaultMessage: 'Table: {operations}', values: { - operations: table.columns.map(col => col.operation.label).join(' & '), + operations: table.columns + .map(col => col.operation.label) + .join( + i18n.translate('xpack.lens.datatable.conjunctionSign', { + defaultMessage: ' & ', + description: + 'A character that can be used for conjunction of multiple enumarated items. Make sure to include spaces around it if needed.', + }) + ), }, }); diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/dimension_panel/popover_editor.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/dimension_panel/popover_editor.tsx index 2b1e0da83d877..34f766e3a2d0a 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/dimension_panel/popover_editor.tsx +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/dimension_panel/popover_editor.tsx @@ -317,7 +317,12 @@ export function PopoverEditor(props: PopoverEditorProps) { /> )} {!incompatibleSelectedOperationType && selectedColumn && ( - + { - const yTitle = yValues.map(col => col.operation.label).join(' & '); + const yTitle = yValues + .map(col => col.operation.label) + .join( + i18n.translate('xpack.lens.xySuggestions.yAxixConjunctionSign', { + defaultMessage: ' & ', + description: + 'A character that can be used for conjunction of multiple enumarated items. Make sure to include spaces around it if needed.', + }) + ); const xTitle = xValue.operation.label; const isDate = xValue.operation.dataType === 'date'; - // TODO: Localize the title, label, etc - const preposition = isDate ? 'over' : 'of'; - const title = `${yTitle} ${preposition} ${xTitle}`; + const title = isDate + ? i18n.translate('xpack.lens.xySuggestions.dateSuggestion', { + defaultMessage: '{yTitle} over {xTitle}', + description: + 'Chart description for charts over time, like "Transfered bytes over log.timestamp"', + values: { xTitle, yTitle }, + }) + : i18n.translate('xpack.lens.xySuggestions.nonDateSuggestion', { + defaultMessage: '{yTitle} of {xTitle}', + description: + 'Chart description for a value of some groups, like "Top URLs of top 5 countries"', + values: { xTitle, yTitle }, + }); const seriesType: SeriesType = (currentState && currentState.preferredSeriesType) || (splitBy && isDate ? 'line' : 'bar'); const state: State = {