gbif / dwc-jekyll

https://gbif.github.io/dwc-jekyll/
0 stars 0 forks source link

Vocabulary page with multilanguage support #2

Open peterdesmet opened 11 months ago

peterdesmet commented 11 months ago

@MattBlissett All elements are in place now so that a vocabulary page like https://gbif.github.io/dwc-jekyll/em/ (or the Dutch version: https://gbif.github.io/dwc-jekyll/nl/em/) is rendered at Jekyll build time from:

  1. A language-specific markdown page with the title and first 2 sections: https://github.com/gbif/dwc-jekyll/blob/master/pages/en/em.md
  2. A generic layout: https://github.com/gbif/dwc-jekyll/blob/master/_layouts/vocabulary.html
  3. A all-language-containing CSV with the vocabulary information: https://github.com/gbif/dwc-jekyll/blob/master/_data/vocabularies/establishmentMeans.csv
  4. A language-specific dictionary with the non-vocabulary-specific elements to be shown on the page: https://github.com/gbif/dwc-jekyll/blob/master/_data/dictionary_en.json

CrowdIn

Things that need to be pushed to and from CrowdIn from this repo:

  1. The markdown page (1)
  2. The dictionary (4) (currently JSON, could also be YAML or CSV)

CSV

This setup expects a single CSV (3) with all (translated) vocabulary information. This CSV is build from:

The resulting CSV currently contains (a) a number of unused fields and (b) information that still needs to be concatenated on the fly (like the termIRI = term.term_isDefinedBy + term.term_localName). If we have a generate a CSV, I would create those columns too.

Transformation steps:

  mutate(termIRI = paste0(term_isDefinedBy, term_localName)) %>%
  left_join(`decisions_links`, by = c("termIRI" = "linked_affected_resource")) %>%
  left_join(`establishmentMeans_translations`, by = c("term_localName" = "term_localName"))

@MattBlissett how do you want to proceed with this?