Discobot falling back to site locale is not using customized copies

I just realized that if a discobot tutorial is not available in a user’s locale, the bot uses the dafault copies of the site locale instead of the customized copies (of the site locale).

We will need more information in this bug report in order to figure out what might be wrong. Can you provide us with the steps to reproduce the bug as well? Is it limited to just the Discobot tutorial or does it affect all the translations as well?

Repro:

  1. Make sure the bot is turned on to start new user tutorial for every user and customize the bot’s first message in some obvious way.
  2. Change your user locale to sv (for which the bot hasn’t been translated yet).
  3. Write a message to the bot to start new user
  4. The bot will respond in English (if your site locale is en, I have not tried this with other site locales).
  5. Check the content of the bot’s first message. It will be the default “:robot: Greetings” message, not the customized one you created in step 1.

Expected behaviour: Once a copy has been customized, the default copy will never be used until the copy has been reset to default.

It is possible that my repro is just a specific case of a more general bug that allows default copies to be used when they shouldn’t be, but I have not tested any other scenarios yet.

5 Likes

Thank you for the reproduction steps :thumbsup:

PR in

https://github.com/discourse/discourse/pull/4948/files

7 Likes

This topic was automatically closed after 41 hours. New replies are no longer allowed.