Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translation] Meta - How to translate and update translation #3

Closed
10 of 12 tasks
statnmap opened this issue Oct 29, 2020 · 5 comments
Closed
10 of 12 tasks

[Translation] Meta - How to translate and update translation #3

statnmap opened this issue Oct 29, 2020 · 5 comments
Assignees
Labels
Meta Meta issue

Comments

@statnmap
Copy link
Collaborator

statnmap commented Oct 29, 2020

Maybe look at the possibilities of Appsilon's {shiny.i18n}.

  • There will be JS for the frozen texts on the UI, and the translation table for the graphics and other tables.
  • Define the contribution format for translations. I'm thinking of this: we file a table with an index column, an English column, a French column, ... that the client will have to fill in.
  • Surely a separate table for the texts and for the content of the tables in the dataset.
  • Build a function to transform the UI table to the required i18n JS / yaml. Be careful with special character if we have to.
  • Create a user guide to update the translations after database update
  • [Translation] Define translation mechanism #57
  • Mettre à jour la documentation pour indiquer comment se déroule le processus de mise à jour, en lien avec la base de données en dev ou en prod
    • Version courte: Mettre à jour les traductions de l'UI uniquement => Déposer les csv et commit
      • Si on veut vérifier ce que ça donne avant la prod, il faut: connection BDD + Mongo Docker local + renv + run_app(): Se référer à la section xx du readme
    • Version longue: Ajouter des fonctionnalités et nouvelles zones de texte à traduire - Pour les dev R.
  • [Translation] Make sure documentation is clear #95
  • Mettre à jour la doc pour indiquer la mise à jour des bulles depuis le Google Sheet un xls interne: Se séparer de Google Sheets #91
@ColinFay
Copy link
Collaborator

ColinFay commented Jan 8, 2021

First step:

All the UI elements can be translated using the csv at https://github.com/inrae/diades.atlas/blob/ui-i18n/inst/translation.csv

For the map, species and services, it might be worth adding the translation straight to the db instead of keeping the logic in the app.

@statnmap
Copy link
Collaborator Author

statnmap commented Jul 22, 2021

  • Can you add a guide on how to update the translation please ?
  • We add a column "lang" in the database where there need to be translation. Data will need to be filtered to take this into account.
    • Déjà inclus dans la base

@ColinFay
Copy link
Collaborator

  • There will be JS for the frozen texts on the UI, and the translation table for the graphics and other tables.
    => Every translation is handled via i18next, and the JSON necessary for this is converted from a series of CSV.

  • Define the contribution format for translations. I'm thinking of this: we file a table with an index column, an English column, a French column, ... that the client will have to fill in.
    => CSV in inst (described in the Rmd in dev)

  • Surely a separate table for the texts and for the content of the tables in the dataset.
    => CSVs are built either via DB calls or by hand

  • Build a function to transform the UI table to the required i18n JS / yaml. Be careful with special character if we have to.
    => See Rmd in dev/

  • Create a user guide to update the translations after database update
    => See Rmd in dev/

#55

@ColinFay ColinFay mentioned this issue Nov 18, 2021
@statnmap
Copy link
Collaborator Author

statnmap commented Dec 1, 2021

La description des étapes de traduction se trouve ici: https://github.com/inrae/diades.atlas/blob/main/dev/translation.Rmd

Il est nécessaire de mettre à jour le package R pour intégrer les nouvelles traductions, même si une grande partie est incluse dans la base de données.
Cela implique de cloner le projet actuel, de suivre la liste des opérations de le fichier Rmd (dev/translation.Rmd) puis d'envoyer ses modifications au travers d'une Pull Request.

La traduction des bulles d'aide, en lien avec cette issue #6, sur l'application Shiny se fait aussi de manière similaire.
Les textes sont rédigés au format markdown dans les fichiers de ce dossier: https://github.com/inrae/diades.atlas/tree/main/inst/translation_help
Puis une Merge Request permet de mettre à jour le package R.

Ceci pourra impliquer une formation à Git et à la maintenance du package {diades.atlas}.

Merci @PMHLambert de valider ce mode de fonctionnement.

@statnmap statnmap changed the title Set things up for multilanguages [Translation] Meta - How to translate and update translation Dec 1, 2021
@statnmap statnmap added Meta Meta issue and removed Meta Meta issue labels Dec 1, 2021
@statnmap
Copy link
Collaborator Author

Indiquer dans la vignette de traduction de se référer à ces commandes du README.
Vérifier son bon fonctionnement.

# database name
golem::amend_golem_config(
  "POSTGRES_DBNAME",
  "diades" # Changer ici le nom de la base de données
)
# database host URL
golem::amend_golem_config(
  "POSTGRES_HOST",
  "localhost"  # Changer ici l'URL de la base
)
# database port access
golem::amend_golem_config(
  "POSTGRES_PORT",
  5432 # Changer ici le port
)
# database username with Read access
Sys.setenv(
  "POSTGRES_USER" =
  "diadesatlas_owner" # Changer ici le username
)
# database password for the user
Sys.setenv(
"POSTGRES_PASS" =
 "thinkrpassword" # Changer ici le password
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta Meta issue
Projects
None yet
Development

No branches or pull requests

3 participants