Skip to content

Commit

Permalink
fix(atlas): corriger le retour des noms de sous-niveaux pour utiliser…
Browse files Browse the repository at this point in the history
… le singulier
  • Loading branch information
jerem1508 committed Jan 22, 2025
1 parent 531c1d2 commit 477d55e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions client/src/pages/atlas/components/main/tabs/genders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ export function Genders() {

const getSubLevelName = () => {
if (!geoId || geoId === "PAYS_100") {
return "régions";
return "région";
}
if (geoId.startsWith("R")) {
return "académies";
return "académie";
}
if (geoId.startsWith("D")) {
return "communes";
return "commune";
}
if (geoId.startsWith("A")) {
return "départements";
return "département";
}
if (geoId.startsWith("U")) {
return "communes";
return "commune";
}
};

Expand Down
12 changes: 6 additions & 6 deletions client/src/pages/atlas/components/main/tabs/general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,21 @@ export function General() {

const getSubLevelName = () => {
if (!geoId || geoId === "PAYS_100") {
return "régions";
return "région";
}
if (geoId.startsWith("R")) {
return "académies";
return "académie";
}
if (geoId.startsWith("D")) {
return "communes";
return "commune";
}
if (geoId.startsWith("A")) {
return "départements";
return "département";
}
if (geoId.startsWith("U")) {
return "communes";
return "commune";
}
return "communes";
return "commune";
};

function MapSelector() {
Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/atlas/components/main/tabs/sectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,19 @@ export function Sectors() {

const getSubLevelName = () => {
if (!geoId || geoId === "PAYS_100") {
return "régions";
return "région";
}
if (geoId.startsWith("R")) {
return "académies";
return "académie";
}
if (geoId.startsWith("D")) {
return "communes";
return "commune";
}
if (geoId.startsWith("A")) {
return "départements";
return "département";
}
if (geoId.startsWith("U")) {
return "communes";
return "commune";
}
};

Expand Down

0 comments on commit 477d55e

Please sign in to comment.