Skip to content

Weglot integration

As a platform admin with an existing weglot account, I am able to:

  • add a Decidim platform containing a weglot JS integration
  • configure translated languages for the given platform
  • Use weglot as a translation tool like for any other service (Squarespace, etc)

As a participant, I am able to change languages from my platform menu

Tasks

  • Add voca feature toggle weglot?
  • Add voca config WEGLOT_API
  • Check weglot api presence to activate it: insert scripts in head
  • Update cookie management to add a line for automatic translations. Wont do: need to change DNS anyway, so no opt-out
  • Style locales switcher using same DOM that the traditional decidim switcher
  • POC: Search form: translate inputs in search fields before sending to server
    • POC result: it is possible, but not working with the native weglot integration. Need a manual binding on form, to translate before submitting. => Won't do now, if needed create a new story

Validation steps Context:

  1. In weglot activate vietnamese translation
  2. THEN In decidim, see a vietnamese locale switcher

case 1

  1. As participant switch to vietnamese
  2. THEN you see the homepage translated

case 2 NICE TO HAVE

  1. As a participant, switch to vietnamese. Given there is a blog "loving animals"
  2. Search "animals" in vietanmese
  3. THEN you see results around things named proposal

case 3 NICE TO HAVE

  1. As a participant, switch to vietnamese. Given there is a proposal component "your ideas"
  2. Propose something with some vietnamese content
  3. THEN you the published proposals in vietnamese
  4. Switch to english
  5. THEN you see published proposal in english
  6. As an admin, access published ideas
  7. THEN you see published proposal in vietnamese.
Edited by Hadrien Froger