mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
chore: Localization of superset pt. 2 (#22772)
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import Label from 'src/components/Label';
|
||||
import { STATE_TYPE_MAP } from 'src/SqlLab/constants';
|
||||
import { STATE_TYPE_MAP, STATE_TYPE_MAP_LOCALIZED } from 'src/SqlLab/constants';
|
||||
import { styled, Query } from '@superset-ui/core';
|
||||
|
||||
interface QueryStateLabelProps {
|
||||
@@ -31,6 +31,8 @@ const StyledLabel = styled(Label)`
|
||||
|
||||
export default function QueryStateLabel({ query }: QueryStateLabelProps) {
|
||||
return (
|
||||
<StyledLabel type={STATE_TYPE_MAP[query.state]}>{query.state}</StyledLabel>
|
||||
<StyledLabel type={STATE_TYPE_MAP[query.state]}>
|
||||
{STATE_TYPE_MAP_LOCALIZED[query.state]}
|
||||
</StyledLabel>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -360,8 +360,8 @@ const ResultSet = ({
|
||||
message={t('%(rows)d rows returned', { rows })}
|
||||
onClose={() => setAlertIsOpen(false)}
|
||||
description={t(
|
||||
'The number of rows displayed is limited to %s by the dropdown.',
|
||||
rows,
|
||||
'The number of rows displayed is limited to %(rows)d by the dropdown.',
|
||||
{ rows },
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -35,6 +35,7 @@ import {
|
||||
STATUS_OPTIONS,
|
||||
STATE_TYPE_MAP,
|
||||
LOCALSTORAGE_MAX_QUERY_AGE_MS,
|
||||
STATUS_OPTIONS_LOCALIZED,
|
||||
} from '../../constants';
|
||||
|
||||
const TAB_HEIGHT = 140;
|
||||
@@ -145,7 +146,7 @@ const SouthPane = ({
|
||||
};
|
||||
const renderOfflineStatus = () => (
|
||||
<Label className="m-r-3" type={STATE_TYPE_MAP[STATUS_OPTIONS.offline]}>
|
||||
{STATUS_OPTIONS.offline}
|
||||
{STATUS_OPTIONS_LOCALIZED.offline}
|
||||
</Label>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user