make some text in [druid,CRUD,datasource] localizable (#5796)
This commit is contained in:
parent
77fe9ef130
commit
d43813ff09
|
|
@ -7,6 +7,8 @@ import Fieldset from './Fieldset';
|
|||
import { recurseReactClone } from './utils';
|
||||
import './styles.css';
|
||||
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
collection: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
itemGenerator: PropTypes.func,
|
||||
|
|
@ -210,7 +212,7 @@ export default class CRUDCollection extends React.PureComponent {
|
|||
<div>
|
||||
{this.props.allowAddItem &&
|
||||
<Button bsStyle="primary" onClick={this.onAddItem}>
|
||||
<i className="fa fa-plus" /> Add Item
|
||||
<i className="fa fa-plus" /> {t('Add Item')}
|
||||
</Button>}
|
||||
{this.props.extraButtons}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -110,11 +110,11 @@ function ColumnCollectionTable({
|
|||
</FormContainer>
|
||||
}
|
||||
columnLabels={{
|
||||
column_name: 'Column',
|
||||
type: 'Data Type',
|
||||
groupby: 'Is Dimension',
|
||||
is_dttm: 'Is Temporal',
|
||||
filterable: 'Is Filterable',
|
||||
column_name: t('Column'),
|
||||
type: t('Data Type'),
|
||||
groupby: t('Is Dimension'),
|
||||
is_dttm: t('Is Temporal'),
|
||||
filterable: t('Is Filterable'),
|
||||
}}
|
||||
onChange={onChange}
|
||||
itemRenderers={{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class DatasourceModal extends React.PureComponent {
|
|||
}
|
||||
onClickSave() {
|
||||
this.dialog.show({
|
||||
title: 'Confirm save',
|
||||
title: t('Confirm save'),
|
||||
bsSize: 'medium',
|
||||
actions: [
|
||||
Dialog.CancelAction(),
|
||||
|
|
|
|||
|
|
@ -187,11 +187,11 @@ class DruidCluster(Model, AuditMixinNullable, ImportMixin):
|
|||
with session.no_autoflush:
|
||||
session.add(datasource)
|
||||
flasher(
|
||||
'Adding new datasource [{}]'.format(ds_name), 'success')
|
||||
_('Adding new datasource [{}]').format(ds_name), 'success')
|
||||
ds_map[ds_name] = datasource
|
||||
elif refreshAll:
|
||||
flasher(
|
||||
'Refreshing datasource [{}]'.format(ds_name), 'info')
|
||||
_('Refreshing datasource [{}]').format(ds_name), 'info')
|
||||
else:
|
||||
del ds_map[ds_name]
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -341,8 +341,8 @@ class Druid(BaseSupersetView):
|
|||
return redirect('/druidclustermodelview/list/')
|
||||
cluster.metadata_last_refreshed = datetime.now()
|
||||
flash(
|
||||
'Refreshed metadata from cluster '
|
||||
'[' + cluster.cluster_name + ']',
|
||||
_('Refreshed metadata from cluster [{}]').format(
|
||||
cluster.cluster_name),
|
||||
'info')
|
||||
session.commit()
|
||||
return redirect('/druiddatasourcemodelview/list/')
|
||||
|
|
|
|||
Loading…
Reference in New Issue