Skip to content

Commit

Permalink
Add chart names translation (#6273)
Browse files Browse the repository at this point in the history
* add translation for chart names

* add translation for all chart names

* add missing translation
  • Loading branch information
kristw authored and williaster committed Nov 5, 2018
1 parent a1e408a commit 7373be7
Show file tree
Hide file tree
Showing 45 changed files with 92 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Big Number with Trendline',
name: t('Big Number with Trendline'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from '../BigNumber/transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Big Number',
name: t('Big Number'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Calendar Heatmap',
name: t('Calendar Heatmap'),
description: '',
credits: ['https://github.com/wa0x6e/cal-heatmap'],
thumbnail,
Expand Down
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/Chord/ChordChartPlugin.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Chord Diagram',
name: t('Chord Diagram'),
description: '',
credits: ['https://github.com/d3/d3-chord'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Country Map',
name: t('Country Map'),
description: '',
credits: ['https://bl.ocks.org/john-guerra'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Event Flow',
name: t('Event Flow'),
description: '',
credits: ['https://github.com/williaster/data-ui'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Filter Box',
name: t('Filter Box'),
description: 'A multi filter, multi-choice filter box to make dashboards interactive',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Force-directed Graph',
name: t('Force-directed Graph'),
description: '',
credits: ['http://bl.ocks.org/d3noob/5141278'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Heatmap',
name: t('Heatmap'),
description: '',
credits: ['http://bl.ocks.org/mbostock/3074470'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Histogram',
name: t('Histogram'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Horizon Chart',
name: t('Horizon Chart'),
description: '',
credits: ['http://kmandov.github.io/d3-horizon-chart/'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'MapBox',
name: t('MapBox'),
description: '',
credits: ['https://www.mapbox.com/mapbox-gl-js/api/'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Paired t-test Table',
name: t('Paired t-test Table'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Parallel Coordinates',
name: t('Parallel Coordinates'),
description: '',
credits: ['https://syntagmatic.github.io/parallel-coordinates'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Partition Chart',
name: t('Partition Chart'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Pivot Table',
name: t('Pivot Table'),
description: '',
thumbnail,
});
Expand Down
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/Rose/RoseChartPlugin.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Nightingale Rose Chart',
name: t('Nightingale Rose Chart'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Sankey Diagram',
name: t('Sankey Diagram'),
description: '',
credits: ['https://github.com/d3/d3-sankey'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Sunburst Chart',
name: t('Sunburst Chart'),
description: '',
credits: ['https://bl.ocks.org/kerryrodden/7090426'],
thumbnail,
Expand Down
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/Table/TableChartPlugin.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
import { ANNOTATION_TYPES } from '../../modules/AnnotationTypes';

const metadata = new ChartMetadata({
name: 'Table',
name: t('Table'),
description: '',
canBeAnnotationTypes: [
ANNOTATION_TYPES.EVENT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Time-series Table',
name: t('Time-series Table'),
description: '',
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Treemap',
name: t('Treemap'),
description: '',
credits: ['https://d3js.org'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../core/models/ChartPlugin';
import ChartMetadata from '../core/models/ChartMetadata';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

const metadata = new ChartMetadata({
name: 'Word Cloud',
name: t('World Map'),
description: '',
credits: ['http://datamaps.github.io/'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../core/models/ChartPlugin';
import ChartMetadata from '../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Multiple Layers',
name: t('deck.gl Multiple Layers'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Arc',
name: t('deck.gl Arc'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Geojson',
name: t('deck.gl Geojson'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Grid',
name: t('deck.gl Grid'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl 3D Hexagon',
name: t('deck.gl 3D Hexagon'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Path',
name: t('deck.gl Path'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { t } from '@superset-ui/translation';
import ChartPlugin from '../../../core/models/ChartPlugin';
import ChartMetadata from '../../../core/models/ChartMetadata';
import thumbnail from './images/thumbnail.png';
import transformProps from '../../transformProps';

const metadata = new ChartMetadata({
name: 'deck.gl Polygon',
name: t('deck.gl Polygon'),
description: '',
credits: ['https://uber.github.io/deck.gl'],
thumbnail,
Expand Down
Loading

0 comments on commit 7373be7

Please sign in to comment.