@@ -661,7 +653,7 @@ export default class ResultSet extends React.PureComponent<
{
- const nowPublished = isPublished ? 'published' : 'hidden';
- dispatch(addSuccessToast(t(`This dashboard is now ${nowPublished}`)));
+ dispatch(
+ addSuccessToast(
+ isPublished
+ ? t('This dashboard is now published')
+ : t('This dashboard is now hidden'),
+ ),
+ );
dispatch(togglePublished(isPublished));
})
.catch(() => {
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index 703f47ec7aff8..9a8a9fde605b3 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -320,7 +320,9 @@ const FilterBar: React.FC = ({
activeKey={editFilterSetId ? TabIds.AllFilters : undefined}
>
@@ -340,7 +342,9 @@ const FilterBar: React.FC = ({
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
index 65ac4fbca2592..ce8978abaa1ca 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
@@ -106,7 +106,7 @@ export default function getControlItemsMap({
initialValue={initColumn}
label={
- {t(`${mainControlItem.config?.label}`) || t('Column')}
+ {mainControlItem.config?.label || t('Column')}
}
rules={[
diff --git a/superset-frontend/src/views/CRUD/alert/AlertList.tsx b/superset-frontend/src/views/CRUD/alert/AlertList.tsx
index c9d8d63461934..7068787650657 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertList.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertList.tsx
@@ -50,6 +50,14 @@ import { AlertObject, AlertState } from './types';
const PAGE_SIZE = 25;
+const AlertStateLabel: Record = {
+ [AlertState.Success]: t('Success'),
+ [AlertState.Working]: t('Working'),
+ [AlertState.Error]: t('Error'),
+ [AlertState.Noop]: t('Not triggered'),
+ [AlertState.Grace]: t('On Grace'),
+};
+
interface AlertListProps {
addDangerToast: (msg: string) => void;
addSuccessToast: (msg: string) => void;
@@ -394,11 +402,17 @@ function AlertList({
operator: FilterOperator.equals,
unfilteredLabel: 'Any',
selects: [
- { label: t(`${AlertState.success}`), value: AlertState.success },
- { label: t(`${AlertState.working}`), value: AlertState.working },
- { label: t(`${AlertState.error}`), value: AlertState.error },
- { label: t(`${AlertState.noop}`), value: AlertState.noop },
- { label: t(`${AlertState.grace}`), value: AlertState.grace },
+ {
+ label: AlertStateLabel[AlertState.Success],
+ value: AlertState.Success,
+ },
+ {
+ label: AlertStateLabel[AlertState.Working],
+ value: AlertState.Working,
+ },
+ { label: AlertStateLabel[AlertState.Error], value: AlertState.Error },
+ { label: AlertStateLabel[AlertState.Noop], value: AlertState.Noop },
+ { label: AlertStateLabel[AlertState.Grace], value: AlertState.Grace },
],
},
{
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index 775423ad76d57..99deaa8cc1fdb 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -1047,9 +1047,13 @@ const AlertReportModal: FunctionComponent = ({
) : (
)}
- {isEditMode
- ? t(`Edit ${isReport ? 'Report' : 'Alert'}`)
- : t(`Add ${isReport ? 'Report' : 'Alert'}`)}
+ {isEditMode && isReport
+ ? t('Edit Report')
+ : isEditMode
+ ? t('Edit Alert')
+ : isReport
+ ? t('Add Report')
+ : t('Add Alert')}
}
>
diff --git a/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx b/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx
index e9c7baff21d55..64e665aeb4c13 100644
--- a/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx
+++ b/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx
@@ -153,7 +153,7 @@ function ExecutionLog({ addDangerToast, isReportEnabled }: ExecutionLogProps) {
name={
- {t(`${alertResource?.type}`)} {alertResource?.name}
+ {alertResource?.type} {alertResource?.name}
Back to all
diff --git a/superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx b/superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx
index 586afc68e91ed..048a12f35e5e5 100644
--- a/superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx
+++ b/superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx
@@ -28,17 +28,17 @@ function getStatusColor(
theme: typeof supersetTheme,
) {
switch (status) {
- case AlertState.working:
+ case AlertState.Working:
return theme.colors.primary.base;
- case AlertState.error:
+ case AlertState.Error:
return theme.colors.error.base;
- case AlertState.success:
+ case AlertState.Success:
return isReportEnabled
? theme.colors.success.base
: theme.colors.alert.base;
- case AlertState.noop:
+ case AlertState.Noop:
return theme.colors.success.base;
- case AlertState.grace:
+ case AlertState.Grace:
return theme.colors.alert.base;
default:
return theme.colors.grayscale.base;
@@ -59,43 +59,43 @@ export default function AlertStatusIcon({
status: '',
};
switch (state) {
- case AlertState.success:
+ case AlertState.Success:
lastStateConfig.icon = isReportEnabled
? Icons.Check
: Icons.AlertSolidSmall;
lastStateConfig.label = isReportEnabled
? t('Report sent')
: t('Alert triggered, notification sent');
- lastStateConfig.status = AlertState.success;
+ lastStateConfig.status = AlertState.Success;
break;
- case AlertState.working:
+ case AlertState.Working:
lastStateConfig.icon = Icons.Running;
lastStateConfig.label = isReportEnabled
? t('Report sending')
: t('Alert running');
- lastStateConfig.status = AlertState.working;
+ lastStateConfig.status = AlertState.Working;
break;
- case AlertState.error:
+ case AlertState.Error:
lastStateConfig.icon = Icons.XSmall;
lastStateConfig.label = isReportEnabled
? t('Report failed')
: t('Alert failed');
- lastStateConfig.status = AlertState.error;
+ lastStateConfig.status = AlertState.Error;
break;
- case AlertState.noop:
+ case AlertState.Noop:
lastStateConfig.icon = Icons.Check;
lastStateConfig.label = t('Nothing triggered');
- lastStateConfig.status = AlertState.noop;
+ lastStateConfig.status = AlertState.Noop;
break;
- case AlertState.grace:
+ case AlertState.Grace:
lastStateConfig.icon = Icons.AlertSolidSmall;
lastStateConfig.label = t('Alert Triggered, In Grace Period');
- lastStateConfig.status = AlertState.grace;
+ lastStateConfig.status = AlertState.Grace;
break;
default:
lastStateConfig.icon = Icons.Check;
lastStateConfig.label = t('Nothing triggered');
- lastStateConfig.status = AlertState.noop;
+ lastStateConfig.status = AlertState.Noop;
}
const Icon = lastStateConfig.icon;
return (
diff --git a/superset-frontend/src/views/CRUD/alert/components/RecipientIcon.tsx b/superset-frontend/src/views/CRUD/alert/components/RecipientIcon.tsx
index b2e8652c537e9..96ca65ccb10cd 100644
--- a/superset-frontend/src/views/CRUD/alert/components/RecipientIcon.tsx
+++ b/superset-frontend/src/views/CRUD/alert/components/RecipientIcon.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t, SupersetTheme, css } from '@superset-ui/core';
+import { SupersetTheme, css } from '@superset-ui/core';
import React, { ReactElement } from 'react';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
@@ -33,13 +33,13 @@ export default function RecipientIcon({ type }: { type: string }) {
label: '',
};
switch (type) {
- case RecipientIconName.email:
+ case RecipientIconName.Email:
recipientIconConfig.icon = ;
- recipientIconConfig.label = t(`${RecipientIconName.email}`);
+ recipientIconConfig.label = RecipientIconName.Email;
break;
- case RecipientIconName.slack:
+ case RecipientIconName.Slack:
recipientIconConfig.icon = ;
- recipientIconConfig.label = t(`${RecipientIconName.slack}`);
+ recipientIconConfig.label = RecipientIconName.Slack;
break;
default:
recipientIconConfig.icon = null;
diff --git a/superset-frontend/src/views/CRUD/alert/types.ts b/superset-frontend/src/views/CRUD/alert/types.ts
index 3f939a03bcfa1..1c40cdb1f9efa 100644
--- a/superset-frontend/src/views/CRUD/alert/types.ts
+++ b/superset-frontend/src/views/CRUD/alert/types.ts
@@ -100,14 +100,14 @@ export type LogObject = {
};
export enum AlertState {
- success = 'Success',
- working = 'Working',
- error = 'Error',
- noop = 'Not triggered',
- grace = 'On Grace',
+ Success = 'Success',
+ Working = 'Working',
+ Error = 'Error',
+ Noop = 'Not triggered',
+ Grace = 'On Grace',
}
export enum RecipientIconName {
- email = 'Email',
- slack = 'Slack',
+ Email = 'Email',
+ Slack = 'Slack',
}
diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts
index 057e4799aea40..f9b7a1ed98ccb 100644
--- a/superset-frontend/src/views/CRUD/hooks.ts
+++ b/superset-frontend/src/views/CRUD/hooks.ts
@@ -623,7 +623,7 @@ export const testDatabaseConnection = (
addSuccessToast(t('Connection looks good!'));
},
createErrorHandler((errMsg: Record | string) => {
- handleErrorMsg(t(`${t('ERROR: ')}${parsedErrorMessage(errMsg)}`));
+ handleErrorMsg(t('ERROR: %s', parsedErrorMessage(errMsg)));
}),
);
};
diff --git a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
index 930cfca8220fb..f9d026c6ee0e1 100644
--- a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
@@ -16,18 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useState, useEffect } from 'react';
+import React, { useEffect, useState } from 'react';
import moment from 'moment';
import { styled, t } from '@superset-ui/core';
import { setInLocalStorage } from 'src/utils/localStorageHelpers';
import ListViewCard from 'src/components/ListViewCard';
import SubMenu from 'src/components/Menu/SubMenu';
-import { LoadingCards, ActivityData } from 'src/views/CRUD/welcome/Welcome';
+import { ActivityData, LoadingCards } from 'src/views/CRUD/welcome/Welcome';
import {
+ CardContainer,
CardStyles,
getEditedObjects,
- CardContainer,
} from 'src/views/CRUD/utils';
import { HOMEPAGE_ACTIVITY_FILTER } from 'src/views/CRUD/storageKeys';
import { Chart } from 'src/types/Chart';
@@ -36,6 +36,7 @@ import { Dashboard, SavedQueryObject } from 'src/views/CRUD/types';
import Icons from 'src/components/Icons';
import EmptyState from './EmptyState';
+import { WelcomeTable } from './types';
/**
* Return result from /superset/recent_activity/{user_id}
@@ -241,7 +242,7 @@ export default function ActivityTable({
{renderActivity()}
) : (
-
+
)}
);
diff --git a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx
index c673d2a71e570..2a940539af66f 100644
--- a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx
@@ -16,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useState, useMemo, useEffect } from 'react';
+import React, { useEffect, useMemo, useState } from 'react';
import { t } from '@superset-ui/core';
import { filter } from 'lodash';
import {
- useListViewResource,
useChartEditModal,
useFavoriteStatus,
+ useListViewResource,
} from 'src/views/CRUD/hooks';
import {
- setInLocalStorage,
getFromLocalStorage,
+ setInLocalStorage,
} from 'src/utils/localStorageHelpers';
import withToasts from 'src/components/MessageToasts/withToasts';
import { useHistory } from 'react-router-dom';
@@ -43,6 +43,7 @@ import Loading from 'src/components/Loading';
import ErrorBoundary from 'src/components/ErrorBoundary';
import SubMenu from 'src/components/Menu/SubMenu';
import EmptyState from './EmptyState';
+import { WelcomeTable } from './types';
interface ChartTableProps {
addDangerToast: (message: string) => void;
@@ -249,7 +250,7 @@ function ChartTable({
))}
) : (
-
+
)}
{preparingExport && }
diff --git a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx
index f4a3d9d112512..6d1666e8cca7b 100644
--- a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx
@@ -16,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useState, useMemo, useEffect } from 'react';
+import React, { useEffect, useMemo, useState } from 'react';
import { SupersetClient, t } from '@superset-ui/core';
import { filter } from 'lodash';
-import { useListViewResource, useFavoriteStatus } from 'src/views/CRUD/hooks';
+import { useFavoriteStatus, useListViewResource } from 'src/views/CRUD/hooks';
import {
Dashboard,
DashboardTableProps,
@@ -28,13 +28,13 @@ import {
import handleResourceExport from 'src/utils/export';
import { useHistory } from 'react-router-dom';
import {
- setInLocalStorage,
getFromLocalStorage,
+ setInLocalStorage,
} from 'src/utils/localStorageHelpers';
import { LoadingCards } from 'src/views/CRUD/welcome/Welcome';
import {
- createErrorHandler,
CardContainer,
+ createErrorHandler,
PAGE_SIZE,
} from 'src/views/CRUD/utils';
import { HOMEPAGE_DASHBOARD_FILTER } from 'src/views/CRUD/storageKeys';
@@ -44,6 +44,7 @@ import PropertiesModal from 'src/dashboard/components/PropertiesModal';
import DashboardCard from 'src/views/CRUD/dashboard/DashboardCard';
import SubMenu from 'src/components/Menu/SubMenu';
import EmptyState from './EmptyState';
+import { WelcomeTable } from './types';
export interface FilterValue {
col: string;
@@ -263,7 +264,7 @@ function DashboardTable({
)}
{dashboards.length === 0 && (
-
+
)}
{preparingExport && }
>
diff --git a/superset-frontend/src/views/CRUD/welcome/EmptyState.test.tsx b/superset-frontend/src/views/CRUD/welcome/EmptyState.test.tsx
index 96ec1ec51472c..908ebed6c4f85 100644
--- a/superset-frontend/src/views/CRUD/welcome/EmptyState.test.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/EmptyState.test.tsx
@@ -19,46 +19,47 @@
import React from 'react';
import { styledMount as mount } from 'spec/helpers/theming';
import EmptyState from 'src/views/CRUD/welcome/EmptyState';
+import { WelcomeTable } from './types';
describe('EmptyState', () => {
const variants = [
{
tab: 'Favorite',
- tableName: 'DASHBOARDS',
+ tableName: WelcomeTable.Dashboards,
},
{
tab: 'Mine',
- tableName: 'DASHBOARDS',
+ tableName: WelcomeTable.Dashboards,
},
{
tab: 'Favorite',
- tableName: 'CHARTS',
+ tableName: WelcomeTable.Charts,
},
{
tab: 'Mine',
- tableName: 'CHARTS',
+ tableName: WelcomeTable.Charts,
},
{
tab: 'Favorite',
- tableName: 'SAVED_QUERIES',
+ tableName: WelcomeTable.SavedQueries,
},
{
tab: 'Mine',
- tableName: 'SAVED_QUEREIS',
+ tableName: WelcomeTable.SavedQueries,
},
];
const recents = [
{
tab: 'Viewed',
- tableName: 'RECENTS',
+ tableName: WelcomeTable.Recents,
},
{
tab: 'Edited',
- tableName: 'RECENTS',
+ tableName: WelcomeTable.Recents,
},
{
tab: 'Created',
- tableName: 'RECENTS',
+ tableName: WelcomeTable.Recents,
},
];
variants.forEach(variant => {
diff --git a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx
index b55ac8a4a1f17..15546ca9495ef 100644
--- a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx
@@ -20,9 +20,17 @@ import React from 'react';
import Button from 'src/components/Button';
import { Empty } from 'src/common/components';
import { t, styled } from '@superset-ui/core';
+import { WelcomeTable } from './types';
+
+const welcomeTableLabels: Record = {
+ [WelcomeTable.Charts]: t('charts'),
+ [WelcomeTable.Dashboards]: t('dashboards'),
+ [WelcomeTable.Recents]: t('recents'),
+ [WelcomeTable.SavedQueries]: t('saved queries'),
+};
interface EmptyStateProps {
- tableName: string;
+ tableName: WelcomeTable;
tab?: string;
}
const EmptyContainer = styled.div`
@@ -39,29 +47,32 @@ const ButtonContainer = styled.div`
}
`;
+type Redirects = Record<
+ WelcomeTable.Charts | WelcomeTable.Dashboards | WelcomeTable.SavedQueries,
+ string
+>;
+
export default function EmptyState({ tableName, tab }: EmptyStateProps) {
- const mineRedirects = {
- DASHBOARDS: '/dashboard/new',
- CHARTS: '/chart/add',
- SAVED_QUERIES: '/superset/sqllab?new=true',
+ const mineRedirects: Redirects = {
+ [WelcomeTable.Charts]: '/chart/add',
+ [WelcomeTable.Dashboards]: '/dashboard/new',
+ [WelcomeTable.SavedQueries]: '/superset/sqllab?new=true',
};
- const favRedirects = {
- DASHBOARDS: '/dashboard/list/',
- CHARTS: '/chart/list',
- SAVED_QUERIES: '/savedqueryview/list/',
+ const favRedirects: Redirects = {
+ [WelcomeTable.Charts]: '/chart/list',
+ [WelcomeTable.Dashboards]: '/dashboard/list/',
+ [WelcomeTable.SavedQueries]: '/savedqueryview/list/',
};
- const tableIcon = {
- RECENTS: 'union.svg',
- DASHBOARDS: 'empty-dashboard.svg',
- CHARTS: 'empty-charts.svg',
- SAVED_QUERIES: 'empty-queries.svg',
+ const tableIcon: Record = {
+ [WelcomeTable.Charts]: 'empty-charts.svg',
+ [WelcomeTable.Dashboards]: 'empty-dashboard.svg',
+ [WelcomeTable.Recents]: 'union.svg',
+ [WelcomeTable.SavedQueries]: 'empty-queries.svg',
};
const mine = (
- {`No ${
- tableName === 'SAVED_QUERIES'
- ? t('saved queries')
- : t(`${tableName.toLowerCase()}`)
- } yet`}
+
+ {t('No %(tableName)s yet', { tableName: welcomeTableLabels[tableName] })}
+
);
const recent = (
@@ -77,7 +88,9 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) {
);
}
if (tab === 'Examples') {
- return t(`Example ${tableName.toLowerCase()} will appear here`);
+ return t('Example %(tableName)s will appear here', {
+ tableName: tableName.toLowerCase(),
+ });
}
if (tab === 'Edited') {
return t(
@@ -103,7 +116,7 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) {
{
- window.location = mineRedirects[tableName];
+ window.location.href = mineRedirects[tableName];
}}
>
@@ -135,7 +148,7 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) {
{
- window.location = favRedirects[tableName];
+ window.location.href = favRedirects[tableName];
}}
>
See all{' '}
diff --git a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx
index 6bf50fa17af24..a9505cf957264 100644
--- a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx
@@ -17,14 +17,14 @@
* under the License.
*/
import React, { useState } from 'react';
-import { t, SupersetClient, styled, useTheme } from '@superset-ui/core';
+import { styled, SupersetClient, t, useTheme } from '@superset-ui/core';
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
import { LoadingCards } from 'src/views/CRUD/welcome/Welcome';
import withToasts from 'src/components/MessageToasts/withToasts';
import { Dropdown, Menu } from 'src/common/components';
-import { useListViewResource, copyQueryLink } from 'src/views/CRUD/hooks';
+import { copyQueryLink, useListViewResource } from 'src/views/CRUD/hooks';
import ListViewCard from 'src/components/ListViewCard';
import DeleteModal from 'src/components/DeleteModal';
import Icons from 'src/components/Icons';
@@ -33,9 +33,10 @@ import EmptyState from './EmptyState';
import {
CardContainer,
createErrorHandler,
- shortenSQL,
PAGE_SIZE,
+ shortenSQL,
} from '../utils';
+import { WelcomeTable } from './types';
SyntaxHighlighter.registerLanguage('sql', sql);
@@ -364,7 +365,7 @@ const SavedQueries = ({
))}
) : (
-
+
)}
>
);
diff --git a/superset-frontend/src/views/CRUD/welcome/types.ts b/superset-frontend/src/views/CRUD/welcome/types.ts
new file mode 100644
index 0000000000000..8e9d6d4c46ebe
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/welcome/types.ts
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export enum WelcomeTable {
+ Charts = 'CHARTS',
+ Dashboards = 'DASHBOARDS',
+ Recents = 'RECENTS',
+ SavedQueries = 'SAVED_QUERIES',
+}
diff --git a/superset/databases/commands/exceptions.py b/superset/databases/commands/exceptions.py
index 9cd8b3306f62e..9ba58373e197a 100644
--- a/superset/databases/commands/exceptions.py
+++ b/superset/databases/commands/exceptions.py
@@ -60,7 +60,7 @@ def __init__(self, json_error: str = "") -> None:
super().__init__(
[
_(
- "Field cannot be decoded by JSON. %{json_error}s",
+ "Field cannot be decoded by JSON. %(json_error)s",
json_error=json_error,
)
],