Values for facet "language" changed to "English" and "Deutsch"

This commit is contained in:
Porras-Bernardez 2024-08-28 10:29:03 +02:00
parent 0126ae9f85
commit 9ad4037c74
4 changed files with 52 additions and 52 deletions

View file

@ -19,6 +19,17 @@ export default class FacetCategory extends Vue {
})
filterName!: string;
replacements = new Map<string, string>([
["gis", "GIS"],
["analysisdata", "Analysis Data"],
["models", "Models"],
["monitoring", "Monitoring"],
["measurementdata", "Measurement Data"],
["mixedtype", "Mixed Type"],
["de", "Deutsch"],
["en", "English"]
]);
/**
* The alias for the Active facet box will be set depending on the name of the category.
* This will allow to display the customised terms "creator" and "keyword" instead of the values currently used in the OpenSearch index: "author" and "subjects"
@ -48,22 +59,24 @@ export default class FacetCategory extends Vue {
// console.log("filterName:", this.filterName);
// return this.filterName == "datatype" ? "doctype" : this.filterName;
switch (val) {
case "gis":
return "GIS";
case "analysisdata":
return "Analysis Data";
case "models":
return "Models";
case "monitoring":
return "Monitoring";
case "measurementdata":
return "Measurement Data";
case "mixedtype":
return "Mixed Type";
default:
return val;
}
return this.replacements.get(val) || val;
// switch (val) {
// case "gis":
// return "GIS";
// case "analysisdata":
// return "Analysis Data";
// case "models":
// return "Models";
// case "monitoring":
// return "Monitoring";
// case "measurementdata":
// return "Measurement Data";
// case "mixedtype":
// return "Mixed Type";
// default:
// return val;
// }
}
// get filterItems(): Array<FilterItem> {