mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(i18n): review translations and fix i18n library misuse (#2750)
This commit is contained in:
1 parent
78f783f0c4
commit
8cb097f954
575 files changed
+192671
-160540
No files matched your search
@@ -318,7 +318,7 @@ export const ProfilePreview: React.FC<ProfilePreviewProps> = observer(
|
||||
disabled={true}
|
||||
data-flx="user.profile.profile-preview.button"
|
||||
>
|
||||
<Trans>Message</Trans>
|
||||
<Trans context="message-action">Message</Trans>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
@@ -9,12 +9,8 @@ import {observer} from 'mobx-react-lite';
|
||||
import type React from 'react';
|
||||
import {useMemo} from 'react';
|
||||
|
||||
const AND_1_OTHER_CALL_DESCRIPTOR = msg({
|
||||
message: 'And 1 other call',
|
||||
comment: 'Label in the user settings voice activity section.',
|
||||
});
|
||||
const AND_OTHER_CALLS_DESCRIPTOR = msg({
|
||||
message: 'And {additionalCount} other calls',
|
||||
message: '{additionalCount, plural, one {And # other call} other {And # other calls}}',
|
||||
comment: 'Label in the user settings voice activity section. Preserve {additionalCount}; it is inserted by code.',
|
||||
});
|
||||
|
||||
@@ -34,12 +30,10 @@ export const VoiceActivitySection: React.FC<VoiceActivitySectionProps> = observe
|
||||
[activityAggregates],
|
||||
);
|
||||
const additionalCount = Math.max(0, aggregatedActivities.length - 1);
|
||||
const additionalCallsLabel = useMemo(() => {
|
||||
if (additionalCount === 1) {
|
||||
return i18n._(AND_1_OTHER_CALL_DESCRIPTOR);
|
||||
}
|
||||
return i18n._(AND_OTHER_CALLS_DESCRIPTOR, {additionalCount});
|
||||
}, [additionalCount, i18n.locale]);
|
||||
const additionalCallsLabel = useMemo(
|
||||
() => i18n._(AND_OTHER_CALLS_DESCRIPTOR, {additionalCount}),
|
||||
[additionalCount, i18n.locale],
|
||||
);
|
||||
if (!primaryActivity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user