Skip to content
Sander Devisscher edited this page Sep 10, 2025 · 10 revisions

πŸ“ Edit Translations

πŸ’‘ Rationale

Translations are managed by editing the title or description for every language (en, nl, fr).
❗ At least the _en version is required (this is the default).

Translations are stored across different files:

  • Regions β†’ translations_regions.csv
  • UI elements, short text, single words β†’ translations_simple.csv
  • Graphs & long textboxes β†’ translations.csv

Any change to these files triggers automatic processing by a GitHub Action.

⚠️☠️ Do NOT change the translation_<language>.csv files in ./UAT_direct/translations/ directly as they will be overwritten by the processing workflow ☠️⚠️


βœ… Steps to Edit

Follow these steps depending on your case:

1. Preparation

First edit on a new branch

  1. Create a branch from uat
  2. Fetch latest uat
  3. Switch to your new branch

Subsequent edits on same branch

  • Fetch & pull latest updates

2. What do you want to change?

  • 🌍 Region translation β†’ go to Step 7
  • πŸ”˜ UI element / short text / single word β†’ go to Step 10
  • πŸ“Š Graph / longer text β†’ go to Step 13

πŸ”— How?

Contains translations of regions. Example:

title_id title_nl title_fr title_en
BelgiΓ« BelgiΓ« Belgique Belgium
  1. Open: ./data/output/UAT_direct/translations_regions.csv
  2. Find the correct title_id and edit its translation
  3. Save β†’ Commit β†’ Push β†’ Final

Contains UI text, short labels, simple words. Example:

title_id title_nl title_fr title_en
first_observed jaar van eerste waarneming année de première observation year of first observation
  1. Open: ./data/output/UAT_direct/translations_simple.csv
  2. Find the title_id and edit language fields
  3. Save β†’ Commit β†’ Push β†’ Final

πŸ“Š translations

Contains complex text (graphs, long text with HTML, multi-language descriptions).
⚠️ Recommended: Use the translation_editor app ⚠️

title_id title_nl description_nl title_fr description_fr title_en description_en
management3-countYearGroup Het aantal beheerde {{species}} individuen <p>Deze grafiek…</p> Le nombre d'individus… <p>Ce graphique…</p> The number of {{species}} individuals managed <p>This graph shows…</p>

Steps:
13. Open aspbo.rproj in RStudio
14. Open ./src/translation_editor.R
15. Run the app
16. First run only: Accept prompt to load local CSV into Google Sheet ⚠️
17. Locate correct Title ID & Language
18. Update title and/or description
19. Save back to CSV
20. Commit β†’ Push β†’ Final

⚠️ Avoid losing changes!

  • Don’t switch Title ID or Language without saving
  • Ensure any Google Sheet changes are synced

🏁 Final

  1. Wait for the πŸ€– translation_processing Action to complete
  2. Open a PR β†’ Request review from @soriadelva and @sanderdevisscher

πŸ“ Edit links pages

πŸ’‘Rationale

Every species has a links page with relevant links. The links are either Generic (The large bulk of species) or Custom (Some select species). The way these links pages are edited depends on the type.


βœ… Steps to Edit

Follow these steps depending on your case:

1. Preparation

First edit on a new branch

  1. Create a branch from uat
  2. Fetch latest uat
  3. Switch to your new branch

Subsequent edits on same branch

  1. β†’ 3. Fetch & pull latest updates

  2. Open aspbo.rproj in RStudio


2. What do you want to change?

  • πŸ“š The rules and text of Generic links pages β†’ go to generic_links
  • πŸ“˜ Anything concerning a Custom links page β†’ go to custom_links

3. πŸ“š generic_links

Depending on what specifically you want to change you'll have to take different steps

  • πŸ‡³πŸ‡± articles β†’ go to Step 5
  • πŸ‡³πŸ‡± geographic annotations β†’ go to Step 16
  • πŸ“– general text β†’ go to Step 21
  • πŸ”¨ general rules (πŸ‡¬πŸ‡§ & πŸ‡«πŸ‡· articles, urls, select species urls (ea faunabeheer page)) β†’ go to Step 25

