Localize rich-text message preview labels; split audio into voice/music

Thread PresentationStrings through RichText/InstantPageBlock/InstantPage
previewText(), replacing the hardcoded //TODO:localize placeholders
("Photo", "Fx", "Table", "Map", ...) with localized keys and reusing the
existing Message.Photo/Video/Location strings. Add RichTextPreview.Formula
("[formula]"), RichTextPreview.Table ("[table]"), and RichTextPreview.Music
("Music").

The .audio block previously rendered the wrong label (Message.Audio is
"Voice Message"). Thread InstantPage.media down so the block can resolve
media[id] as TelegramMediaFile and split: isVoice -> "Voice Message",
otherwise -> "Music", mirroring MessageContentKind's voice/music handling.

Update both previewText() call sites (MessageContentKind, ChatListItemStrings)
to pass strings, and complete the InstantPageListItem migration that was
left on the old signature.

Also remove the dead streaming-status ("Thinking...") rendering block from
ChatMessageTextBubbleContentNode (guarded by an always-false `!"".isEmpty`)
along with the now-orphaned streamingTextFrame layout machinery it fed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
isaac 2026-06-05 00:18:24 +02:00
parent 0050cc7a08
commit 35711ec6ad
5 changed files with 57 additions and 160 deletions

View file

@ -16369,3 +16369,7 @@ Error: %8$@";
"WebBrowser.Exceptions.DontOpenInApp" = "DON'T OPEN IN-APP";
"WebBrowser.Exceptions.InAppInfo" = "These sites will still be opened in-app.";
"WebBrowser.Exceptions.DeleteAll" = "Delete All Exceptions";
"RichTextPreview.Formula" = "[formula]";
"RichTextPreview.Table" = "[table]";
"RichTextPreview.Music" = "Music";