You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2026/03/12 20:51:31 UTC

(superset) branch semantic-layer-rename-database-dataset updated: Revert some aggressive renames

This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch semantic-layer-rename-database-dataset
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/semantic-layer-rename-database-dataset by this push:
     new 5e41aae76d3 Revert some aggressive renames
5e41aae76d3 is described below

commit 5e41aae76d33bdaf109e8e1ee0bcb4bc912b8ee5
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Thu Mar 12 12:05:22 2026 -0400

    Revert some aggressive renames
---
 superset-frontend/src/components/Chart/Chart.tsx           |  3 +--
 .../src/components/Datasource/DatasourceModal/index.tsx    |  7 +++----
 .../components/DatasourceEditor/DatasourceEditor.tsx       |  3 +--
 superset-frontend/src/components/ImportModal/index.tsx     |  3 +--
 .../src/explore/components/DatasourcePanel/index.tsx       |  3 +--
 .../src/explore/components/ExploreChartPanel/index.tsx     |  5 ++---
 superset-frontend/src/explore/components/SaveModal.tsx     |  8 +++-----
 .../DndColumnSelectControl/ColumnSelectPopover.tsx         |  7 +++----
 .../MetricControl/AdhocMetricEditPopover/index.tsx         |  3 +--
 .../explore/components/controls/ViewQueryModalFooter.tsx   |  3 +--
 superset-frontend/src/features/home/RightMenu.tsx          | 14 +++++---------
 superset-frontend/src/pages/ChartCreation/index.tsx        |  6 ++----
 12 files changed, 24 insertions(+), 41 deletions(-)

diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx
index c20ca163c95..a7e38aa61a4 100644
--- a/superset-frontend/src/components/Chart/Chart.tsx
+++ b/superset-frontend/src/components/Chart/Chart.tsx
@@ -46,7 +46,6 @@ import { Dispatch } from 'redux';
 import ChartRenderer from './ChartRenderer';
 import { ChartErrorMessage } from './ChartErrorMessage';
 import { getChartRequiredFieldsMissingMessage } from '../../utils/getChartRequiredFieldsMissingMessage';
