apache/answer

Translate bagdes not working.

Opened this issue · 2 comments

Describe the bug

We are using Apache Answer in our company. In the first version, we translated everything to Portuguese and it worked. With the new version 1.4.1, I'm having a problem with badges. On the admin page, the translation works. However, on the user page, the translation doesn't work. I checked the database and it gets data from the YAML file, but it appears to use the US English version. What do I need to do?

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Badges' in the user page.
  2. See error

Expected behavior

The user badges page should use the pt_BR.yaml file

Screenshots

admin translation works:
adc

database:
database

yaml files:
files

user translation not working:
user

first reaction translated:
Sem Título 5

Translation not working:
react

Platform

  • Device: [e.g. Desktop]
  • OS: [e.g. Open suse lp15]
  • Browser and version: [e.g. Chrome, Firefox]
  • Version: [e.g. v1.4.1]

I've changed the en_US.yaml file and it works. It seems the database is only using the English version. Is there any way or parameter that needs to be changed in the badge table.

en_Us.YAML:
us

User badges page:
bad

@IfDougelseSa Thank you very much for your use and feedback. This is a bug and has nothing to do with the translation file. It's caused by the code not getting the Accept-Language the user is using, we will fix this as soon as possible.