mark upload button strings for translation

This commit is contained in:
Keith J. Grant
2021-06-28 11:22:48 -07:00
committed by Shane McDonald
parent 4ca6c1c6c5
commit ed02f28cbe
2 changed files with 10 additions and 1 deletions

View File

@@ -39,6 +39,9 @@ function PaginatedTable({
const { search, pathname } = useLocation(); const { search, pathname } = useLocation();
const history = useHistory(); const history = useHistory();
const location = useLocation(); const location = useLocation();
if (!pluralizedItemName) {
pluralizedItemName = t`Items`;
}
useEffect(() => { useEffect(() => {
clearSelected(); clearSelected();
@@ -198,7 +201,7 @@ PaginatedTable.defaultProps = {
toolbarSearchColumns: [], toolbarSearchColumns: [],
toolbarSearchableKeys: [], toolbarSearchableKeys: [],
toolbarRelatedSearchableKeys: [], toolbarRelatedSearchableKeys: [],
pluralizedItemName: 'Items', pluralizedItemName: null,
showPageSizeOptions: true, showPageSizeOptions: true,
renderToolbar: props => <DataListToolbar {...props} />, renderToolbar: props => <DataListToolbar {...props} />,
ouiaId: null, ouiaId: null,

View File

@@ -87,6 +87,9 @@ function CredentialInput({
id={`credential-${fieldOptions.id}`} id={`credential-${fieldOptions.id}`}
type="text" type="text"
filename={fileName} filename={fileName}
filenamePlaceholder={t`Drag a file here or browse to upload`}
browseButtonText={t`Browse…`}
clearButtonText={t`Clear`}
onChange={handleFileChange} onChange={handleFileChange}
onReadStarted={() => setFileIsUploading(true)} onReadStarted={() => setFileIsUploading(true)}
onReadFinished={() => setFileIsUploading(false)} onReadFinished={() => setFileIsUploading(false)}
@@ -105,6 +108,9 @@ function CredentialInput({
id={`credential-${fieldOptions.id}`} id={`credential-${fieldOptions.id}`}
type="text" type="text"
filename={fileName} filename={fileName}
filenamePlaceholder={t`Drag a file here or browse to upload`}
browseButtonText={t`Browse…`}
clearButtonText={t`Clear`}
onChange={handleFileChange} onChange={handleFileChange}
onReadStarted={() => setFileIsUploading(true)} onReadStarted={() => setFileIsUploading(true)}
onReadFinished={() => setFileIsUploading(false)} onReadFinished={() => setFileIsUploading(false)}