[MM-54876] Deprecate all custom translation functions and components (#25069)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c4d2504605
Коммит
5013d35e97
@@ -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();
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user