Opened 3 years ago

Closed 3 years ago

#2093 closed Bug (fixed)

"Download" PDF click returns PDF Reports in default language, not user language

Reported by: bs Owned by:
Priority: normal Milestone: Piwik 1.2
Component: Core Keywords: language, report
Cc: Sensitive: no

Description

According to #1632 the PDF reports should already be generated in the user's language. This worked well in previous versions, but apparently in v1.1.1 the reports only use the default language and ignore the language the user set in the GUI.

Change History (10)

comment:1 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

It works for me in 1.2-rc1. please try with this version: http://forum.piwik.org/read.php?2,72265

comment:2 Changed 3 years ago by matt (mattab)

  • Milestone set to 1.2 Piwik 1.2

comment:3 Changed 3 years ago by bs

Thanks, I tried with 1.2-rc1, but the problem still exists. PDF Reports are generated in the language set in "default_language".

comment:4 Changed 3 years ago by vipsoft (robocoder)

probably because the dashboard is using your browser language setting; the setting is only stored in the user_language table if you manually change the language from the dashboard's language selector

the quick fix is to save the user's current language setting when the report is setup

comment:5 Changed 3 years ago by bs

Good point, but it seems like the setting in user_language is being ignored.

I tried this:

  • default_language is "de"
  • In the GUI I set the language to "English".
  • The table piwik_user_language shows that the language for my user is set to "en".
  • The GUI is in English, but when I generate a report it's in German.

I also tried the other way round:

default_language is "en", I selected "German" in the GUI, but the reports are still in english...

comment:6 Changed 3 years ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:7 Changed 3 years ago by matt (mattab)

I can now replicate the issue locally, investigating

comment:8 Changed 3 years ago by matt (mattab)

The bug is the "Download" link does not download the PDF in the right language.

BUT the scheduled PDF reports are sent in the User Language as expected, so WORKING as expected (if you have an issue with scheduled reports, please report it)

comment:9 Changed 3 years ago by matt (mattab)

  • Summary changed from PDF Reports don't use user's language to "Download" PDF click returns PDF Reports in default language, not user language

comment:10 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [4219]) Fixes #2093

Note: See TracTickets for help on using tickets.