FAQ
FAQ copied to clipboard
:sparkles: Dynamic i18n of the questions and answers
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.
@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.
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?
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 :")
Words in URLs don't seem to be translated :
But words in smileys are indeed translated so they are not displayed :
@EmmanuelDemey See https://github.com/Zenika/FAQ/pull/149#issuecomment-456060300 :)