-
Notifications
You must be signed in to change notification settings - Fork 0
HOWTO
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.
translation_<language>.csv files in ./UAT_direct/translations/ directly as they will be overwritten by the processing workflow β οΈ
Follow these steps depending on your case:
First edit on a new branch
- Create a branch from
uat - Fetch latest
uat - Switch to your new branch
Subsequent edits on same branch
- Fetch & pull latest updates
- π Region translation β go to Step 7
- π UI element / short text / single word β go to Step 10
- π Graph / longer text β go to Step 13
π translations_regions
Contains translations of regions. Example:
| title_id | title_nl | title_fr | title_en |
|---|---|---|---|
| BelgiΓ« | BelgiΓ« | Belgique | Belgium |
- Open:
./data/output/UAT_direct/translations_regions.csv - Find the correct title_id and edit its translation
- Save β Commit β Push β Final
π translations_simple
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 |
- Open:
./data/output/UAT_direct/translations_simple.csv - Find the title_id and edit language fields
- Save β Commit β Push β Final
π translations
Contains complex text (graphs, long text with HTML, multi-language descriptions).
| 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
- Donβt switch
Title IDorLanguagewithout saving - Ensure any Google Sheet changes are synced
- Wait for the π€ translation_processing Action to complete
- Open a PR β Request review from @soriadelva and @sanderdevisscher
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.
Follow these steps depending on your case:
First edit on a new branch
- Create a branch from
uat - Fetch latest
uat - Switch to your new branch
Subsequent edits on same branch
-
β 3. Fetch & pull latest updates
-
Open
aspbo.rprojin RStudio
- π The rules and text of Generic links pages β go to generic_links
- π Anything concerning a Custom links page β go to custom_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
- Open
review_nl_htmls.R - 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
- Write the gbifkey of the species into
Search HTML by base name - Click
Load HTML - Check/Edit article using the
ok,de&hetbuttons βΉοΈ if the species is already listed the current article is highlighted in green. Clicking the other article will overwrite the current. - Repeat steps 7 β 9 as needed
- Click
Save Liststo save changes - Commit β Push β go to Step 30
- Use the
ok,de,het&skipbuttons at the bottom to Check/Edit the articles - Click
Save Liststo save changes - Commit β Push β go to Step 30
- Open
./src/create_new_links.Rmd - Goto line 137
- Check/Edit the
geo_wordslist to improve capitalisation of geographic annotations - Save the changes
- Commit β Push β go to Step 30
- Open
./data/input/links_template.txtusing notepad++ or similar - Check/Edit the template
- Save the changes
- Commit β Push β go to Step 30
- Open
./src/create_new_links.Rmd - Goto line 97
- Check/Edit the rules
- Save the changes
- Commit β Push β go to Step 30
- Open
./src/create_new_links.Rmd - Goto line 175
- 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 |
- Click
run all - Commit β Push changes
- Create a PR with @soriadelva & @sanderdevisscher as reviewers
- The species doesn't yet have a links page (generic nor custom) β go to create custom links page
- The species has a generic links page β go to upgrade links page
- The species has a custom links page β go to edit custom links page
- create a new .Rmd file named
<gbiftaxonkey>.Rmdin./HTML_pages/Rmd_files/ - add the following
yaml&htmlcode:
---
title: <gbiftaxonkey>
output: html_fragment
params:
language: "fr"
---
<style>
h1.title {
display: none;
}
</style>
- 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 |
- save the changes
- Commit β Push β go to Step 50
- Lookup
<gbiftaxonkey>.Rmdin./HTML_pages/Rmd_files/generic_links_pages/ - Cut & paste file into
./HTML_pages/Rmd_files/ - Open file & edit content
- save the changes
- Commit β Push β go to Step 50
- Open
<gbiftaxonkey>.Rmdin./HTML_pages/Rmd_files/ - edit the file content
- save the changes
- Commit β Push β go to Step 50
- Open or source
./HTML_pages/Render_single_HTML.R - Run
render_single_html("./HTML_pages/Rmd_files/<gbiftaxonkey>.Rmd", "../HTML/") - Commit β Push
- Create a PR with @soriadelva & @sanderdevisscher as reviewers