Use internationalization feature for added text
GitLab: #81
Change-Id: Ie8c3b62545d954922f5c90387c5d361d07cb8cf2
diff --git a/client/src/components/RulesDialog.tsx b/client/src/components/RulesDialog.tsx
index 5e1e929..3b65f33 100644
--- a/client/src/components/RulesDialog.tsx
+++ b/client/src/components/RulesDialog.tsx
@@ -16,6 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material';
+import { useTranslation } from 'react-i18next';
interface RulesDialogProps {
openDialog: boolean;
@@ -25,6 +26,8 @@
}
export default function RulesDialog(props: RulesDialogProps) {
+ const { t } = useTranslation();
+
return (
<Dialog open={props.openDialog} onClose={props.closeDialog}>
<DialogTitle>
@@ -34,7 +37,7 @@
<DialogContent>{props.children}</DialogContent>
<DialogActions>
<Button onClick={props.closeDialog} autoFocus>
- Close
+ {t('dialog_close')}
</Button>
</DialogActions>
</Dialog>