Skip to content

Commit

Permalink
Allow various jurisdiction
Browse files Browse the repository at this point in the history
  • Loading branch information
clementbiron committed Dec 12, 2023
1 parent 7367488 commit 39aafae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions locales/en/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"language_other": "Languages",
"language.various": "various",
"language.europe": "European Union",
"jurisdiction.various": "various",
"services": "Services",
"title": "We establish partnerships to track the terms of many industries, in several languages and jurisdictions",
"volunteer-contributors": "Volunteer contributors",
Expand Down
1 change: 1 addition & 0 deletions locales/fr/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"language_other": "Langues",
"language.various": "diverses",
"language.europe": "Union européenne",
"jurisdiction.various": "diverses",
"services": "Services",
"title": "Nous établissons des partenariats pour suivre les conditions d'utilisation de nombreuses industries, dans plusieurs langues et juridictions",
"volunteer-contributors": "Contributeurs bénévoles",
Expand Down
13 changes: 12 additions & 1 deletion src/modules/Common/components/Collections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ const Collections: React.FC<CollectionsProps> = ({
})
.join(', ');

const jurisdictionsList = jurisdictions
.map((regionCode) => {
if (regionCode === '*') {
return t('collections:jurisdiction.various');
} else {
return countryName.of(regionCode);
}
})
.join(', ');

return (
<Card
key={`collections_${instanceSlug}`}
Expand Down Expand Up @@ -156,7 +166,8 @@ const Collections: React.FC<CollectionsProps> = ({
<CardTableItem
title={t('collections:country', { count: jurisdictions.length })}
iconName="FiMap"
desc={jurisdictions.map((regionCode) => countryName.of(regionCode)).join(', ')}
desc={jurisdictionsList}
// desc={jurisdictions.map((regionCode) => countryName.of(regionCode)).join(', ')}
/>
</CardTable>
<div className="mt__XL text__center">
Expand Down

0 comments on commit 39aafae

Please sign in to comment.