Skip to content

Commit 699b568

Browse files
committed
chore: cleanup after big localise changes
1 parent c56222b commit 699b568

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

ts/components/calling/IncomingCallDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,19 @@ export const IncomingCallDialog = () => {
8484
<SessionWrapperModal
8585
headerChildren={
8686
<ModalBasicHeader
87-
title={tr('callsIncoming', { name: from ?? tr('unknown').toString() })}
87+
title={tr('callsIncoming', { name: from ?? tr('unknown') })}
8888
/>
8989
}
9090
buttonChildren={
9191
<ModalActionsContainer>
9292
<SessionButton
93-
text={tr('accept').toString()}
93+
text={tr('accept')}
9494
buttonType={SessionButtonType.Simple}
9595
onClick={handleAcceptIncomingCall}
9696
buttonColor={SessionButtonColor.Danger}
9797
/>
9898
<SessionButton
99-
text={tr('decline').toString()}
99+
text={tr('decline')}
100100
buttonType={SessionButtonType.Simple}
101101
onClick={handleDeclineIncomingCall}
102102
/>

ts/components/conversation/ContactName.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const ContactName = (props: Props) => {
6969
{shouldShowProfile ? (
7070
<div style={styles} className={`${prefix}__profile-name`}>
7171
<Emojify
72-
text={isYou ? tr('you').toString() : displayedName}
72+
text={isYou ? tr('you') : displayedName}
7373
sizeClass="small"
7474
isGroup={!isPrivate}
7575
/>

ts/components/conversation/message/message-item/notification-bubble/CallNotification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useSelectedNicknameOrProfileNameOrShortenedPubkey } from '../../../../.
44
import { ExpirableReadableMessage } from '../ExpirableReadableMessage';
55
import { NotificationBubble } from './NotificationBubble';
66
import { Localizer } from '../../../../basic/Localizer';
7-
import { MergedLocalizerTokens, tr } from '../../../../../localization/localeTools';
7+
import { MergedLocalizerTokens } from '../../../../../localization/localeTools';
88
import type { WithMessageId } from '../../../../../session/types/with';
99
import { useMessageCallNotificationType } from '../../../../../state/selectors';
1010
import { LUCIDE_ICONS_UNICODE } from '../../../../icon/lucide';
@@ -37,7 +37,7 @@ export const CallNotification = (props: WithMessageId) => {
3737

3838
const notificationType = useMessageCallNotificationType(messageId);
3939

40-
const name = useSelectedNicknameOrProfileNameOrShortenedPubkey() ?? tr('unknown');
40+
const name = useSelectedNicknameOrProfileNameOrShortenedPubkey();
4141

4242
if (!notificationType) {
4343
return null;

ts/components/dialog/UpdateGroupNameDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function UpdateGroupNameDialog(props: { conversationId: string }) {
154154
disabled={isNameChangePending || !newGroupName || !newGroupName.trim()}
155155
/>
156156
<SessionButton
157-
text={tr('cancel').toString()}
157+
text={tr('cancel')}
158158
buttonColor={SessionButtonColor.Danger}
159159
buttonType={SessionButtonType.Simple}
160160
onClick={closeDialog}

ts/components/leftpane/overlay/OverlayClosedGroup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { searchActions } from '../../../state/ducks/search';
3030
import { useContactsToInviteTo } from '../../../hooks/useContactsToInviteToGroup';
3131
import { NoContacts, NoResultsForSearch } from '../../search/NoResults';
3232
import { SimpleSessionTextarea } from '../../inputs/SessionInput';
33-
import { tr } from '../../../localization/localeTools';
33+
import { tr, tStripped } from '../../../localization/localeTools';
3434

3535
const StyledGroupMemberListContainer = styled.div`
3636
display: flex;
@@ -94,12 +94,12 @@ export const OverlayClosedGroupV2 = () => {
9494
if (selectedMemberIds.length < 1) {
9595
ToastUtils.pushToastError(
9696
'pickClosedGroupMember',
97-
tr('groupCreateErrorNoMembers').toString()
97+
tr('groupCreateErrorNoMembers')
9898
);
9999
return;
100100
}
101101
if (selectedMemberIds.length >= VALIDATION.CLOSED_GROUP_SIZE_LIMIT) {
102-
ToastUtils.pushToastError('closedGroupMaxSize', tr('groupAddMemberMaximum'));
102+
ToastUtils.pushToastError('closedGroupMaxSize', tStripped('groupAddMemberMaximum'));
103103
return;
104104
}
105105
// trigger the add through redux.

ts/components/settings/section/CategoryRecoveryPassword.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export const SettingsCategoryRecoveryPassword = () => {
178178
onClick={() => {
179179
dispatch(updateHideRecoveryPasswordModal({ state: 'firstWarning' }));
180180
}}
181-
buttonText={tr('hide').toString()}
181+
buttonText={tr('hide')}
182182
buttonColor={SessionButtonColor.Danger}
183183
dataTestId={'hide-recovery-password-button'}
184184
/>

ts/interactions/conversationInteractions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export async function showLeaveGroupByConvoId(conversationId: string, name: stri
396396
window?.inboxStore?.dispatch(
397397
updateConfirmModal({
398398
title: tr('groupLeave'),
399-
i18nMessage: { token: 'groupLeaveDescription', args: { group_name: name ?? '' } },
399+
i18nMessage: { token: 'groupLeaveDescription', args: { group_name: name ?? tr('unknown') } },
400400
onClickOk,
401401
okText: tr('leave'),
402402
okTheme: SessionButtonColor.Danger,
@@ -441,7 +441,7 @@ export async function showDeleteGroupByConvoId(conversationId: string, name: str
441441
title: tr('groupDelete'),
442442
i18nMessage: {
443443
token: weAreAdmin ? 'groupDeleteDescription' : 'groupDeleteDescriptionMember',
444-
args: { group_name: name ?? '' },
444+
args: { group_name: name ?? tr('unknown') },
445445
},
446446
onClickOk,
447447
okText: tr('delete'),

ts/state/ducks/releasedFeatures.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const releasedFeaturesSlice = createSlice({
4848

4949
// state.sesh101NotificationAt = handleReleaseNotification({
5050
// featureName: 'useSESH101',
51-
// message: tr('sessionNetworkNotificationLive').toString(),
51+
// message: tr('sessionNetworkNotificationLive'),
5252
// lastRefreshedAt: state.refreshedAt,
5353
// notifyAt: state.sesh101NotificationAt,
5454
// delayMs: 1 * DURATION.HOURS,

0 commit comments

Comments
 (0)