Prevent accidental translation of role name (#3127)

This commit is contained in:
ikhomyn 2022-08-16 15:16:50 +02:00 committed by GitHub
parent c9ee2608ea
commit 14e6b69170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ export const ViewHeader = ({
helpTextKey, helpTextKey,
isReadOnly = false, isReadOnly = false,
}: ViewHeaderProps) => { }: ViewHeaderProps) => {
const { t } = useTranslation(); const { t, i18n } = useTranslation();
const { enabled } = useHelp(); const { enabled } = useHelp();
const [isDropdownOpen, setDropdownOpen] = useState(false); const [isDropdownOpen, setDropdownOpen] = useState(false);
const [isLowerDropdownOpen, setIsLowerDropdownOpen] = useState(false); const [isLowerDropdownOpen, setIsLowerDropdownOpen] = useState(false);
@ -95,7 +95,7 @@ export const ViewHeader = ({
<LevelItem> <LevelItem>
<TextContent className="pf-u-mr-sm"> <TextContent className="pf-u-mr-sm">
<Text className={className} component="h1"> <Text className={className} component="h1">
{t(titleKey)} {i18n.exists(titleKey) ? t(titleKey) : titleKey}
</Text> </Text>
</TextContent> </TextContent>
</LevelItem> </LevelItem>