diff --git a/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbar.tsx b/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbar.tsx index 0928649b39..4a9f01ff10 100644 --- a/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbar.tsx +++ b/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbar.tsx @@ -1,4 +1,5 @@ import { useCallback, useMemo } from 'react' +import { useTranslation } from 'react-i18next' import { BiDotsHorizontalRounded, BiShareAlt, @@ -72,6 +73,7 @@ export const AdminFormNavbar = ({ handleShareButtonClick, previewFormLink, }: AdminFormNavbarProps): JSX.Element => { + const { t } = useTranslation() const { ref, onMouseDown } = useDraggable() const { isOpen, onClose, onOpen } = useDisclosure() const { pathname } = useLocation() @@ -182,7 +184,7 @@ export const AdminFormNavbar = ({ to={ADMINFORM_BUILD_SUBROUTE} isActive={checkTabActive(ADMINFORM_BUILD_SUBROUTE)} > - Create + {t('features.adminFormNavbar.tabs.create')} } /> @@ -235,26 +237,28 @@ export const AdminFormNavbar = ({ {renderLastModified} - + } /> - + } /> - - + + @@ -278,21 +282,21 @@ export const AdminFormNavbar = ({ {...mobileDrawerExtraButtonProps} leftIcon={} > - Preview form + {t('features.adminFormNavbar.previewForm')} diff --git a/frontend/src/i18n/locales/en-sg.ts b/frontend/src/i18n/locales/en-sg.ts index 7de737cdaa..0ea5173347 100644 --- a/frontend/src/i18n/locales/en-sg.ts +++ b/frontend/src/i18n/locales/en-sg.ts @@ -1,3 +1,4 @@ +import { enSG as adminFormNavbar } from './features/admin-form-navbar' import { enSG as common } from './features/common' import { enSG as login } from './features/login' import { enSG as publicForm } from './features/public-form' @@ -6,6 +7,7 @@ import { FallbackTranslation } from './types' export const enSG: FallbackTranslation = { translation: { features: { + adminFormNavbar, common, login, publicForm, diff --git a/frontend/src/i18n/locales/features/admin-form-navbar/en-sg.ts b/frontend/src/i18n/locales/features/admin-form-navbar/en-sg.ts new file mode 100644 index 0000000000..6a0e22567e --- /dev/null +++ b/frontend/src/i18n/locales/features/admin-form-navbar/en-sg.ts @@ -0,0 +1,18 @@ +import { AdminFormNavbar } from '.' + +export const enSG: AdminFormNavbar = { + tabs: { + create: 'Create', + settings: 'Settings', + results: 'Results', + routing: 'Routing', + }, + manageCollaborators: 'Manage collaborators', + previewForm: 'Preview form', + formActions: 'Form actions', + shareBtn: { + text: 'Share', + textMobile: 'Share form link', + tooltip: 'Share your form link', + }, +} diff --git a/frontend/src/i18n/locales/features/admin-form-navbar/index.ts b/frontend/src/i18n/locales/features/admin-form-navbar/index.ts new file mode 100644 index 0000000000..d3450f4668 --- /dev/null +++ b/frontend/src/i18n/locales/features/admin-form-navbar/index.ts @@ -0,0 +1,18 @@ +export * from './en-sg' + +export interface AdminFormNavbar { + tabs: { + create: string + settings: string + results: string + routing: string + } + manageCollaborators: string + previewForm: string + formActions: string + shareBtn: { + text: string + textMobile: string + tooltip: string + } +} diff --git a/frontend/src/i18n/locales/features/index.ts b/frontend/src/i18n/locales/features/index.ts index 2655fa02a0..37a22a867d 100644 --- a/frontend/src/i18n/locales/features/index.ts +++ b/frontend/src/i18n/locales/features/index.ts @@ -1,3 +1,4 @@ +export { type AdminFormNavbar } from './admin-form-navbar' export { type Common } from './common' export { type Login } from './login' export { type PublicForm } from './public-form' diff --git a/frontend/src/i18n/locales/types.ts b/frontend/src/i18n/locales/types.ts index c18f85894b..c075cf4841 100644 --- a/frontend/src/i18n/locales/types.ts +++ b/frontend/src/i18n/locales/types.ts @@ -1,8 +1,9 @@ -import { Common, Login, PublicForm } from './features' +import { AdminFormNavbar, Common, Login, PublicForm } from './features' interface Translation { translation: { features: { + adminFormNavbar?: AdminFormNavbar common?: Common publicForm?: PublicForm login?: Login