Skip to content

Commit

Permalink
fix: update Chat section title to 'Chats' (PalisadoesFoundation#3216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nivedita-Chhokar authored Jan 9, 2025
1 parent 0c0b077 commit 50cd26d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@
"endOfResults": "endOfResults"
},
"userChat": {
"title": "Chats",
"add": "Add",
"chat": "Chat",
"search": "Search",
Expand Down
1 change: 1 addition & 0 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@
"endOfResults": "Fin des résultats"
},
"userChat": {
"title": "Discussions",
"add": "Ajouter",
"chat": "Chat",
"contacts": "Contacts",
Expand Down
1 change: 1 addition & 0 deletions public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@
"endOfResults": "परिणाम समाप्त"
},
"userChat": {
"title": "चैट्स",
"add": "जोड़ें",
"chat": "बात करना",
"contacts": "संपर्क",
Expand Down
1 change: 1 addition & 0 deletions public/locales/sp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@
"createAdvertisement": "Crear publicidad"
},
"userChat": {
"title": "Chats",
"add": "Agregar",
"chat": "Charlar",
"search": "Buscar",
Expand Down
1 change: 1 addition & 0 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@
"endOfResults": "结果结束"
},
"userChat": {
"title": "聊天",
"add": "添加",
"chat": "聊天",
"contacts": "联系方式",
Expand Down
19 changes: 19 additions & 0 deletions src/screens/UserPortal/UserScreen/UserScreen.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,25 @@ describe('UserScreen tests with LeftDrawer functionality', () => {
expect(titleElement).toHaveTextContent('People');
});

it('renders the correct title for chat', () => {
mockLocation = '/user/chat/123';

render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<UserScreen />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>,
);

const titleElement = screen.getByRole('heading', { level: 1 });
expect(titleElement).toHaveTextContent('Chats');
});

it('toggles LeftDrawer correctly based on window size and user interaction', () => {
render(
<MockedProvider addTypename={false} link={link}>
Expand Down
1 change: 1 addition & 0 deletions src/screens/UserPortal/UserScreen/UserScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const map: InterfaceMapType = {
people: 'people',
events: 'userEvents',
donate: 'donate',
chat: 'userChat',
campaigns: 'userCampaigns',
pledges: 'userPledges',
volunteer: 'userVolunteer',
Expand Down

0 comments on commit 50cd26d

Please sign in to comment.