lucasapaixao removed a comment on issue #3972:
URL: 
https://github.com/apache/incubator-superset/issues/3972#issuecomment-629678464


   > @tristix I have found a way to change the default locale for the number 
formatting in the Docker image.
   > 
   > You need to modify the file 
`superset/assets/node_modules/d3-format/src/defaultLocale.js` which is there 
after the command `npm ci` which installs the _node_modules_.
   > 
   > At this point I used sed to edit that file, like in these commands:
   > 
   > ```
   > sed -i 's/\([[:space:]]*\)decimal: "\.",/\1decimal: ",",/g' 
/home/superset/superset/assets/node_modules/d3-format/src/defaultLocale.js
   > sed -i 's/\([[:space:]]*\)thousands: ",",/\1thousands: "\.",/g' 
/home/superset/superset/assets/node_modules/d3-format/src/defaultLocale.js
   > sed -i 's/\([[:space:]]*\)currency: \["$"\(.*\)/\1currency: \["€"\2/g'  
/home/superset/superset/assets/node_modules/d3-format/src/defaultLocale.js
   > ```
   > 
   > In this way the `npm run build` apply the modifications in the javascripts 
used by Superset.
   > 
   > I am able also to change the file `defaultLocal.js` at runtime when the 
image is running in development mode, with the folder `superset` mounted and 
accessible from inside the container.
   > 
   > I am afraid that even if you are not using Docker, the only way is to 
rebuild everything.
   > 
   > Hope this help, waiting for the new feature.
   
   In version 0.36 I applied to files:
   /opt/incubator-superset/superset-frontend/node_modules/d3/d3.js
   
/opt/incubator-superset/superset-frontend/node_modules/d3-time-format/dist/d3-time-format.js
 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to