Emoji Set Link Preview: Fix lang (#5777)

This commit is contained in:
Alexander Zinchuk 2025-03-30 15:46:08 +02:00
parent 7a4956dbe2
commit 9c81341541
4 changed files with 6 additions and 1 deletions

View File

@ -1609,6 +1609,7 @@
"ViewButtonStory" = "VIEW STORY";
"ViewButtonBoost" = "BOOST";
"ViewButtonStickerset" = "VIEW STICKERS";
"ViewButtonEmojiset" = "VIEW EMOJI";
"ViewButtonGiftUnique" = "VIEW COLLECTIBLE";
"AuthContinueOnThisLanguage" = "Continue in English";
"Share" = "Share";

View File

@ -155,7 +155,8 @@ const WebPage: FC<OwnProps & StateProps> = ({
const isGift = type === WEBPAGE_GIFT_TYPE;
const isExpiredStory = story && 'isDeleted' in story;
const quickButtonLangKey = !inPreview && !isExpiredStory ? getWebpageButtonLangKey(type) : undefined;
const resultType = stickers?.isEmoji ? 'telegram_emojiset' : type;
const quickButtonLangKey = !inPreview && !isExpiredStory ? getWebpageButtonLangKey(resultType) : undefined;
const quickButtonTitle = quickButtonLangKey && lang(quickButtonLangKey);
const truncatedDescription = trimText(description, MAX_TEXT_LENGTH);

View File

@ -33,6 +33,8 @@ export function getWebpageButtonLangKey(type?: string): RegularLangKey | undefin
return 'ViewButtonBoost';
case 'telegram_stickerset':
return 'ViewButtonStickerset';
case 'telegram_emojiset':
return 'ViewButtonEmojiset';
case 'telegram_nft':
return 'ViewButtonGiftUnique';
default:

View File

@ -1316,6 +1316,7 @@ export interface LangPair {
'ViewButtonStory': undefined;
'ViewButtonBoost': undefined;
'ViewButtonStickerset': undefined;
'ViewButtonEmojiset': undefined;
'ViewButtonGiftUnique': undefined;
'AuthContinueOnThisLanguage': undefined;
'Share': undefined;