Skip to content

Commit

Permalink
Rename "slice" to "chart" and update translations (apache#5008)
Browse files Browse the repository at this point in the history
* Rename slice to chart and update translations

* Fix unit tests
  • Loading branch information
betodealmeida authored and michellethomas committed May 23, 2018
1 parent 5dfde35 commit 30de17a
Show file tree
Hide file tree
Showing 40 changed files with 56,823 additions and 21,135 deletions.
2 changes: 1 addition & 1 deletion superset/assets/src/addSlice/AddSliceContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class AddSliceContainer extends React.PureComponent {
disabled={this.isBtnDisabled()}
onClick={this.gotoSlice.bind(this)}
>
{t('Create new slice')}
{t('Create new chart')}
</Button>
<br /><br />
</Panel>
Expand Down
4 changes: 2 additions & 2 deletions superset/assets/src/dashboard/components/Controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ class Controls extends React.PureComponent {
userId={userId}
triggerNode={
<MenuItemContent
text={t('Add Slices')}
tooltip={t('Add some slices to this dashboard')}
text={t('Add Charts')}
tooltip={t('Add some charts to this dashboard')}
faIcon="plus"
/>
}
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/explore/components/SaveModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SaveModal extends React.Component {
if (sliceParams.action === 'saveas') {
sliceName = this.state.newSliceName;
if (sliceName === '') {
this.setState({ alert: t('Please enter a slice name') });
this.setState({ alert: t('Please enter a chart name') });
return;
}
sliceParams.slice_name = sliceName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class URLShortLinkButton extends React.Component {
}

renderPopover() {
const emailBody = t('Check out this slice: %s', this.state.shortUrl);
const emailBody = t('Check out this chart: %s', this.state.shortUrl);
return (
<Popover id="shorturl-popover">
<CopyToClipboard
Expand Down
4 changes: 2 additions & 2 deletions superset/assets/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1853,9 +1853,9 @@ export const controls = {

slice_id: {
type: 'HiddenControl',
label: t('Slice ID'),
label: t('Chart ID'),
hidden: true,
description: t('The id of the active slice'),
description: t('The id of the active chart'),
},

cache_timeout: {
Expand Down
4 changes: 2 additions & 2 deletions superset/assets/src/profile/components/CreatedContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CreatedContent extends React.PureComponent {
className="table table-condensed"
columns={['slice', 'favorited']}
mutator={mutator}
noDataText={t('No slices')}
noDataText={t('No charts')}
sortable
/>
);
Expand Down Expand Up @@ -58,7 +58,7 @@ class CreatedContent extends React.PureComponent {
<h3>{t('Dashboards')}</h3>
{this.renderDashboardTable()}
<hr />
<h3>{t('Slices')}</h3>
<h3>{t('Charts')}</h3>
{this.renderSliceTable()}
</div>
);
Expand Down
12 changes: 6 additions & 6 deletions superset/connectors/druid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ class DruidDatasourceModelView(DatasourceModelView, DeleteMixin, YamlExportMixin
base_order = ('datasource_name', 'asc')
description_columns = {
'slices': _(
'The list of slices associated with this table. By '
'The list of charts associated with this table. By '
'altering this datasource, you may change how these associated '
'slices behave. '
'Also note that slices need to point to a datasource, so '
'this form will fail at saving if removing slices from a '
'datasource. If you want to change the datasource for a slice, '
"overwrite the slice from the 'explore view'"),
'charts behave. '
'Also note that charts need to point to a datasource, so '
'this form will fail at saving if removing charts from a '
'datasource. If you want to change the datasource for a chart, '
"overwrite the chart from the 'explore view'"),
'offset': _('Timezone offset (in hours) for this datasource'),
'description': Markup(
'Supports <a href="'
Expand Down
12 changes: 6 additions & 6 deletions superset/connectors/sqla/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ class TableModelView(DatasourceModelView, DeleteMixin, YamlExportMixin): # noqa
)
description_columns = {
'slices': _(
'The list of slices associated with this table. By '
'The list of charts associated with this table. By '
'altering this datasource, you may change how these associated '
'slices behave. '
'Also note that slices need to point to a datasource, so '
'this form will fail at saving if removing slices from a '
'datasource. If you want to change the datasource for a slice, '
"overwrite the slice from the 'explore view'"),
'charts behave. '
'Also note that charts need to point to a datasource, so '
'this form will fail at saving if removing charts from a '
'datasource. If you want to change the datasource for a chart, '
"overwrite the chart from the 'explore view'"),
'offset': _('Timezone offset (in hours) for this datasource'),
'table_name': _(
'Name of the table that exists in the source database'),
Expand Down
6 changes: 2 additions & 4 deletions superset/translations/babel.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[ignore: superset/assets/node_modules/**]
[python: superset/**.py]
[jinja2: superset/**/templates/**.html]
[javascript: superset/assets/javascripts/**.js]
[javascript: superset/assets/javascripts/**.jsx]
[javascript: superset/assets/visualizations/**.js]
[javascript: superset/assets/visualizations/**.jsx]
[javascript: superset/assets/src/**.js]
[javascript: superset/assets/src/**.jsx]
encoding = utf-8
2 changes: 1 addition & 1 deletion superset/translations/de/LC_MESSAGES/messages.json

Large diffs are not rendered by default.

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

0 comments on commit 30de17a

Please sign in to comment.