gbif / hp-uk-collections

Source for the DiSSCoUK Data Portal provided by GBIF Hosted Portals
https://dissco-uk.org/
2 stars 1 forks source link

Institution 'City/Town' field shows as 'City' on the portal #14

Closed lmfrench closed 1 year ago

lmfrench commented 1 year ago

Describe the bug On GrSciColl, the address section includes a 'City/Town' field. In the DiSSCo UK portal, the column shows as 'City' - although if you click into the institutional record for more detail this then states 'City/Town' under address. (NB: it also shows as 'City' when you edit the GrSciColl record).

To Reproduce See Kew Botanic Garden as an example: Portal view: https://uk-collections.hp.gbif-staging.org/institution/search?q=kew GrSciColl view: https://www.gbif.org/grscicoll/institution/fa252605-26f6-426c-9892-94d071c2c77f GrSciColl edit view: https://registry.gbif.org/institution/fa252605-26f6-426c-9892-94d071c2c77f

Expected behavior We would like the column in our portal to say 'City/Town', because many of our institutions are not based in cities.

My guess is this requires a change to this js file, but I am not sure what we should enter (possibly adding defaultTableColumns to institution: { , but I don't know if we can also use this to rename the headings)

Screenshots Portal View image

GrSciColl Standard View image

GrSciColl Edit View image

MortenHofft commented 1 year ago

In this section you can overwrite translations. There is already one that is overwritten. Namely renaming occurrences to specimens. https://github.com/gbif/hp-uk-collections/blob/master/_includes/js/config.js#L121

You could update that to

messages: {
    "catalogues.occurrences": "Specimens",
    "filters.city.name": "City/town"
  }

I believe that would do it

UPDATE: I've updated the code as above. Please review https://uk-collections.hp.gbif-staging.org/institution/search

lmfrench commented 1 year ago

Thank you!