Skip to content

Commit

Permalink
fix: Use list from i18next
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Sep 5, 2023
1 parent 25f128a commit 8f2e380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/localization/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,4 @@ i18n.services.formatter.add('lowercase', (value, lng, options) => {
return i18n.t(value).toLowerCase();
});

i18n.services.formatter.add('andList', (value, lng, options) => {
const formatter = new Intl.ListFormat(lng, {
style: 'long',
type: 'conjunction',
});
return formatter.format(value);
});

export default i18n;
4 changes: 2 additions & 2 deletions src/localization/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,8 @@
"leave_confirm_message": "You will no longer be able to edit “{{storyMapTitle}}”.",
"deleted_membership": "{{name}} has been removed from “{{storyMapTitle}}”",
"left_membership": "You have been removed from “{{storyMapTitle}}”",
"added_memberships_one": "{{names, andList}} has been invited to edit.",
"added_memberships": "{{names, andList}} have been invited to edit.",
"added_memberships_one": "{{names, list}} has been invited to edit.",
"added_memberships": "{{names, list}} have been invited to edit.",
"addMemberships.unique": "One or more users are already collaborators of this story map.",
"approved_membership": "You have been added to “{{storyMapTitle}}”",
"approve_invite_success": "You have been added to “{{storyMapTitle}}”",
Expand Down

0 comments on commit 8f2e380

Please sign in to comment.