From e092e8cc0a986b18e59bc6b65a9da29f7981ac53 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sun, 17 May 2020 21:51:12 +0530 Subject: [PATCH] delete button text was not translated --- src/i18n/locales/en/app/app.json | 3 +++ src/shared/ItemActions.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/en/app/app.json b/src/i18n/locales/en/app/app.json index 99b36859..bcf8db16 100644 --- a/src/i18n/locales/en/app/app.json +++ b/src/i18n/locales/en/app/app.json @@ -14,6 +14,9 @@ "buttons": { "add": { "label": "Add" + }, + "delete": { + "label": "Delete" } }, "printDialog": { diff --git a/src/shared/ItemActions.js b/src/shared/ItemActions.js index 31317f12..526bf35a 100644 --- a/src/shared/ItemActions.js +++ b/src/shared/ItemActions.js @@ -1,9 +1,12 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; import Checkbox from './Checkbox'; import { deleteItem, moveItemUp, moveItemDown } from '../utils'; const ItemActions = ({ dispatch, first, identifier, item, last, onChange, type }) => { + const { t } = useTranslation(); + return (
@@ -22,7 +25,7 @@ const ItemActions = ({ dispatch, first, identifier, item, last, onChange, type } >
delete - Delete + {t('buttons.delete.label')}