diff --git a/webapp/channels/src/components/localized_icon.tsx b/webapp/channels/src/components/localized_icon.tsx index 20c112a84e..aafabea7df 100644 --- a/webapp/channels/src/components/localized_icon.tsx +++ b/webapp/channels/src/components/localized_icon.tsx @@ -17,6 +17,9 @@ type Props = Omit, 'title' | 'comp }; } +/** + * @deprecated Use react-intl for title and aria-label instead and make revelant i or span tags for the icon + */ const LocalizedIcon = React.forwardRef((props: Props, ref?: React.Ref) => { const { component = 'i', diff --git a/webapp/channels/src/utils/i18n.tsx b/webapp/channels/src/utils/i18n.tsx index 11c17f30a6..90d082ea4b 100644 --- a/webapp/channels/src/utils/i18n.tsx +++ b/webapp/channels/src/utils/i18n.tsx @@ -10,6 +10,9 @@ export function getMonthLong(locale: string): 'short' | 'long' { return 'long'; } +/** + * @deprecated Use react-intl methods such as formatMessage, FormattedMessage, defineMessage, defineMessages. + */ export function t(v: string): string { return v; } diff --git a/webapp/channels/src/utils/utils.tsx b/webapp/channels/src/utils/utils.tsx index 84e5515ce0..a9448a2b2d 100644 --- a/webapp/channels/src/utils/utils.tsx +++ b/webapp/channels/src/utils/utils.tsx @@ -1186,6 +1186,9 @@ export function clearFileInput(elm: HTMLInputElement) { } } +/** + * @deprecated Use react-intl instead, only place its usage can be justified is in the redux actions + */ export function localizeMessage(id: string, defaultMessage?: string) { const state = store.getState();