You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/09/02 11:58:12 UTC

[GitHub] hitdemo closed pull request #5795: make some text in [druid, CRUD, datasource] localizable

hitdemo closed pull request #5795: make some text in [druid,CRUD,datasource] localizable
URL: https://github.com/apache/incubator-superset/pull/5795
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/src/CRUD/CollectionTable.jsx b/superset/assets/src/CRUD/CollectionTable.jsx
index 2cbc132623..514f86660e 100644
--- a/superset/assets/src/CRUD/CollectionTable.jsx
+++ b/superset/assets/src/CRUD/CollectionTable.jsx
@@ -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>
diff --git a/superset/assets/src/datasource/DatasourceEditor.jsx b/superset/assets/src/datasource/DatasourceEditor.jsx
index e57df88d3b..48c240145f 100644
--- a/superset/assets/src/datasource/DatasourceEditor.jsx
+++ b/superset/assets/src/datasource/DatasourceEditor.jsx
@@ -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={{
diff --git a/superset/assets/src/datasource/DatasourceModal.jsx b/superset/assets/src/datasource/DatasourceModal.jsx
index 690dc8e137..2f3dbdc3c3 100644
--- a/superset/assets/src/datasource/DatasourceModal.jsx
+++ b/superset/assets/src/datasource/DatasourceModal.jsx
@@ -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(),
diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index 23b0b736f1..e318fc381a 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -187,11 +187,11 @@ def refresh(self, datasource_names, merge_flag, refreshAll):
                 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
diff --git a/superset/connectors/druid/views.py b/superset/connectors/druid/views.py
index cc0cea9a08..d4875f9e12 100644
--- a/superset/connectors/druid/views.py
+++ b/superset/connectors/druid/views.py
@@ -341,8 +341,8 @@ def refresh_datasources(self, refreshAll=True):
                 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/')


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org