-import { databaseLabelLower } from 'src/utils/semanticLayerLabels';
 
 export type ChartErrorType = Partial<ClientErrorObject>;
 export interface ChartProps {
@@ -313,7 +312,7 @@ class Chart extends PureComponent<ChartProps, {}> {
   renderSpinner(databaseName: string | undefined) {
     const message = databaseName
       ? t('Waiting on %s', databaseName)
-      : t('Waiting on %s...', databaseLabelLower());
+      : t('Waiting on database...');
 
     return (
       <LoadingDiv>
diff --git a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx
index ef4033331fc..d3e34b76484 100644
--- a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx
+++ b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx
@@ -40,7 +40,6 @@ import withToasts from 'src/components/MessageToasts/withToasts';
 import { ErrorMessageWithStackTrace } from 'src/components';
 import type { DatasetObject } from 'src/features/datasets/types';
 import type { DatasourceModalProps } from '../types';
-import { datasetLabel, datasetLabelLower } from 'src/utils/semanticLayerLabels';
 
 const DatasourceEditor = AsyncEsmComponent(
   () => import('../components/DatasourceEditor'),
@@ -196,7 +195,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
         endpoint: `/api/v1/dataset/${currentDatasource?.id}`,
       });
 
-      addSuccessToast(t('The %s has been saved', datasetLabelLower()));
+      addSuccessToast(t('The dataset has been saved'));
       // eslint-disable-next-line no-param-reassign
       json.result.type = 'table';
       onDatasourceSave({
@@ -217,7 +216,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
         errorText = error.error;
       }
       modal.error({
-        title: t('Error saving %s', datasetLabelLower()),
+        title: t('Error saving dataset'),
         okButtonProps: { danger: true, className: 'btn-danger' },
         content: (
           <ErrorMessageWithStackTrace
@@ -327,7 +326,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
             `}
             data-test="edit-alt"
           />
-          {t('Edit %s ', datasetLabel())}
+          {t('Edit Dataset ')}
           <strong>{currentDatasource.table_name}</strong>
         </span>
       }
diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx
index ba8710bf2d2..6150927ca6a 100644
--- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx
+++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx
@@ -101,7 +101,6 @@ import {
 } from '../../FoldersEditor/treeUtils';
 import FoldersEditor from '../../FoldersEditor';
 import { DatasourceFolder } from 'src/explore/components/DatasourcePanel/types';
-import { datasetLabel } from 'src/utils/semanticLayerLabels';
 
 const extensionsRegistry = getExtensionsRegistry();
 
@@ -1907,7 +1906,7 @@ class DatasourceEditor extends PureComponent<
                             onChange={table => {
                               this.onDatasourcePropChange('table_name', table);
                             }}
-                            placeholder={t('%s name', datasetLabel())}
+                            placeholder={t('Dataset name')}
                             disabled={!this.state.isEditMode}
                           />
                         }
diff --git a/superset-frontend/src/components/ImportModal/index.tsx b/superset-frontend/src/components/ImportModal/index.tsx
index a3097803b14..b046abf8880 100644
--- a/superset-frontend/src/components/ImportModal/index.tsx
+++ b/superset-frontend/src/components/ImportModal/index.tsx
@@ -29,7 +29,6 @@ import { Button, Input, Modal } from '@superset-ui/core/components';
 import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon';
 import { ImportErrorAlert } from './ImportErrorAlert';
 import type { ImportModelsModalProps } from './types';
-import { databaseLabel } from 'src/utils/semanticLayerLabels';
 
 const HelperMessage = styled.div`
   display: block;
@@ -248,7 +247,7 @@ export const ImportModal: FunctionComponent<ImportModelsModalProps> = ({
 
     return (
       <>
-        <h5>{t('%s passwords', databaseLabel())}</h5>
+        <h5>{t('Database passwords')}</h5>
         <HelperMessage>{passwordsNeededMessage}</HelperMessage>
         {files.map(fileName => (
           <>
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
index 8a340c55f25..74718ae3751 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
@@ -22,7 +22,6 @@ import { DatasourceType, Metric, QueryFormData } from '@superset-ui/core';
 import { Alert } from '@apache-superset/core/components';
 import { css, styled, useTheme } from '@apache-superset/core/theme';
 
-import { datasetLabelLower } from 'src/utils/semanticLayerLabels';
 import { ControlConfig } from '@superset-ui/chart-controls';
 import AutoSizer from 'react-virtualized-auto-sizer';
 
@@ -292,7 +291,7 @@ export default function DataSourcePanel({
                       onClick={() => setShowSaveDatasetModal(true)}
                       className="add-dataset-alert-description"
                     >
-                      {t('Create a %s', datasetLabelLower())}
+                      {t('Create a dataset')}
                     </span>
                     {t(' to edit or add columns and metrics.')}
                   </>
diff --git a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
index fbfce00da15..c692e65bfd1 100644
--- a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
@@ -31,7 +31,6 @@ import {
   getExtensionsRegistry,
 } from '@superset-ui/core';
 import { Alert } from '@apache-superset/core/components';
-import { datasetLabelLower } from 'src/utils/semanticLayerLabels';
 import { css, styled, useTheme } from '@apache-superset/core/theme';
 import ChartContainer from 'src/components/Chart/ChartContainer';
 import {
@@ -326,7 +325,7 @@ const ExploreChartPanel = ({
       >
         {vizTypeNeedsDataset && (
           <Alert
-            message={t('Chart type requires a %s', datasetLabelLower())}
+            message={t('Chart type requires a dataset')}
             type="error"
             css={theme => css`
               margin: 0 0 ${theme.sizeUnit * 4}px 0;
@@ -342,7 +341,7 @@ const ExploreChartPanel = ({
                   onClick={() => setShowDatasetModal(true)}
                   css={{ textDecoration: 'underline' }}
                 >
-                  {t('Create a %s', datasetLabelLower())}
+                  {t('Create a dataset')}
                 </span>
                 {t(' to visualize your data.')}
               </>
diff --git a/superset-frontend/src/explore/components/SaveModal.tsx b/superset-frontend/src/explore/components/SaveModal.tsx
index 2d05d1817e0..a78b4ce7dc1 100644
--- a/superset-frontend/src/explore/components/SaveModal.tsx
+++ b/superset-frontend/src/explore/components/SaveModal.tsx
@@ -59,7 +59,6 @@ import {
 import { Dashboard } from 'src/types/Dashboard';
 import { TabNode, TabTreeNode } from '../types';
 import { CHART_WIDTH, CHART_HEIGHT } from 'src/dashboard/constants';
-import { datasetLabel } from 'src/utils/semanticLayerLabels';
 
 // Session storage key for recent dashboard
 const SK_DASHBOARD_ID = 'save_chart_recent_dashboard';
@@ -636,12 +635,11 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
           <FormItem
             label={
               <Flex align="center" gap={this.props.theme.sizeUnit}>
-                {t('%s Name', datasetLabel())}
+                {t('Dataset Name')}
                 <InfoTooltip
                   data-test="info-tooltip-icon"
                   tooltip={t(
-                    'A reusable %s will be saved with your chart.',
-                    datasetLabel().toLowerCase(),
+                    'A reusable dataset will be saved with your chart.',
                   )}
                   placement="right"
                 />
@@ -652,7 +650,7 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
             <Input
               name="dataset_name"
               type="text"
-              placeholder={t('%s Name', datasetLabel())}
+              placeholder={t('Dataset Name')}
               value={this.state.datasetName}
               onChange={this.handleDatasetNameChange}
               data-test="new-dataset-name"
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
index bd8ab88c700..f61fafe8bcb 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
@@ -57,7 +57,6 @@ import {
 } from 'src/explore/constants';
 import { ExplorePageState } from 'src/explore/types';
 import useResizeButton from './useResizeButton';
-import { datasetLabelLower } from 'src/utils/semanticLayerLabels';
 
 const TABS_KEYS = {
   SAVED: 'saved',
@@ -473,7 +472,7 @@ const ColumnSelectPopover = ({
                                   tabIndex={0}
                                   onClick={setDatasetAndClose}
                                 >
-                                  {t('Create a %s', datasetLabelLower())}
+                                  {t('Create a dataset')}
                                 </span>{' '}
                                 {t(' to mark a column as a time column')}
                               </>
@@ -484,7 +483,7 @@ const ColumnSelectPopover = ({
                                   tabIndex={0}
                                   onClick={setDatasetAndClose}
                                 >
-                                  {t('Create a %s', datasetLabelLower())}
+                                  {t('Create a dataset')}
                                 </span>{' '}
                                 {t(' to add calculated columns')}
                               </>
@@ -518,7 +517,7 @@ const ColumnSelectPopover = ({
                             tabIndex={0}
                             onClick={setDatasetAndClose}
                           >
-                            {t('Create a %s', datasetLabelLower())}
+                            {t('Create a dataset')}
                           </span>{' '}
                           {t(' to mark a column as a time column')}
                         </>
diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx
index 000ac461e9c..031248df0a0 100644
--- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx
+++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx
@@ -49,7 +49,6 @@ import {
 import { getColumnKeywords } from 'src/explore/controlUtils/getColumnKeywords';
 import SQLEditorWithValidation from 'src/components/SQLEditorWithValidation';
 import type { RefObject } from 'react';
-import { datasetLabelLower } from 'src/utils/semanticLayerLabels';
 
 interface ColumnType {
   column_name: string;
@@ -476,7 +475,7 @@ export default class AdhocMetricEditPopover extends PureComponent<
                             this.props.onClose();
                           }}
                         >
-                          {t('Create a %s', datasetLabelLower())}
+                          {t('Create a dataset')}
                         </span>
                         {t(' to add metrics')}
                       </>
diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
index ee14b70436f..fc8c7c948b2 100644
--- a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
+++ b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
@@ -22,7 +22,6 @@ import { t } from '@apache-superset/core/translation';
 import { SupersetClient } from '@superset-ui/core';
 import { Button } from '@superset-ui/core/components';
 import { useHistory } from 'react-router-dom';
-import { datasetLabel } from 'src/utils/semanticLayerLabels';
 
 interface SimpleDataSource {
   id: string;
@@ -37,7 +36,7 @@ interface ViewQueryModalFooterProps {
 }
 
 const CLOSE = t('Close');
-const SAVE_AS_DATASET = t('Save as %s', datasetLabel());
+const SAVE_AS_DATASET = t('Save as Dataset');
 const OPEN_IN_SQL_LAB = t('Open in SQL Lab');
 
 const ViewQueryModalFooter: FC<ViewQueryModalFooterProps> = (props: {
diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx
index ea35f46db16..28c25498642 100644
--- a/superset-frontend/src/features/home/RightMenu.tsx
+++ b/superset-frontend/src/features/home/RightMenu.tsx
@@ -66,10 +66,6 @@ import {
   RightMenuProps,
 } from './types';
 import { NAVBAR_MENU_POPUP_OFFSET } from './commonMenuData';
-import {
-  datasetLabelLower,
-  databaseLabelLower,
-} from 'src/utils/semanticLayerLabels';
 
 const extensionsRegistry = getExtensionsRegistry();
 
@@ -180,12 +176,12 @@ const RightMenu = ({
       icon: <Icons.DatabaseOutlined data-test={`menu-item-${t('Data')}`} />,
       childs: [
         {
-          label: t('Connect %s', databaseLabelLower()),
+          label: t('Connect database'),
           name: GlobalMenuDataOptions.DbConnection,
           perm: canDatabase && !nonExamplesDBConnected,
         },
         {
-          label: t('Create %s', datasetLabelLower()),
+          label: t('Create dataset'),
           name: GlobalMenuDataOptions.DatasetCreation,
           url: '/dataset/add/',
           perm: canDataset && nonExamplesDBConnected,
@@ -196,19 +192,19 @@ const RightMenu = ({
           perm: canDatabase && HAS_GSHEETS_INSTALLED,
         },
         {
-          label: t('Upload CSV to %s', databaseLabelLower()),
+          label: t('Upload CSV to database'),
           name: GlobalMenuDataOptions.CSVUpload,
           perm: canUploadCSV && showUploads,
           disable: isAdmin && !allowUploads,
         },
         {
-          label: t('Upload Excel to %s', databaseLabelLower()),
+          label: t('Upload Excel to database'),
           name: GlobalMenuDataOptions.ExcelUpload,
           perm: canUploadExcel && showUploads,
           disable: isAdmin && !allowUploads,
         },
         {
-          label: t('Upload Columnar file to %s', databaseLabelLower()),
+          label: t('Upload Columnar file to database'),
           name: GlobalMenuDataOptions.ColumnarUpload,
           perm: canUploadColumnar && showUploads,
           disable: isAdmin && !allowUploads,
diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx
index 05a7b8f3486..ab8b102098b 100644
--- a/superset-frontend/src/pages/ChartCreation/index.tsx
+++ b/superset-frontend/src/pages/ChartCreation/index.tsx
@@ -211,9 +211,7 @@ export class ChartCreation extends PureComponent<
         .catch(() => {
           this.setState({ loading: false });
         });
-      this.props.addSuccessToast(
-        t('The %s has been saved', datasetLabelLower()),
-      );
+      this.props.addSuccessToast(t('The dataset has been saved'));
     }
   }
 
@@ -298,7 +296,7 @@ export class ChartCreation extends PureComponent<
     const datasetHelpText = this.state.canCreateDataset ? (
       <span data-test="dataset-write">
         <Link to="/dataset/add/" data-test="add-chart-new-dataset">
-          {t('Add a %s', datasetLabelLower())}
+          {t('Add a dataset')}
         </Link>{' '}
         {t('or')}{' '}
         <a