mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix(i18n): wrap untranslated frontend strings and add i18n lint rule (#37776)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
useMemo,
|
||||
} from 'react';
|
||||
import { typedMemo, usePrevious } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import {
|
||||
useTable,
|
||||
usePagination,
|
||||
@@ -562,7 +563,7 @@ export default typedMemo(function DataTable<D extends object>({
|
||||
<Flex wrap align="center" gap="middle">
|
||||
{serverPagination && (
|
||||
<Space size="small" className="search-select-container">
|
||||
<span className="search-by-label">Search by:</span>
|
||||
<span className="search-by-label">{t('Search by')}:</span>
|
||||
<SearchSelectDropdown
|
||||
searchOptions={searchOptions}
|
||||
value={serverPaginationData?.searchColumn || ''}
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
Ref,
|
||||
} from 'react';
|
||||
import { Row, FilterValue } from 'react-table';
|
||||
import { t, tn } from '@apache-superset/core';
|
||||
import { Input, type InputRef, Space } from '@superset-ui/core/components';
|
||||
import useAsyncState from '../utils/useAsyncState';
|
||||
|
||||
@@ -59,11 +60,11 @@ function DefaultSearchInput({
|
||||
}: SearchInputProps) {
|
||||
return (
|
||||
<Space direction="horizontal" size={4} className="dt-global-filter">
|
||||
Search
|
||||
{t('Search')}
|
||||
<Input
|
||||
size="small"
|
||||
ref={inputRef}
|
||||
placeholder={`${count} records...`}
|
||||
placeholder={tn('%s record...', '%s records...', count, count)}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
onBlur={onBlur}
|
||||
|
||||
Reference in New Issue
Block a user