Skip to content

Commit 899ff3c

Browse files
feat: partner overrides (#5973)
1 parent 06be179 commit 899ff3c

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

sites/partners/.jest/setup-tests.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
// Future home of additional Jest config
22
import "@testing-library/jest-dom"
3-
import generalTranslations from "@bloom-housing/shared-helpers/src/locales/general.json"
3+
import generalShared from "@bloom-housing/shared-helpers/src/locales/general.json"
44
import { serviceOptions } from "@bloom-housing/shared-helpers/src/types/backend-swagger"
55
import axios from "axios"
6-
import general from "../page_content/locale_overrides/general.json"
76
// ui-components uses ResizeObserver for drag-and-drop, so we need to mock it here before importing anything from ui-components
87
global.ResizeObserver = jest.fn(() => ({
98
observe: jest.fn(),
109
unobserve: jest.fn(),
1110
disconnect: jest.fn(),
1211
}))
1312
import { addTranslation } from "@bloom-housing/ui-components"
14-
addTranslation({ ...generalTranslations, ...general })
13+
import general from "../page_content/locales/general.json"
14+
import generalOverrides from "../page_content/overrides/general.json"
15+
addTranslation({ ...generalShared, ...general, ...generalOverrides })
1516

1617
process.env.cloudinaryCloudName = "exygy"
1718
process.env.cloudinarySignedPreset = "test123"
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"application.add.workInRegion": "Work in the region?",
3+
"application.details.workInRegion": "Work in region",
4+
"application.review.demographics.howDidYouHearOptions.developerWebsite": "Developer website",
5+
"application.review.demographics.howDidYouHearOptions.jurisdictionWebsite": "Jurisdiction website",
6+
"listings.listingIsAlreadyLive": "This listing is already live. Updates will affect the applicant experience on the housing portal.",
7+
"listings.lottery.noDataEmail": "partners@housingbayarea.org",
8+
"listings.lottery.partnerPublishTimestampPortal": "Bloom Housing Portal",
9+
"listings.lotteryOptInPartnerNo": "This lottery will not be run in the Partners Portal because you have requested to use an alternative process. If this is an error, please contact staff.",
10+
"listings.lotteryOptInPartnerYes": "Your lottery will be run in the Partners Portal. If you want to make alternative arrangements, please contact staff.",
11+
"listings.lotteryOptInQuestion": "Will the lottery be run in the partner portal?",
12+
"nav.siteTitlePartners": "Partners Portal",
13+
"settings.preferenceValidatingAddress.selectMapLayerDescription": "Select your map layer based on your district. If you don't see your map contact us"
14+
}

sites/partners/src/lib/translations.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import koreanTranslations from "@bloom-housing/shared-helpers/src/locales/ko.jso
99
import armenianTranslations from "@bloom-housing/shared-helpers/src/locales/hy.json"
1010
import farsiTranslations from "@bloom-housing/shared-helpers/src/locales/fa.json"
1111

12-
import additionalGeneralTranslations from "../../page_content/locale_overrides/general.json"
12+
import additionalGeneralTranslations from "../../page_content/locales/general.json"
13+
import localeOverrides from "../../page_content/overrides/general.json"
1314

1415
/* eslint-disable @typescript-eslint/no-explicit-any */
1516
export const translations = {
@@ -26,6 +27,6 @@ export const translations = {
2627
} as Record<string, any>
2728

2829
export const overrideTranslations = {
29-
en: additionalGeneralTranslations,
30+
en: { ...additionalGeneralTranslations, ...localeOverrides },
3031
} as Record<string, any>
3132
/* eslint-enable @typescript-eslint/no-explicit-any */

0 commit comments

Comments
 (0)