fix: latest crowdin fetches

still some issues, need to fix the emoji translated string
pull/3206/head
Audric Ackermann 7 months ago
parent 44f263641c
commit 796eb43583

@ -91,7 +91,7 @@ export const EmptyMessageView = () => {
<StyledSessionWelcome
color={isDarkTheme ? 'var(--primary-color)' : 'var(--text-primary-color)'}
>
{window.i18n('onboardingBubbleWelcomeToSession')}
{window.i18n('onboardingBubbleWelcomeToSession', { emoji: '👋' })}
</StyledSessionWelcome>
</>
) : (

@ -98,27 +98,17 @@ const getI18nComponent = (
endTagProps={{ emoji }}
/>
);
case 3:
return isYou ? (
<I18n token="emojiReactsHoverYouNameTwoDesktop" args={{ name }} endTagProps={{ emoji }} />
) : (
<I18n
token="emojiReactsHoverTwoNameOneDesktop"
args={{ name, other_name }}
endTagProps={{ emoji }}
/>
);
default:
return isYou ? (
<I18n
token="emojiReactsHoverYouNameMultipleDesktop"
args={{ name, count: numberOfReactors - 2 }}
args={{ name, count: numberOfReactors - 1 }}
endTagProps={{ emoji }}
/>
) : (
<I18n
token="emojiReactsHoverTwoNameMultipleDesktop"
args={{ name, other_name, count: numberOfReactors - 2 }}
args={{ name, count: numberOfReactors - 1 }}
endTagProps={{ emoji }}
/>
);

@ -39,7 +39,7 @@ export const EnterPasswordModal = (props: EnterPasswordModalProps) => {
try {
const passwordValue = passwordInputRef.current?.value;
if (!passwordValue) {
ToastUtils.pushToastError('enterPasswordErrorToast', window.i18n('noGivenPassword'));
ToastUtils.pushToastError('enterPasswordErrorToast', window.i18n('passwordIncorrect'));
return;
}
@ -51,7 +51,7 @@ export const EnterPasswordModal = (props: EnterPasswordModalProps) => {
onPasswordVerified();
} catch (e) {
window.log.error('window.onTryPassword failed with', e);
ToastUtils.pushToastError('enterPasswordErrorToast', window.i18n('invalidPassword'));
ToastUtils.pushToastError('enterPasswordErrorToast', window.i18n('passwordIncorrect'));
}
});

@ -979,7 +979,7 @@ ipc.on('password-recovery-phrase', async (event, passPhrase) => {
// no issues. send back undefined, meaning OK
sendResponse(undefined);
} catch (e) {
const localisedError = locale.messages.removePasswordInvalid;
const localisedError = getTranslationDictionary().passwordIncorrect;
// send back the error
sendResponse(localisedError);
}

@ -78,21 +78,21 @@ export function getJoinedGroupUpdateChangeStr(joined: Array<string>, _groupName:
if (us) {
switch (others.length) {
case 0:
return { token: 'groupMemberNew', args: { name: window.i18n('you') } };
return { token: 'legacyGroupMemberYouNew' };
case 1:
return { token: 'groupMemberNewYouOther', args: { other_name: othersNames[0] } };
return { token: 'legacyGroupMemberNewYouOther', args: { other_name: othersNames[0] } };
default:
return { token: 'groupMemberNewYouMultiple', args: { count: othersNames.length } };
return { token: 'legacyGroupMemberNewYouMultiple', args: { count: othersNames.length } };
}
}
switch (others.length) {
case 0:
throw new Error('joined without anyone in it.');
case 1:
return { token: 'groupMemberNew', args: { name: othersNames[0] } };
return { token: 'legacyGroupMemberNew', args: { name: othersNames[0] } };
case 2:
return {
token: 'groupMemberTwoNew',
token: 'legacyGroupMemberTwoNew',
args: {
name: othersNames[0],
other_name: othersNames[1],
@ -100,7 +100,7 @@ export function getJoinedGroupUpdateChangeStr(joined: Array<string>, _groupName:
};
default:
return {
token: 'groupMemberMoreNew',
token: 'legacyGroupMemberNewMultiple',
args: {
name: others[0],
count: othersNames.length - 1,

@ -1,5 +1,6 @@
import _ from 'lodash';
import { ClosedGroup, getMessageQueue } from '..';
import { ConversationTypeEnum } from '../../models/types';
import { addKeyPairToCacheAndDBIfNeeded } from '../../receiver/closedGroups';
import { ECKeyPair } from '../../receiver/keypairs';
import { openConversationWithMessages } from '../../state/ducks/conversations';
@ -15,8 +16,6 @@ import { PubKey } from '../types';
import { UserUtils } from '../utils';
import { forceSyncConfigurationNowIfNeeded } from '../utils/sync/syncUtils';
import { getConversationController } from './ConversationController';
import { ConversationTypeEnum } from '../../models/types';
import { I18nProps } from '../../types/Localizer';
export async function createClosedGroup(groupName: string, members: Array<string>, isV3: boolean) {
const setOfMembers = new Set(members);
@ -104,7 +103,7 @@ function getMessageArgs(group_name: string, names: Array<string>) {
group_name,
name,
},
} as I18nProps<'groupInviteFailedUser'>;
} as const;
case 2:
return {
token: 'groupInviteFailedTwo',
@ -113,16 +112,16 @@ function getMessageArgs(group_name: string, names: Array<string>) {
name,
other_name: names[1],
},
} as I18nProps<'groupInviteFailedTwo'>;
} as const;
default:
return {
token: 'groupInviteFailedMore',
token: 'groupInviteFailedMultiple',
args: {
group_name,
name,
count: names.length - 1,
},
} as I18nProps<'groupInviteFailedMore'>;
} as const;
}
}

Loading…
Cancel
Save