chore: Localization of several charts and elements (#22150)

Co-authored-by: ashumeiko <ashumeiko@ashumeiko.com>
This commit is contained in:
Artem Shumeiko
2023-01-11 19:42:54 +03:00
committed by GitHub
parent 44c9cf4de5
commit f3696ceef3
98 changed files with 748 additions and 663 deletions

View File

@@ -20,7 +20,6 @@ import React from 'react';
import { t } from '@superset-ui/core';
import {
ControlPanelConfig,
formatSelectOptions,
D3_FORMAT_DOCS,
D3_FORMAT_OPTIONS,
D3_TIME_FORMAT_OPTIONS,
@@ -132,13 +131,13 @@ const config: ControlPanelConfig = {
type: 'SelectControl',
label: t('Rolling Function'),
default: 'None',
choices: formatSelectOptions([
'None',
'mean',
'sum',
'std',
'cumsum',
]),
choices: [
['None', t('None')],
['mean', t('mean')],
['sum', t('sum')],
['std', t('std')],
['cumsum', t('cumsum')],
],
description: t(
'Defines a rolling window function to apply, works along ' +
'with the [Periods] text box',
@@ -185,20 +184,18 @@ const config: ControlPanelConfig = {
multi: true,
freeForm: true,
label: t('Time Shift'),
choices: formatSelectOptions([
'1 day',
'1 week',
'28 days',
'30 days',
'52 weeks',
'1 year',
'104 weeks',
'2 years',
'156 weeks',
'3 years',
'208 weeks',
'4 years',
]),
choices: [
['1 day', t('1 day')],
['1 week', t('1 week')],
['28 days', t('28 days')],
['30 days', t('30 days')],
['52 weeks', t('52 weeks')],
['1 year', t('1 year')],
['104 weeks', t('104 weeks')],
['2 years', t('2 years')],
['156 weeks', t('156 weeks')],
['3 years', t('3 years')],
],
description: t(
'Overlay one or more timeseries from a ' +
'relative time period. Expects relative time deltas ' +
@@ -214,10 +211,10 @@ const config: ControlPanelConfig = {
label: t('Calculation type'),
default: 'values',
choices: [
['values', 'Actual Values'],
['absolute', 'Difference'],
['percentage', 'Percentage change'],
['ratio', 'Ratio'],
['values', t('Actual Values')],
['absolute', t('Difference')],
['percentage', t('Percentage change')],
['ratio', t('Ratio')],
],
description: t(
'How to display time shifts: as individual lines; as the ' +
@@ -236,14 +233,14 @@ const config: ControlPanelConfig = {
freeForm: true,
label: t('Rule'),
default: null,
choices: formatSelectOptions([
'1T',
'1H',
'1D',
'7D',
'1M',
'1AS',
]),
choices: [
['1T', t('1T')],
['1H', t('1H')],
['1D', t('1D')],
['7D', t('7D')],
['1M', t('1M')],
['1AS', t('1AS')],
],
description: t('Pandas resample rule'),
},
},
@@ -254,14 +251,14 @@ const config: ControlPanelConfig = {
freeForm: true,
label: t('Method'),
default: null,
choices: formatSelectOptions([
'asfreq',
'bfill',
'ffill',
'median',
'mean',
'sum',
]),
choices: [
['asfreq', t('asfreq')],
['bfill', t('bfill')],
['ffill', t('ffill')],
['median', t('median')],
['mean', t('mean')],
['sum', t('sum')],
],
description: t('Pandas resample method'),
},
},