diff --git a/public/locales/en/layout/common.json b/public/locales/en/layout/common.json index f06543f33..b676bd888 100644 --- a/public/locales/en/layout/common.json +++ b/public/locales/en/layout/common.json @@ -14,5 +14,12 @@ "category": { "openAllInNewTab": "Open all in new tab" } + }, + "menu": { + "moveUp": "Move up", + "moveDown": "Move down", + "addCategory": "Add category", + "addAbove": "above", + "addBelow": "below" } } \ No newline at end of file diff --git a/src/components/Dashboard/Wrappers/Category/CategoryEditMenu.tsx b/src/components/Dashboard/Wrappers/Category/CategoryEditMenu.tsx index fa279766b..2f5557088 100644 --- a/src/components/Dashboard/Wrappers/Category/CategoryEditMenu.tsx +++ b/src/components/Dashboard/Wrappers/Category/CategoryEditMenu.tsx @@ -12,6 +12,7 @@ import { import { useConfigContext } from '../../../../config/provider'; import { CategoryType } from '../../../../types/category'; import { useCategoryActions } from './useCategoryActions'; +import { useTranslation } from 'next-i18next'; interface CategoryEditMenuProps { category: CategoryType; @@ -21,6 +22,7 @@ export const CategoryEditMenu = ({ category }: CategoryEditMenuProps) => { const { name: configName } = useConfigContext(); const { addCategoryAbove, addCategoryBelow, moveCategoryUp, moveCategoryDown, edit, remove } = useCategoryActions(configName, category); + const { t } = useTranslation(['layout/common','common']); return ( @@ -31,24 +33,28 @@ export const CategoryEditMenu = ({ category }: CategoryEditMenuProps) => { } onClick={edit}> - Edit + {t('common:edit')} } onClick={remove}> - Remove + {t('common:remove')} - Change positon + + {t('common:changePosition')} + } onClick={moveCategoryUp}> - Move up + {t('menu.moveUp')} } onClick={moveCategoryDown}> - Move down + {t('menu.moveDown')} - Add category + + {t('menu.addCategory')} + } onClick={addCategoryAbove}> - Add category above + {t('menu.addCategory') + ' ' + t('menu.addAbove')} } onClick={addCategoryBelow}> - Add category below + {t('menu.addCategory') + ' ' + t('menu.addBelow')}