FAQ icon indicating copy to clipboard operation
FAQ copied to clipboard

:sparkles: Dynamic i18n of the questions and answers

Open kkedemos opened this issue 5 years ago • 5 comments

Création d'une nouvelle table Translation dans la base de données, et des relations de tag, answer et question vers cette nouvelle table dont une instance représente une id, un texte et une langue. Ajout de l'attribut lang dans user pour savoir quelle langue associer entre un utilisateur et un texte.

kkedemos avatar Jan 11 '19 14:01 kkedemos

@frinyvonnick @bpetetot @Errorname Let's ignore naming, formatting and refactoring issues for now. We will deal with those later. @kkedemos & team are too much of beginners to address those. The first step is code that works :). On the other hand, you're most welcome commenting about the overall architecture of the solution: the data model, where the code is changed, what happens in case of errors etc. En gros le fond, pas le forme :). You're also welcome to try and run this new version of the app. You'll need credentials to access Google Translate, which I can provide.

hgwood avatar Jan 21 '19 12:01 hgwood

Pre-merge checklist:

  • [ ] extract Google Translate client code into a dedicated file
  • [ ] refactor code to modern standards
  • [ ] decide how to handle Google Translate client authentication (currently based on a JSON file pointed to by the GOOGLE_APPLICATION_CREDENTIALS env var)
  • [ ] make the user's locale changeable by the user
  • [ ] figure out the search story and how translations play with highlights
  • [ ] figure out how to handle emojis
  • [ ] review the UI changes and make necessary adjustments
  • [ ] format code with prettier

What else?

hgwood avatar Jan 24 '19 18:01 hgwood

There is an edge case that needs to be considered: If you put an URL in the answer, will it be translated ? Same goes with images and emojis (😬 is stored as ":grimacing :")

Errorname avatar Jan 25 '19 12:01 Errorname

Words in URLs don't seem to be translated :

image

But words in smileys are indeed translated so they are not displayed :

image

akrish003 avatar Jan 25 '19 14:01 akrish003

@EmmanuelDemey See https://github.com/Zenika/FAQ/pull/149#issuecomment-456060300 :)

hgwood avatar Jan 28 '19 08:01 hgwood