Skip to content

Commit 50cd26d

Browse files
fix: update Chat section title to 'Chats' (#3216)
1 parent 0c0b077 commit 50cd26d

File tree

7 files changed

+25
-0
lines changed

7 files changed

+25
-0
lines changed

public/locales/en/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "endOfResults"
12631263
},
12641264
"userChat": {
1265+
"title": "Chats",
12651266
"add": "Add",
12661267
"chat": "Chat",
12671268
"search": "Search",

public/locales/fr/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "Fin des résultats"
12631263
},
12641264
"userChat": {
1265+
"title": "Discussions",
12651266
"add": "Ajouter",
12661267
"chat": "Chat",
12671268
"contacts": "Contacts",

public/locales/hi/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "परिणाम समाप्त"
12631263
},
12641264
"userChat": {
1265+
"title": "चैट्स",
12651266
"add": "जोड़ें",
12661267
"chat": "बात करना",
12671268
"contacts": "संपर्क",

public/locales/sp/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@
12651265
"createAdvertisement": "Crear publicidad"
12661266
},
12671267
"userChat": {
1268+
"title": "Chats",
12681269
"add": "Agregar",
12691270
"chat": "Charlar",
12701271
"search": "Buscar",

public/locales/zh/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "结果结束"
12631263
},
12641264
"userChat": {
1265+
"title": "聊天",
12651266
"add": "添加",
12661267
"chat": "聊天",
12671268
"contacts": "联系方式",

src/screens/UserPortal/UserScreen/UserScreen.spec.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,25 @@ describe('UserScreen tests with LeftDrawer functionality', () => {
130130
expect(titleElement).toHaveTextContent('People');
131131
});
132132

133+
it('renders the correct title for chat', () => {
134+
mockLocation = '/user/chat/123';
135+
136+
render(
137+
<MockedProvider addTypename={false} link={link}>
138+
<BrowserRouter>
139+
<Provider store={store}>
140+
<I18nextProvider i18n={i18nForTest}>
141+
<UserScreen />
142+
</I18nextProvider>
143+
</Provider>
144+
</BrowserRouter>
145+
</MockedProvider>,
146+
);
147+
148+
const titleElement = screen.getByRole('heading', { level: 1 });
149+
expect(titleElement).toHaveTextContent('Chats');
150+
});
151+
133152
it('toggles LeftDrawer correctly based on window size and user interaction', () => {
134153
render(
135154
<MockedProvider addTypename={false} link={link}>

src/screens/UserPortal/UserScreen/UserScreen.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const map: InterfaceMapType = {
1717
people: 'people',
1818
events: 'userEvents',
1919
donate: 'donate',
20+
chat: 'userChat',
2021
campaigns: 'userCampaigns',
2122
pledges: 'userPledges',
2223
volunteer: 'userVolunteer',

0 commit comments

Comments
 (0)