mirror of
https://github.com/apache/superset.git
synced 2026-04-27 20:14:54 +00:00
chore: Localization of superset pt. 3 (#22938)
Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
@@ -76,17 +76,30 @@ const QueryTable = ({
|
||||
const theme = useTheme();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const QUERY_HISTORY_TABLE_HEADERS_LOCALIZED = {
|
||||
state: t('State'),
|
||||
started: t('Started'),
|
||||
duration: t('Duration'),
|
||||
progress: t('Progress'),
|
||||
rows: t('Rows'),
|
||||
sql: t('SQL'),
|
||||
results: t('Results'),
|
||||
actions: t('Actions'),
|
||||
};
|
||||
|
||||
const setHeaders = (column: string) => {
|
||||
if (column === 'sql') {
|
||||
return column.toUpperCase();
|
||||
}
|
||||
return column.charAt(0).toUpperCase().concat(column.slice(1));
|
||||
};
|
||||
|
||||
const columnsOfTable = useMemo(
|
||||
() =>
|
||||
columns.map(column => ({
|
||||
accessor: column,
|
||||
Header: () => setHeaders(column),
|
||||
Header:
|
||||
QUERY_HISTORY_TABLE_HEADERS_LOCALIZED[column] || setHeaders(column),
|
||||
disableSortBy: true,
|
||||
})),
|
||||
[columns],
|
||||
|
||||
Reference in New Issue
Block a user