mirror of
https://github.com/apache/superset.git
synced 2026-06-01 05:39:17 +00:00
chore: Added translate functions (#21816)
This commit is contained in:
@@ -413,8 +413,8 @@ class AnnotationLayer extends React.PureComponent {
|
||||
let description = '';
|
||||
if (requiresQuery(sourceType)) {
|
||||
if (sourceType === ANNOTATION_SOURCE_TYPES.NATIVE) {
|
||||
label = 'Annotation layer';
|
||||
description = 'Select the Annotation Layer you would like to use.';
|
||||
label = t('Annotation layer');
|
||||
description = t('Select the Annotation Layer you would like to use.');
|
||||
} else {
|
||||
label = t('Chart');
|
||||
description = t(
|
||||
@@ -426,10 +426,10 @@ class AnnotationLayer extends React.PureComponent {
|
||||
);
|
||||
}
|
||||
} else if (annotationType === ANNOTATION_TYPES.FORMULA) {
|
||||
label = 'Formula';
|
||||
description = `Expects a formula with depending time parameter 'x'
|
||||
label = t('Formula');
|
||||
description = t(`Expects a formula with depending time parameter 'x'
|
||||
in milliseconds since epoch. mathjs is used to evaluate the formulas.
|
||||
Example: '2x+5'`;
|
||||
Example: '2x+5'`);
|
||||
}
|
||||
if (requiresQuery(sourceType)) {
|
||||
return (
|
||||
@@ -464,7 +464,7 @@ class AnnotationLayer extends React.PureComponent {
|
||||
onChange={this.handleValue}
|
||||
validationErrors={
|
||||
!this.isValidFormulaAnnotation(value, annotationType)
|
||||
? ['Bad formula.']
|
||||
? [t('Bad formula.')]
|
||||
: []
|
||||
}
|
||||
/>
|
||||
@@ -656,10 +656,10 @@ class AnnotationLayer extends React.PureComponent {
|
||||
label={t('Style')}
|
||||
// see '../../../visualizations/nvd3_vis.css'
|
||||
options={[
|
||||
{ value: 'solid', label: 'Solid' },
|
||||
{ value: 'dashed', label: 'Dashed' },
|
||||
{ value: 'longDashed', label: 'Long dashed' },
|
||||
{ value: 'dotted', label: 'Dotted' },
|
||||
{ value: 'solid', label: t('Solid') },
|
||||
{ value: 'dashed', label: t('Dashed') },
|
||||
{ value: 'longDashed', label: t('Long dashed') },
|
||||
{ value: 'dotted', label: t('Dotted') },
|
||||
]}
|
||||
value={style}
|
||||
clearable={false}
|
||||
@@ -671,7 +671,7 @@ class AnnotationLayer extends React.PureComponent {
|
||||
label={t('Opacity')}
|
||||
// see '../../../visualizations/nvd3_vis.css'
|
||||
options={[
|
||||
{ value: '', label: 'Solid' },
|
||||
{ value: '', label: t('Solid') },
|
||||
{ value: 'opacityLow', label: '0.2' },
|
||||
{ value: 'opacityMedium', label: '0.5' },
|
||||
{ value: 'opacityHigh', label: '0.8' },
|
||||
@@ -693,7 +693,7 @@ class AnnotationLayer extends React.PureComponent {
|
||||
buttonSize="xsmall"
|
||||
onClick={() => this.setState({ color: AUTOMATIC_COLOR })}
|
||||
>
|
||||
Automatic Color
|
||||
{t('Automatic Color')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user