Refactor i18n/intl utils, support icu only, remove renderText
This commit is contained in:
parent
e154d98688
commit
b76c7269f8
13 changed files with 361 additions and 6478 deletions
|
@ -7,8 +7,7 @@ import moment from 'moment';
|
|||
|
||||
import { Modal } from './Modal';
|
||||
import { Intl } from './Intl';
|
||||
import { Emojify } from './conversation/Emojify';
|
||||
import type { LocalizerType, RenderTextCallbackType } from '../types/Util';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
|
||||
export type PropsType = {
|
||||
hideWhatsNewModal: () => unknown;
|
||||
|
@ -21,10 +20,6 @@ type ReleaseNotesType = {
|
|||
features: Array<JSX.Element>;
|
||||
};
|
||||
|
||||
const renderText: RenderTextCallbackType = ({ key, text }) => (
|
||||
<Emojify key={key} text={text} />
|
||||
);
|
||||
|
||||
export function WhatsNewModal({
|
||||
i18n,
|
||||
hideWhatsNewModal,
|
||||
|
@ -35,11 +30,10 @@ export function WhatsNewModal({
|
|||
date: new Date(window.getBuildCreation?.() || Date.now()),
|
||||
version: window.getVersion?.(),
|
||||
features: [
|
||||
<Intl i18n={i18n} id="icu:WhatsNew__v6.21--0" renderText={renderText} />,
|
||||
<Intl i18n={i18n} id="icu:WhatsNew__v6.21--0" />,
|
||||
<Intl
|
||||
i18n={i18n}
|
||||
id="icu:WhatsNew__v6.21--1"
|
||||
renderText={renderText}
|
||||
components={{
|
||||
complexspaces: (
|
||||
<a href="https://github.com/complexspaces">@complexspaces</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue