Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: update Chat section title to 'Chats' #3216

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading