Skip to content
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

[Translations] Restored lost French translations #3645

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions superset/assets/javascripts/addSlice/AddSliceContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
41 changes: 21 additions & 20 deletions superset/assets/javascripts/explore/stores/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ export const controls = {

sort_x_axis: {
type: 'SelectControl',
label: 'Sort X Axis',
label: t('Sort X Axis'),
choices: sortAxisChoices,
clearable: false,
default: 'alpha_asc',
},

sort_y_axis: {
type: 'SelectControl',
label: 'Sort Y Axis',
label: t('Sort Y Axis'),
choices: sortAxisChoices,
clearable: false,
default: 'alpha_asc',
Expand Down Expand Up @@ -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,
},

Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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'),
Expand Down
22 changes: 11 additions & 11 deletions superset/assets/javascripts/explore/stores/visTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export const visTypes = {
],
},
{
label: 'Pivot Options',
label: t('Pivot Options'),
controlSetRows: [
['pandas_aggfunc', 'pivot_margins'],
['number_format', 'combine_metric'],
Expand Down Expand Up @@ -466,7 +466,7 @@ export const visTypes = {
],
},
{
label: 'Options',
label: t('Options'),
controlSetRows: [
['size_from', 'size_to'],
['rotation'],
Expand Down Expand Up @@ -515,7 +515,7 @@ export const visTypes = {
],
},
{
label: 'Options',
label: t('Options'),
controlSetRows: [
['domain_granularity'],
['subdomain_granularity'],
Expand Down Expand Up @@ -608,7 +608,7 @@ export const visTypes = {
],
},
{
label: 'Chart Options',
label: t('Chart Options'),
controlSetRows: [
['metric'],
['ranges', 'range_labels'],
Expand All @@ -630,7 +630,7 @@ export const visTypes = {
],
},
{
label: 'Chart Options',
label: t('Chart Options'),
controlSetRows: [
['compare_lag', 'compare_suffix'],
['y_axis_format', null],
Expand All @@ -655,7 +655,7 @@ export const visTypes = {
],
},
{
label: 'Chart Options',
label: t('Chart Options'),
controlSetRows: [
['subheader'],
['y_axis_format'],
Expand Down Expand Up @@ -954,7 +954,7 @@ export const visTypes = {
],
},
{
label: 'Options',
label: t('Options'),
controlSetRows: [
['show_datatable', 'include_series'],
],
Expand Down Expand Up @@ -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 ' +
Expand All @@ -1004,7 +1004,7 @@ export const visTypes = {
),
},
y_axis_format: {
label: 'Value Format',
label: t('Value Format'),
},
},
},
Expand Down Expand Up @@ -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'],
Expand Down
7 changes: 4 additions & 3 deletions superset/assets/javascripts/explore/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
2 changes: 1 addition & 1 deletion superset/translations/fr/LC_MESSAGES/messages.json

Large diffs are not rendered by default.

Binary file modified superset/translations/fr/LC_MESSAGES/messages.mo
Binary file not shown.
Loading