Skip to content

Commit

Permalink
Modify some strings so Transifex handles them properly
Browse files Browse the repository at this point in the history
Our transifex config doesn't do plurals, so we'll just do different strings, which actually makes more sense here in English too
  • Loading branch information
GarboMuffin committed Aug 12, 2023
1 parent 8469d83 commit c0a094b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/components/tw-restore-point-modal/restore-point-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ const messages = defineMessages({
never: {
defaultMessage: 'never',
id: 'tw.restorePoints.never',
description: 'Part of restore point modal. Appears in a message like "Restore points are created [never v]".'
description: 'Part of restore point modal. Appears as dropdown in context "Restore points are created [never]"'
},
oneMinute: {
defaultMessage: 'every minute',
id: 'tw.restorePoints.1minute',
// eslint-disable-next-line max-len
description: 'Part of restore point modal. Appears as dropdown in context "Restore points are created [every minute]"'
},
minutes: {
defaultMessage: 'every {minutes, plural, one {# minute} other {# minutes}}',
defaultMessage: 'every {n} minutes',
id: 'tw.restorePoints.minutes',
// eslint-disable-next-line max-len
description: 'Part of restore point modal. Appears in a message like "Restore points are created [every one minute v]".'
description: 'Part of restore point modal. Appears as dropdown in context "Restore points are created [every 5 minutes]". {n} will be replaced with a number greater than 1.'
}
});

Expand All @@ -48,9 +54,11 @@ const IntervalSelector = props => (
>
{interval < 0 ? (
props.intl.formatMessage(messages.never)
) : interval === MINUTE ? (
props.intl.formatMessage(messages.oneMinute)
) : (
props.intl.formatMessage(messages.minutes, {
minutes: Math.round(interval / MINUTE)
n: Math.round(interval / MINUTE)
})
)}
</option>
Expand Down Expand Up @@ -94,7 +102,7 @@ const RestorePointModal = props => (
defaultMessage="Restore points are created {time}."
id="tw.restorePoints.intervalOption"
// eslint-disable-next-line max-len
description="{time} will be replaced with a dropdown with values such as [every 5 minutes v] and [never v]"
description="{time} will be replaced with a dropdown with values such as [every 5 minutes] and [never]"
values={{
time: (
<IntervalSelector
Expand Down

0 comments on commit c0a094b

Please sign in to comment.