From da2a84e99da37a65e435171cad1fab0fb30b9193 Mon Sep 17 00:00:00 2001 From: Sahariar Alam Khandoker Date: Tue, 29 Oct 2024 19:44:33 +0600 Subject: [PATCH] Added internationalization for file filter dropdown (#28809) Co-authored-by: Sahariar Alam Khandoker Co-authored-by: Mattermost Build --- .../search_results/files_filter_menu.tsx | 37 ++++++++++--------- webapp/channels/src/i18n/en.json | 9 +++++ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/webapp/channels/src/components/search_results/files_filter_menu.tsx b/webapp/channels/src/components/search_results/files_filter_menu.tsx index 6cf21efdb3575..6515cb1398940 100644 --- a/webapp/channels/src/components/search_results/files_filter_menu.tsx +++ b/webapp/channels/src/components/search_results/files_filter_menu.tsx @@ -2,7 +2,7 @@ // See LICENSE.txt for license information. import React from 'react'; -import {FormattedMessage} from 'react-intl'; +import {FormattedMessage, useIntl} from 'react-intl'; import {FilterVariantIcon} from '@mattermost/compass-icons/components'; @@ -20,6 +20,7 @@ type Props = { }; export default function FilesFilterMenu(props: Props): JSX.Element { + const intl = useIntl(); return (
@@ -46,54 +47,54 @@ export default function FilesFilterMenu(props: Props): JSX.Element { props.onFilter('all')} icon={props.selectedFilter === 'all' ? : null} /> props.onFilter('documents')} icon={props.selectedFilter === 'documents' ? : null} /> props.onFilter('spreadsheets')} icon={props.selectedFilter === 'spreadsheets' ? : null} /> props.onFilter('presentations')} icon={props.selectedFilter === 'presentations' ? : null} /> props.onFilter('code')} icon={props.selectedFilter === 'code' ? : null} /> props.onFilter('images')} icon={props.selectedFilter === 'images' ? : null} /> props.onFilter('audio')} icon={props.selectedFilter === 'audio' ? : null} /> props.onFilter('video')} icon={props.selectedFilter === 'video' ? : null} /> diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 6e4f83dc22b74..5a940baf625c5 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -3200,6 +3200,15 @@ "channel_info_rhs.header.title": "Info", "channel_info_rhs.menu.files": "Files", "channel_info_rhs.menu.files.filter": "Filter", + "channel_info_rhs.menu.files.filter.all_file_types": "All file types", + "channel_info_rhs.menu.files.filter.audio": "Audio", + "channel_info_rhs.menu.files.filter.code": "Code", + "channel_info_rhs.menu.files.filter.documents": "Documents", + "channel_info_rhs.menu.files.filter.file_menu": "file menu", + "channel_info_rhs.menu.files.filter.images": "Images", + "channel_info_rhs.menu.files.filter.presentations": "Presentations", + "channel_info_rhs.menu.files.filter.spreadsheets": "Spreadsheets", + "channel_info_rhs.menu.files.filter.videos": "Videos", "channel_info_rhs.menu.members": "Members", "channel_info_rhs.menu.notification_preferences": "Notification Preferences", "channel_info_rhs.menu.pinned": "Pinned messages",