Page MenuHomePhabricator

Add user language field to the Wishlist intake form
Open, Needs TriagePublic

Description

User Story

As a participant of the Survey who speaks Arabic, I would like to create a wish and have the page language automatically be set to Arabic.

However I also speak English, so I may decide after loading the intake form that I'd enter my wish in English, even though my interface language is Arabic.

Engineering explanation

In order to have the Survey operate more autonomously, we need to automatically set the page content language after a wish is created. This then allows anyone to use Extension:Translate to translate it to English. The bot also will know what language it is, and know where to put it, since each index page has language subpages built by the bot (see comments at T368349). The problem is often users have their interface language set to one language, but will author content in a different language. For this reason, we need a field in the form specifying what language the wish was written in, with it defaulted to the user's interface language.

Acceptance criteria

  • Add a new dropdown to the intake form to enter your language.
  • The dropdown should default to your interface language (i.e. can be specified with ?uselang=ar)
  • Saving should set the baselang parameter of the Wish template.

Designs

None as of yet. This could look just like the "Status" field (normal Codex label with a dropdown).

Event Timeline

I would say in this case we can add a disclaimer/banner on the form that says you can submit wish in any language and not add another form field that user needs to select.

The issue with not asking them what language they're writing in is that we won't be able to set the page's content language, and so translations will assume it's from English. The language selection would default to their current interface language, so if they're not writing in a different language then they wouldn't need to change it.

Without doing this, a fair bit of manual work will fall back on CommTech team members. Perhaps that's fine for the time being, and we can see how it goes after launch?

Another to do it could be add a notice that tells them to write in their current interface language, so we can then use that language with some confidence.