Skip to content

Commit

Permalink
fix: encoding issue with speacial chars WPB-10340 WPB-10242 (#17892)
Browse files Browse the repository at this point in the history
Co-authored-by: Immad Abdul Jabbar <[email protected]>
  • Loading branch information
e-maad and Immad Abdul Jabbar authored Aug 12, 2024
1 parent 08e8383 commit 07ef40d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,30 @@ export const EmojiPill = ({

const conversationReactionCaption = () => {
if (emojiCount > MAX_USER_NAMES_TO_SHOW) {
return t('conversationLikesCaptionPluralMoreThan2', {
number: (emojiCount - MAX_USER_NAMES_TO_SHOW).toString(),
userNames: reactingUserNames.join(', '),
});
return t(
'conversationLikesCaptionPluralMoreThan2',
{
number: (emojiCount - MAX_USER_NAMES_TO_SHOW).toString(),
userNames: reactingUserNames.join(', '),
},
{},
true,
);
}

if (emojiCount === MAX_USER_NAMES_TO_SHOW) {
return t('conversationLikesCaptionPlural', {
firstUser: reactingUserNames[0],
secondUser: reactingUserNames[1],
});
return t(
'conversationLikesCaptionPlural',
{
firstUser: reactingUserNames[0],
secondUser: reactingUserNames[1],
},
{},
true,
);
}

return t('conversationLikesCaptionSingular', {userName: reactingUserNames?.[0] || ''});
return t('conversationLikesCaptionSingular', {userName: reactingUserNames?.[0] || ''}, {}, true);
};

const caption = conversationReactionCaption();
Expand Down
2 changes: 1 addition & 1 deletion src/script/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export class App {
const selfUser = await this.repository.user.getSelf([{position: 'App.initiateSelfUser', vendor: 'webapp'}]);

await initializeDataDog(this.config, selfUser.qualifiedId);
onProgress(5, t('initReceivedSelfUser', selfUser.name()));
onProgress(5, t('initReceivedSelfUser', selfUser.name(), {}, true));

try {
await this.core.init(clientType);
Expand Down
2 changes: 1 addition & 1 deletion src/script/view_model/ActionsViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class ActionsViewModel {
text: t('modalConnectCancelSecondary'),
},
text: {
message: t('modalConnectCancelMessage', userEntity.name()),
message: t('modalConnectCancelMessage', userEntity.name(), {}, true),
title: t('modalConnectCancelHeadline'),
},
});
Expand Down

0 comments on commit 07ef40d

Please sign in to comment.