[MM-54876] Deprecate all custom translation functions and components (#25069)

Этот коммит содержится в:
M-ZubairAhmed
2023-10-26 14:10:52 +05:30
коммит произвёл GitHub
родитель c4d2504605
Коммит 5013d35e97
3 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@@ -17,6 +17,9 @@ type Props = Omit<HTMLAttributes<HTMLSpanElement | HTMLElement>, '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<HTMLSpanElement | HTMLElement>) => {
const {
component = 'i',

Просмотреть файл

@@ -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;
}

Просмотреть файл

@@ -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();