diff --git a/_locales/en/messages.json b/_locales/en/messages.json index fb5aa01bb..94a3c712a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -6376,26 +6376,6 @@ "message": "What's New", "description": "Title for the whats new modal" }, - "WhatsNew__v5.15--1": { - "message": "No that's not speck of dust you need to flick off your monitor, there's now a dot for unplayed incoming audio messages.", - "description": "Release notes for v5.15" - }, - "WhatsNew__v5.15--2": { - "message": "The calling lobby got some remodeling and renovations done and we didn't even have to refinance.", - "description": "Release notes for v5.15" - }, - "WhatsNew__v5.15--3": { - "message": "The new preferences window is better and faster. Go ahead and change your zoom level, toggle the theme, set a custom disappearing timer.", - "description": "Release notes for v5.15" - }, - "WhatsNew__v5.15--4": { - "message": "You can now choose when to download and apply new updates for Signal. The dialogs got a small makeover too. Check out the setting in the new preferences window.", - "description": "Release notes for v5.15" - }, - "WhatsNew__v5.15--5": { - "message": "Squashed lots of bugs and there are some performance improvements as well. Thank you all for your reports!", - "description": "Release notes for v5.15" - }, "WhatsNew__v5.16--1": { "message": "An improved media lightbox means no surprises as you progress through a gallery of images or videos, and you can pretend you’re really in a dark room by zooming to hide those pesky buttons.", "description": "Release notes for v5.16" @@ -6415,5 +6395,45 @@ "WhatsNew__v5.17--2": { "message": "You can now send messages wherever and whenever you are: on a plane, in a tunnel, or that sad moment when your internet just cut out. It will eventually get through; messages now automatically retry for up to 24 hours.", "description": "Release notes for v5.17" + }, + "WhatsNew__v5.18--1": { + "message": "Feeling ❤️‍🔥 or 😶‍🌫️? You can express yourself with a new batch of emoji, whether you're :whispering or :YELLING as you search. Thanks $hiqua$!", + "description": "Release notes for v5.18", + "placeholders": { + "hiqua": { + "content": "$1", + "example": "@hiqua" + } + } + }, + "WhatsNew__v5.18--2": { + "message": "If you're in Anguilla, maybe you've felt left out. We now turn all top-level domains in place since 2010 into links - so both $gov$ and $brain$ will be clickable just like $signal$. Thanks $jojomatik$!", + "description": "Release notes for v5.18", + "placeholders": { + "gov": { + "content": "$1", + "example": "gov.ai" + }, + "brain": { + "content": "$2", + "example": "brain.ai" + }, + "signal": { + "content": "$3", + "example": "signal.org" + }, + "jojomatik": { + "content": "$4", + "example": "@jojomatik" + } + } + }, + "WhatsNew__v5.18--3": { + "message": "We heard you like to zoom in on images. We added oomph to your zoom, so even small images can go all the way full screen.", + "description": "Release notes for v5.18" + }, + "WhatsNew__v5.18--4": { + "message": "Did you know that if disappearing messages are enabled, even the 'This message was deleted' notification will go away when it expires? It's no longer a mystery - you'll see the countdown and timestamp right on the message.", + "description": "Release notes for v5.18" } } diff --git a/ts/components/Intl.tsx b/ts/components/Intl.tsx index 09c0b1eed..bd8b03a2a 100644 --- a/ts/components/Intl.tsx +++ b/ts/components/Intl.tsx @@ -8,12 +8,16 @@ import { ReplacementValuesType } from '../types/I18N'; import * as log from '../logging/log'; export type FullJSXType = Array | JSX.Element | string; +export type IntlComponentsType = + | undefined + | Array + | ReplacementValuesType; export type Props = { /** The translation string id */ id: string; i18n: LocalizerType; - components?: Array | ReplacementValuesType; + components?: IntlComponentsType; renderText?: RenderTextCallbackType; }; diff --git a/ts/components/WhatsNew.tsx b/ts/components/WhatsNew.tsx index a09dc82ea..89e10558e 100644 --- a/ts/components/WhatsNew.tsx +++ b/ts/components/WhatsNew.tsx @@ -5,7 +5,7 @@ import React, { useState } from 'react'; import moment from 'moment'; import { Modal } from './Modal'; -import { Intl } from './Intl'; +import { Intl, IntlComponentsType } from './Intl'; import { Emojify } from './conversation/Emojify'; import { LocalizerType } from '../types/Util'; @@ -16,7 +16,7 @@ export type PropsType = { type ReleaseNotesType = { date: Date; version: string; - features: Array; + features: Array<{ key: string; components: IntlComponentsType }>; }; export const WhatsNew = ({ i18n }: PropsType): JSX.Element => { @@ -28,7 +28,25 @@ export const WhatsNew = ({ i18n }: PropsType): JSX.Element => { setReleaseNotes({ date: new Date(window.getBuildCreation?.() || Date.now()), version: window.getVersion(), - features: ['WhatsNew__v5.17--1', 'WhatsNew__v5.17--2'], + features: [ + { + key: 'WhatsNew__v5.18--1', + components: { + hiqua: @hiqua, + }, + }, + { + key: 'WhatsNew__v5.18--2', + components: { + gov: gov.ai, + brain: brain.ai, + signal: signal.org, + jojomatik: @jojomatik, + }, + }, + { key: 'WhatsNew__v5.18--3', components: undefined }, + { key: 'WhatsNew__v5.18--4', components: undefined }, + ], }); }; @@ -47,14 +65,15 @@ export const WhatsNew = ({ i18n }: PropsType): JSX.Element => { {releaseNotes.version}
    - {releaseNotes.features.map(featureKey => ( -
  • + {releaseNotes.features.map(({ key, components }) => ( +
  • ( - + id={key} + renderText={({ key: innerKey, text }) => ( + )} + components={components} />
  • ))}