Commit 0b617cad authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

i18n: plural example: show label as "Entity type" or "Entity types" /...

i18n: plural example: show label as "Entity type" or "Entity types" / "Catalog" or "Catalogs" depending on number of items; add plurals for German and English
parent b0c183e2
......@@ -34,5 +34,10 @@
"arachneTypeSzenen": "Szenen",
"arachneTypeTopographien": "Topographien",
"arachneTypeTypen": "Typen",
"arachneType3D-Modelle": "3D-Modelle"
"arachneType3D-Modelle": "3D-Modelle",
"Catalog": "Katalog",
"Catalog_plural": "Kataloge",
"EntityType": "Kategorie",
"EntityType_plural": "Kategorien"
}
\ No newline at end of file
......@@ -3,5 +3,10 @@
"current language": "English",
"EntangledAfrica1": "Entangled Africa",
"EntangledAfrica2": "Intra-African relations between rain forest and Mediterranean, ca. 6.000 - 500 BP",
"Map": "Map"
"Map": "Map",
"Catalog": "Catalog",
"Catalog_plural": "Catalogs",
"EntityType": "Entity type",
"EntityType_plural": "Entity types"
}
\ No newline at end of file
......@@ -21,9 +21,12 @@ export const CollapsedFilters = (props) => {
{/*Chip for entity types*/}
{input.arachneTypesCheckedIds.length !== 0
&& <Chip variant="outlined" disabled={input.mode === "archaeoSites"} label={`Entity types: ${
arachneTypes.filter((type) => input.arachneTypesCheckedIds.includes(type.id)).map(type => type.label).join(", ")
}`}/>}
&& <Chip variant="outlined" disabled={input.mode === "archaeoSites"}
label={
`${t("EntityType", {count: input.arachneTypesCheckedIds.length})}:
${arachneTypes.filter((type) => input.arachneTypesCheckedIds.includes(type.id)).map(type => type.label).join(", ")}`
}
/>}
{/*Chip for for string query*/}
{input.searchStr !== ""
......@@ -42,13 +45,17 @@ export const CollapsedFilters = (props) => {
{/*Chip for filter by coordinates*/}
{(/-?\d{1,2}\.\d+,-?\d{1,3}\.\d+/.test(input.boundingBoxCorner1) && (/-?\d{1,2}\.\d+,-?\d{1,3}\.\d+/.test(input.boundingBoxCorner2)))
&& <Chip variant="outlined"
label={`Bounding box: [${input.boundingBoxCorner1}], [${input.boundingBoxCorner2}]`}/>}
label={`Bounding box: [${input.boundingBoxCorner1}], [${input.boundingBoxCorner2}]`}
/>}
{/*Chip for filter by catalogs*/}
{input.catalogsCheckedIds.length !== 0
&& <Chip variant="outlined" disabled={input.mode === "archaeoSites"} label={`Catalog: ${
catalogs.filter((catalog) => input.catalogsCheckedIds.includes(catalog.id)).map(catalog => catalog.label).join(", ")
}`}/>}
&& <Chip variant="outlined" disabled={input.mode === "archaeoSites"}
label={
`${t("Catalog", {count: input.catalogsCheckedIds.length})}:
${catalogs.filter((catalog) => input.catalogsCheckedIds.includes(catalog.id)).map(catalog => catalog.label).join(", ")}`
}
/>}
</>
);
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment