fix: addressing more PR reviews

pull/3206/head
Audric Ackermann 1 year ago
parent 7611f07b09
commit 197ea88861
No known key found for this signature in database

@ -100,7 +100,7 @@ function formatTimeLeft({ timeLeftMs }: { timeLeftMs: number }) {
const timeLeftSeconds = Math.floor(timeLeftMs / 1000);
if (timeLeftSeconds <= 0) {
return `0s`;
return '0s';
}
const [time_large, time_small] = formatAbbreviatedExpireDoubleTimer(timeLeftSeconds);

@ -68,6 +68,7 @@ export const BlockOrUnblockDialog = ({ pubkeys, action, onConfirmed }: NonNullab
// we never block more than one user from the UI, so this is not very useful, just a type guard
for (let index = 0; index < pubkeys.length; index++) {
const pubkey = pubkeys[index];
// TODO: make BlockedNumberController.block take an array and do the change in a single call.
// eslint-disable-next-line no-await-in-loop
await BlockedNumberController.block(pubkey);
}

@ -7,8 +7,7 @@ export const setup = (browserWindow: BrowserWindow, i18n: SetupI18nReturnType) =
// NOTE: we do not rely on the locale parsed by node here because we want
// to support a broader list of spell checks than what the app is localised for.
// For instance: en_AU is not a supported language on crowdin, but we still want the user to
// - if he has the dictionaries installed for it - be able to spell check "esky", "arvo" or "bogan"
//
// - if they have the dictionary installed for it - we should be able to spell check "esky", "arvo" or "bogan"
const userLocale = process.env.LANGUAGE
? process.env.LANGUAGE
: osLocaleSync().replace(/_/g, '-');

@ -93,6 +93,7 @@ function getPluralKey<R extends PluralKey>(string: PluralString): R {
return match?.[1] as R;
}
// TODO This regex is only going to work for the one/other case what about other langs where we can have one/two/other for example
const isPluralForm = (localizedString: string): localizedString is PluralString =>
/{\w+, plural, one \[.+\] other \[.+\]}/g.test(localizedString);

Loading…
Cancel
Save