-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate heatmap and heatmap_options #23812
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Please fix some comments
<strong>Required:</strong> You must specify at least one range. | ||
<span | ||
i18n-id="kbnVislibVisTypes.controls.heatmapOptions.requiredTitle" | ||
i18n-default-message="<strong>Required:</strong> You must specify at least one range." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use i18n-values for texts containing nested tags
> | ||
Add Range | ||
</button> | ||
i18n-id="kbnVislibVisTypes.controls.heatmapOptions.addRangeButton" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addRangeButton => addRangeButtonLabel
<div class="text text-center text-info">Note: colors can be changed in the legend</div> | ||
<div | ||
class="text text-center text-info" | ||
i18n-id="kbnVislibVisTypes.controls.heatmapOptions.noteTitle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noteTitle => howToChangeColorsDescription
<label | ||
class="kuiSideBarFormRow__label" | ||
for="enableHover" | ||
i18n-id="kbnVislibVisTypes.editors.heatmap.HighlightLabel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HighlightLabel => highlightLabel
@@ -86,7 +86,7 @@ export default function HeatmapVisType(Private) { | |||
{ | |||
group: 'metrics', | |||
name: 'metric', | |||
title: 'Value', | |||
title: i18n('kbnVislibVisTypes.heatmap.valueTitle', { defaultMessage: 'Value' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valueTitle => metricTitle
@@ -97,23 +97,23 @@ export default function HeatmapVisType(Private) { | |||
{ | |||
group: 'buckets', | |||
name: 'segment', | |||
title: 'X-Axis', | |||
title: i18n('kbnVislibVisTypes.heatmap.xAxisTitle', { defaultMessage: 'X-Axis' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xAxisTitle => segmentTitle
min: 0, | ||
max: 1, | ||
aggFilter: ['!geohash_grid', '!filter'] | ||
}, | ||
{ | ||
group: 'buckets', | ||
name: 'group', | ||
title: 'Y-Axis', | ||
title: i18n('kbnVislibVisTypes.heatmap.yAxisTitle', { defaultMessage: 'Y-Axis' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yAxisTitle => groupTitle
💚 Build Succeeded |
💔 Build Failed |
@tibmt add 'kbnVislibVisTypes' to .i18nrc.json for CI to pass CI validation |
<strong>Required:</strong> You must specify at least one range. | ||
</p> | ||
<p | ||
i18n-id="kbnVislibVisTypes.controls.heatmapOptions.requiredTitle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requiredTitle => specifiedRangeNumberWarningMessage
i18n-default-message="{icon} {required} You must specify at least one range." | ||
i18n-values="{ | ||
icon: '<span class="kuiIcon fa-danger text-danger"></span>', | ||
required: '<strong>' + editorState.requiredDescription + '</strong>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requiredDescription => requiredText
@@ -88,6 +88,10 @@ module.directive('heatmapOptions', function () { | |||
$scope.uiState.on('colorChanged', () => { | |||
$scope.customColors = true; | |||
}); | |||
|
|||
$scope.editorState.requiredDescription = i18n('kbnVislibVisTypes.params.ranges.warning.requiredDescription', { | |||
defaultMessage: 'Required:' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requiredDescription => requiredText
💔 Build Failed |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build Succeeded |
i18n-id="kbnVislibVisTypes.controls.heatmapOptions.specifiedRangeNumberWarningMessage" | ||
i18n-default-message="{icon} {required} You must specify at least one range." | ||
i18n-values="{ | ||
icon: '<span class=\'kuiIcon fa-danger text-danger\'></span>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use backtick strings to prevent escaping single quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timroes There is error if we will use backtick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Angular does not allow use backtick strings in template
@@ -88,6 +88,10 @@ module.directive('heatmapOptions', function () { | |||
$scope.uiState.on('colorChanged', () => { | |||
$scope.customColors = true; | |||
}); | |||
|
|||
$scope.editorState.requiredText = i18n('kbnVislibVisTypes.params.ranges.warning.requiredText', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't push this to the editorState
, but use the $scope
directly.
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Translation of Heatmap visualization component
issue #23257
Translation of Heatmap visualization component