mirror of https://github.com/apache/superset.git
[Translations] Restored lost French translations (#3645)
* Added some missing translations squash * Restored previous French translations
This commit is contained in:
parent
76f8d33d81
commit
4a3c09187a
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||
import { Button, Panel, Grid, Row, Col } from 'react-bootstrap';
|
||||
import Select from 'react-virtualized-select';
|
||||
import visTypes from '../explore/stores/visTypes';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
datasources: PropTypes.arrayOf(PropTypes.shape({
|
||||
|
@ -50,30 +51,30 @@ export default class AddSliceContainer extends React.PureComponent {
|
|||
render() {
|
||||
return (
|
||||
<div className="container">
|
||||
<Panel header={<h3>{('Create a new slice')}</h3>}>
|
||||
<Panel header={<h3>{t('Create a new slice')}</h3>}>
|
||||
<Grid>
|
||||
<Row>
|
||||
<Col xs={12} sm={6}>
|
||||
<div>
|
||||
<p>{('Choose a datasource')}</p>
|
||||
<p>{t('Choose a datasource')}</p>
|
||||
<Select
|
||||
clearable={false}
|
||||
name="select-datasource"
|
||||
onChange={this.changeDatasource.bind(this)}
|
||||
options={this.props.datasources}
|
||||
placeholder={('Choose a datasource')}
|
||||
placeholder={t('Choose a datasource')}
|
||||
value={this.state.datasourceValue}
|
||||
/>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<p>{('Choose a visualization type')}</p>
|
||||
<p>{t('Choose a visualization type')}</p>
|
||||
<Select
|
||||
clearable={false}
|
||||
name="select-vis-type"
|
||||
onChange={this.changeVisType.bind(this)}
|
||||
options={this.vizTypeOptions}
|
||||
placeholder={('Choose a visualization type')}
|
||||
placeholder={t('Choose a visualization type')}
|
||||
value={this.state.visType}
|
||||
/>
|
||||
</div>
|
||||
|
@ -83,7 +84,7 @@ export default class AddSliceContainer extends React.PureComponent {
|
|||
disabled={this.isBtnDisabled()}
|
||||
onClick={this.gotoSlice.bind(this)}
|
||||
>
|
||||
{('Create new slice')}
|
||||
{t('Create new slice')}
|
||||
</Button>
|
||||
<br /><br />
|
||||
</Col>
|
||||
|
|
|
@ -180,7 +180,7 @@ export const controls = {
|
|||
|
||||
sort_x_axis: {
|
||||
type: 'SelectControl',
|
||||
label: 'Sort X Axis',
|
||||
label: t('Sort X Axis'),
|
||||
choices: sortAxisChoices,
|
||||
clearable: false,
|
||||
default: 'alpha_asc',
|
||||
|
@ -188,7 +188,7 @@ export const controls = {
|
|||
|
||||
sort_y_axis: {
|
||||
type: 'SelectControl',
|
||||
label: 'Sort Y Axis',
|
||||
label: t('Sort Y Axis'),
|
||||
choices: sortAxisChoices,
|
||||
clearable: false,
|
||||
default: 'alpha_asc',
|
||||
|
@ -278,9 +278,9 @@ export const controls = {
|
|||
|
||||
show_perc: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Show percentage',
|
||||
label: t('Show percentage'),
|
||||
renderTrigger: true,
|
||||
description: 'Whether to include the percentage in the tooltip',
|
||||
description: t('Whether to include the percentage in the tooltip'),
|
||||
default: true,
|
||||
},
|
||||
|
||||
|
@ -689,9 +689,9 @@ export const controls = {
|
|||
|
||||
order_desc: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Sort Descending',
|
||||
label: t('Sort Descending'),
|
||||
default: true,
|
||||
description: 'Whether to sort descending or ascending',
|
||||
description: t('Whether to sort descending or ascending'),
|
||||
},
|
||||
|
||||
rolling_type: {
|
||||
|
@ -1023,30 +1023,30 @@ export const controls = {
|
|||
|
||||
show_sqla_time_granularity: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Show SQL Granularity Dropdown',
|
||||
label: t('Show SQL Granularity Dropdown'),
|
||||
default: false,
|
||||
description: 'Check to include SQL Granularity dropdown',
|
||||
description: t('Check to include SQL Granularity dropdown'),
|
||||
},
|
||||
|
||||
show_sqla_time_column: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Show SQL Time Column',
|
||||
label: t('Show SQL Time Column'),
|
||||
default: false,
|
||||
description: 'Check to include Time Column dropdown',
|
||||
description: t('Check to include Time Column dropdown'),
|
||||
},
|
||||
|
||||
show_druid_time_granularity: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Show Druid Granularity Dropdown',
|
||||
label: t('Show Druid Granularity Dropdown'),
|
||||
default: false,
|
||||
description: 'Check to include Druid Granularity dropdown',
|
||||
description: t('Check to include Druid Granularity dropdown'),
|
||||
},
|
||||
|
||||
show_druid_time_origin: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Show Druid Time Origin',
|
||||
label: t('Show Druid Time Origin'),
|
||||
default: false,
|
||||
description: 'Check to include Time Origin dropdown',
|
||||
description: t('Check to include Time Origin dropdown'),
|
||||
},
|
||||
|
||||
show_datatable: {
|
||||
|
@ -1430,24 +1430,25 @@ export const controls = {
|
|||
|
||||
significance_level: {
|
||||
type: 'TextControl',
|
||||
label: 'Significance Level',
|
||||
label: t('Significance Level'),
|
||||
default: 0.05,
|
||||
description: 'Threshold alpha level for determining significance',
|
||||
description: t('Threshold alpha level for determining significance'),
|
||||
},
|
||||
|
||||
pvalue_precision: {
|
||||
type: 'TextControl',
|
||||
label: 'p-value precision',
|
||||
label: t('p-value precision'),
|
||||
default: 6,
|
||||
description: 'Number of decimal places with which to display p-values',
|
||||
description: t('Number of decimal places with which to display p-values'),
|
||||
},
|
||||
|
||||
liftvalue_precision: {
|
||||
type: 'TextControl',
|
||||
label: 'Lift % precision',
|
||||
label: t('Lift percent precision'),
|
||||
default: 4,
|
||||
description: 'Number of decimal places with which to display lift values',
|
||||
description: t('Number of decimal places with which to display lift values'),
|
||||
},
|
||||
|
||||
column_collection: {
|
||||
type: 'CollectionControl',
|
||||
label: t('Time Series Columns'),
|
||||
|
|
|
@ -420,7 +420,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Pivot Options',
|
||||
label: t('Pivot Options'),
|
||||
controlSetRows: [
|
||||
['pandas_aggfunc', 'pivot_margins'],
|
||||
['number_format', 'combine_metric'],
|
||||
|
@ -466,7 +466,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Options',
|
||||
label: t('Options'),
|
||||
controlSetRows: [
|
||||
['size_from', 'size_to'],
|
||||
['rotation'],
|
||||
|
@ -515,7 +515,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Options',
|
||||
label: t('Options'),
|
||||
controlSetRows: [
|
||||
['domain_granularity'],
|
||||
['subdomain_granularity'],
|
||||
|
@ -608,7 +608,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Chart Options',
|
||||
label: t('Chart Options'),
|
||||
controlSetRows: [
|
||||
['metric'],
|
||||
['ranges', 'range_labels'],
|
||||
|
@ -630,7 +630,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Chart Options',
|
||||
label: t('Chart Options'),
|
||||
controlSetRows: [
|
||||
['compare_lag', 'compare_suffix'],
|
||||
['y_axis_format', null],
|
||||
|
@ -655,7 +655,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Chart Options',
|
||||
label: t('Chart Options'),
|
||||
controlSetRows: [
|
||||
['subheader'],
|
||||
['y_axis_format'],
|
||||
|
@ -954,7 +954,7 @@ export const visTypes = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: 'Options',
|
||||
label: t('Options'),
|
||||
controlSetRows: [
|
||||
['show_datatable', 'include_series'],
|
||||
],
|
||||
|
@ -995,7 +995,7 @@ export const visTypes = {
|
|||
validators: [v.nonEmpty],
|
||||
},
|
||||
y_axis_bounds: {
|
||||
label: 'Value bounds',
|
||||
label: t('Value bounds'),
|
||||
renderTrigger: false,
|
||||
description: (
|
||||
'Hard value bounds applied for color coding. Is only relevant ' +
|
||||
|
@ -1004,7 +1004,7 @@ export const visTypes = {
|
|||
),
|
||||
},
|
||||
y_axis_format: {
|
||||
label: 'Value Format',
|
||||
label: t('Value Format'),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1139,13 +1139,13 @@ export const visTypes = {
|
|||
},
|
||||
|
||||
paired_ttest: {
|
||||
label: 'Time Series - Paired t-test',
|
||||
label: t('Time Series - Paired t-test'),
|
||||
showOnExplore: true,
|
||||
requiresTime: true,
|
||||
controlPanelSections: [
|
||||
sections.NVD3TimeSeries[0],
|
||||
{
|
||||
label: 'Paired t-test',
|
||||
label: t('Paired t-test'),
|
||||
expanded: false,
|
||||
controlSetRows: [
|
||||
['significance_level'],
|
||||
|
|
|
@ -4,17 +4,18 @@
|
|||
* as arguments and return something that evals to false if v is valid,
|
||||
* and an error message if not valid.
|
||||
* */
|
||||
import { t } from '../locales';
|
||||
|
||||
export function numeric(v) {
|
||||
if (v && isNaN(v)) {
|
||||
return 'is expected to be a number';
|
||||
return t('is expected to be a number');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function integer(v) {
|
||||
if (v && (isNaN(v) || parseInt(v, 10) !== +(v))) {
|
||||
return 'is expected to be an integer';
|
||||
return t('is expected to be an integer');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +27,7 @@ export function nonEmpty(v) {
|
|||
v === '' ||
|
||||
(Array.isArray(v) && v.length === 0)
|
||||
) {
|
||||
return 'cannot be empty';
|
||||
return t('cannot be empty');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue