Skip to content

Commit

Permalink
use counter prop in plural translations
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal committed Oct 17, 2023
1 parent 57b251e commit 8055fc9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const ConnectionStatusBar: FC = function ConnectionStatusBar() {
<Icon name='warning' /> {t('meteor_status' as Parameters<typeof t>[0], { context: status })}
</strong>

{status === 'waiting' && <> {t('meteor_status_reconnect_in', { count: reconnectCountdown })}</>}
{status === 'waiting' && <> {t('meteor_status_reconnect_in', { counter: reconnectCountdown })}</>}

{['waiting', 'offline'].includes(status) && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const EnabledAppsCount = ({
}): ReactElement | null => {
const t = useTranslation();

const privateAppsCountText: string = t('Private_Apps_Count_Enabled', { count: enabled });
const marketplaceAppsCountText: string = t('Apps_Count_Enabled', { count: enabled });
const privateAppsCountText: string = t('Private_Apps_Count_Enabled', { counter: enabled });
const marketplaceAppsCountText: string = t('Apps_Count_Enabled', { counter: enabled });

return (
<GenericResourceUsage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const PruneMessagesWithData = (): ReactElement => {
throw new Error(t('No_messages_found_to_prune'));
}

dispatchToastMessage({ type: 'success', message: t('__count__message_pruned', { count }) });
dispatchToastMessage({ type: 'success', message: t('__count__message_pruned', { counter: count }) });
methods.reset();
} catch (error: unknown) {
dispatchToastMessage({ type: 'error', message: error });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const VideoConfListItem = ({
</Avatar.Stack>
<Box mis={4}>
{joinedUsers.length > VIDEOCONF_STACK_MAX_USERS
? t('__usersCount__member_joined', { usersCount: joinedUsers.length - VIDEOCONF_STACK_MAX_USERS })
? t('__usersCount__member_joined', { counter: joinedUsers.length - VIDEOCONF_STACK_MAX_USERS })
: t('joined')}
</Box>
</Box>
Expand Down
20 changes: 10 additions & 10 deletions apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"__agents__agents_and__count__conversations__period__": "{{agents}} agents and {{count}} conversations, {{period}}",
"__count__empty_rooms_will_be_removed_automatically": "{{count}} empty rooms will be removed automatically.",
"__count__empty_rooms_will_be_removed_automatically__rooms__": "{{count}} empty rooms will be removed automatically:<br/> {{rooms}}.",
"__count__message_pruned": "{{count}} message pruned",
"__count__message_pruned_plural": "{{count}} messages pruned",
"__count__message_pruned": "{{counter}} message pruned",
"__count__message_pruned_plural": "{{counter}} messages pruned",
"__count__conversations__period__": "{{count}} conversations, {{period}}",
"__count__tags__and__count__conversations__period__": "{{count}} tags and {{conversations}} conversations, {{period}}",
"__departments__departments_and__count__conversations__period__": "{{departments}} departments and {{count}} conversations, {{period}}",
"__usersCount__member_joined": "+ {{usersCount}} member joined",
"__usersCount__member_joined_plural": "+ {{usersCount}} members joined",
"__usersCount__member_joined": "+ {{counter}} member joined",
"__usersCount__member_joined_plural": "+ {{counter}} members joined",
"__usersCount__people_will_be_invited": "{{usersCount}} people will be invited",
"__username__is_no_longer__role__defined_by__user_by_": "{{username}} is no longer {{role}} by {{user_by}}",
"__username__was_set__role__by__user_by_": "{{username}} was set {{role}} by {{user_by}}",
Expand Down Expand Up @@ -532,10 +532,10 @@
"Apps_context_requested": "Requested",
"Apps_context_private": "Private Apps",
"Apps_context_premium": "Premium",
"Apps_Count_Enabled": "{{count}} app enabled",
"Apps_Count_Enabled_plural": "{{count}} apps enabled",
"Private_Apps_Count_Enabled": "{{count}} private app enabled",
"Private_Apps_Count_Enabled_plural": "{{count}} private apps enabled",
"Apps_Count_Enabled": "{{counter}} app enabled",
"Apps_Count_Enabled_plural": "{{counter}} apps enabled",
"Private_Apps_Count_Enabled": "{{counter}} private app enabled",
"Private_Apps_Count_Enabled_plural": "{{counter}} private apps enabled",
"Apps_Count_Enabled_tooltip": "Community Edition workspaces can enable up to {{number}} {{context}} apps",
"Apps_disabled_when_Enterprise_trial_ended": "Apps disabled when Enterprise trial ended",
"Apps_disabled_when_Enterprise_trial_ended_description": "Workspaces on Community Edition can have up to 5 marketplace apps and 3 private apps enabled. Ask your workspace admin to reenable apps.",
Expand Down Expand Up @@ -3516,7 +3516,7 @@
"meteor_status_failed": "The server connection failed",
"meteor_status_offline": "Offline mode.",
"meteor_status_reconnect_in": "trying again in one second...",
"meteor_status_reconnect_in_plural": "trying again in {{count}} seconds...",
"meteor_status_reconnect_in_plural": "trying again in {{counter}} seconds...",
"meteor_status_try_now_offline": "Connect again",
"meteor_status_try_now_waiting": "Try now",
"meteor_status_waiting": "Waiting for server connection,",
Expand Down Expand Up @@ -6088,4 +6088,4 @@
"Theme_Appearence": "Theme Appearence",
"Premium": "Premium",
"Premium_capability": "Premium capability"
}
}

0 comments on commit 8055fc9

Please sign in to comment.