diff --git a/i18n/en.pot b/i18n/en.pot index 17fadb7c..baf333f8 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-11-05T07:23:15.731Z\n" -"PO-Revision-Date: 2024-11-05T07:23:15.732Z\n" +"POT-Creation-Date: 2024-11-05T14:43:19.245Z\n" +"PO-Revision-Date: 2024-11-05T14:43:19.245Z\n" msgid "schemas" msgstr "schemas" @@ -33,6 +33,12 @@ msgstr "Not found" msgid "The page you are looking for does not exist." msgstr "The page you are looking for does not exist." +msgid "New {{modelName}}" +msgstr "New {{modelName}}" + +msgid "Edit {{modelName}}" +msgstr "Edit {{modelName}}" + msgid "Metadata Overview" msgstr "Metadata Overview" @@ -1154,6 +1160,27 @@ msgstr "" "included. PHU will still be available for the PHU level, but not included " "in the aggregations to the levels above." +msgid "Setup" +msgstr "Setup" + +msgid "Data" +msgstr "Data" + +msgid "Data Elements" +msgstr "Data Elements" + +msgid "Periods" +msgstr "Periods" + +msgid "Organisation Units" +msgstr "Organisation Units" + +msgid "Form" +msgstr "Form" + +msgid "Advanced" +msgstr "Advanced" + msgid "Longitude" msgstr "Longitude" diff --git a/src/app/layout/Breadcrumb.spec.tsx b/src/app/layout/Breadcrumb.spec.tsx index 03ce6aa6..98eedc42 100644 --- a/src/app/layout/Breadcrumb.spec.tsx +++ b/src/app/layout/Breadcrumb.spec.tsx @@ -2,7 +2,12 @@ import '@testing-library/jest-dom' import { configure, render } from '@testing-library/react' import React from 'react' import { useMatches, HashRouter } from 'react-router-dom' -import { OVERVIEW_SECTIONS, SECTIONS_MAP } from '../../lib' +import { + getOverviewPath, + getSectionPath, + OVERVIEW_SECTIONS, + SECTIONS_MAP, +} from '../../lib' import { MatchRouteHandle, RouteHandle } from '../routes/types' import { Breadcrumbs, BreadcrumbItem } from './Breadcrumb' @@ -34,9 +39,12 @@ beforeEach(() => { }) describe('BreadcrumbItem', () => { - it('should render a link based on the section title', () => { + it('should render a link based on the given label', () => { const { getByRole } = render( - , + , { wrapper: HashRouter } ) @@ -46,9 +54,12 @@ describe('BreadcrumbItem', () => { expect(DataElementLink).toHaveAttribute('href', '#/dataElements') }) - it('should render a link to overview-section using plural title if overview-section', () => { + it('should render a correct link to overview-section using plural title if overview-section', () => { const { getByRole } = render( - , + , { wrapper: HashRouter } ) @@ -60,20 +71,6 @@ describe('BreadcrumbItem', () => { '#/overview/dataElements' ) }) - it('should render a link with label-prop instead of section title if provided', () => { - const { getByRole } = render( - , - { wrapper: HashRouter } - ) - - const DataElementLink = getByRole('link') - expect(DataElementLink).toBeDefined() - expect(DataElementLink).toHaveTextContent('Data elements') - expect(DataElementLink).toHaveAttribute('href', '#/dataElements') - }) }) describe('Breadcrumbs', () => { it('should render crumb components in handle', () => { @@ -97,13 +94,19 @@ describe('Breadcrumbs', () => { mockHandle({ crumb: () => ( ), }), mockHandle({ crumb: () => ( - + ), }), ])