3.1 πŸ‡³πŸ‡± NL_article

  1. Open review_nl_htmls.R
  2. Click run app
  • Edit/check the article of a specific species β†’ go to Step 7
  • Edit/check the article of several species β†’ go to Step 13
3.1.1 NL_article_specific
  1. Write the gbifkey of the species into Search HTML by base name
  2. Click Load HTML
  3. Check/Edit article using the ok, de & het buttons ℹ️ if the species is already listed the current article is highlighted in green. Clicking the other article will overwrite the current.
  4. Repeat steps 7 β†’ 9 as needed
  5. Click Save Lists to save changes
  6. Commit β†’ Push β†’ go to Step 30
3.1.2 NL_article_several
  1. Use the ok, de, het & skip buttons at the bottom to Check/Edit the articles
  2. Click Save Lists to save changes
  3. Commit β†’ Push β†’ go to Step 30

3.2 πŸ‡³πŸ‡± NL_geographic

  1. Open ./src/create_new_links.Rmd
  2. Goto line 137
  3. Check/Edit the geo_words list to improve capitalisation of geographic annotations
  4. Save the changes
  5. Commit β†’ Push β†’ go to Step 30

3.3 πŸ“– general_text

  1. Open ./data/input/links_template.txt using notepad++ or similar
  2. Check/Edit the template
  3. Save the changes
  4. Commit β†’ Push β†’ go to Step 30

3.4 πŸ”¨ general_rules

  1. Open ./src/create_new_links.Rmd
  2. Goto line 97
  3. Check/Edit the rules
  4. Save the changes
  5. Commit β†’ Push β†’ go to Step 30

3.5 generic_links_final

  1. Open ./src/create_new_links.Rmd
  2. Goto line 175
  3. Set redo_all & redo_existing as required
redo_all redo_existing Effect
TRUE TRUE Reruns all on GRIIS (inclu. non-existing but exlcu.custom)
TRUE FALSE Only existing (exclu. custom)
FALSE TRUE Skip all
FALSE FALSE Only non - existing
  1. Click run all
  2. Commit β†’ Push changes
  3. Create a PR with @soriadelva & @sanderdevisscher as reviewers

4. πŸ“˜ Custom_links

4.1. create_custom_links_page

  1. create a new .Rmd file named <gbiftaxonkey>.Rmd in ./HTML_pages/Rmd_files/
  2. add the following yaml & html code:
---
title: <gbiftaxonkey>
output: html_fragment
params:
  language: "fr"
---
<style>
h1.title {
display: none;
}
</style>
  1. add & populate the following chuncks:
chunckname & settings content
setup, include=FALSE knitr::opts_chunck$set(echo = TRUE)
sharedinfo, echo=FALSE - non language dependant URLs
- styling
- images
nl_chunck, eval=params$language=="nl", results="asis", echo=FALSE dutch links text
en_chunck, eval=params$language=="en", results="asis", echo=FALSE english links text
fr_chunck, eval=params$language=="fr", results="asis", echo=FALSE french links text
  1. save the changes
  2. Commit β†’ Push β†’ go to Step 50

4.2. upgrade_generic_links_page

  1. Lookup <gbiftaxonkey>.Rmd in ./HTML_pages/Rmd_files/generic_links_pages/
  2. Cut & paste file into ./HTML_pages/Rmd_files/
  3. Open file & edit content
  4. save the changes
  5. Commit β†’ Push β†’ go to Step 50

4.3. edit_custom_links_page

  1. Open <gbiftaxonkey>.Rmd in ./HTML_pages/Rmd_files/
  2. edit the file content
  3. save the changes
  4. Commit β†’ Push β†’ go to Step 50

4.4. custom_links_final

  1. Open or source ./HTML_pages/Render_single_HTML.R
  2. Run render_single_html("./HTML_pages/Rmd_files/<gbiftaxonkey>.Rmd", "../HTML/")
  3. Commit β†’ Push
  4. Create a PR with @soriadelva & @sanderdevisscher as reviewers