CSOIreland / PxStat

Data Dissemination Management System for publishing Statistics in Open Data formats.
MIT License
34 stars 7 forks source link

[BUG] Subject and Product of downloaded json and excel should be language contextual but it isn't #722

Open liamie opened 1 year ago

liamie commented 1 year ago

Describe the bug Subject and Product of downloaded json and excel should be language contextual but it isn't

To Reproduce Steps to reproduce the behavior:

  1. Go to matrix with non default language chosen
  2. Download whole dataset for json 2.0 or xlsx
  3. The list that appears should have language context this is not the case

Expected behavior result should have language context

File Example: eg. E1054 (Gaeilge) Dev

liamie commented 1 year ago

also Subject Area in PX Files download

damiancosmoschapman commented 1 year ago

@damienderoistecso, I think that this issue may be related to the front end.

There is an API call when the Download button and PX 2013 is selected with the method: PxStat.Data.Cube_API.ReadDataset

This call has the request:

{
   "jsonrpc":"2.0",
   "method":"PxStat.Data.Cube_API.ReadDataset",
   "params":{
      "class":"query",
      "id":[

      ],
      "dimension":{

      },
      "extension":{
         "pivot":null,
         "codes":false,
         "language":{
            "code":"en"
         },
         "format":{
            "type":"PX",
            "version":"2013"
         },
         "matrix":"E1054"
      },
      "version":"2.0",
      "m2m":false
   },
   "id":821226668
}

The code field above is "en" but it should be "ga" as Gaeilge is the selected language.

If I am incorrect or you have any questions, please let me know.

neilfromcork commented 1 year ago

Fixed in DEV - ready for test. This fix has potentially wide effects. Suggest we test all data read functions.

liamie commented 1 year ago

This appears to be correct now for xlxs and json 2.0