Admin Dashboard System Capacity broken with German Locale
ISSUE TYPE
- Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.11
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
With german locale settings, the graphics in the section "System Capacity" in the Dashboard are displayed incorrectly.
STEPS TO REPRODUCE
echo LANG=\"de_DE.UTF-8\" > /etc/default/locale
service cloudstack-management restart
Login to CloudStack Web-UI
EXPECTED RESULTS
See the graphics for "System Capacity" displayed correctly.
ACTUAL RESULTS
The graphics show all red circles.
@mdesaive I am assuming that the line echo "LANG="de_DE.UTF-8" > /etc/default/locale to should read echo LANG="de_DE.UTF-8" > /etc/default/locale
Did you test any other locales? thanks
After noting that issue we simply switched to "C" and added LANG and LC_ALL just for convenience to roots ~/.bashrc
@DaanHoogland thanks for the correction. I updated the description.
Just took the time to try to reproduce the issue once again and it worked even for german locale settings. :( I am unsure if some collegue changed other settings.
Please wait before investigating into this, I will look into it the next days and maybe update the description once more.
And answering your question: We did not test any other locales. We just ran into this issue because our default locale was "de_DE.UTF-8"
Tested with en_AU, pt_BR, and de_DE (all UTF-8). for pt_BR and de_DE I got the same results (the issue reported here). For en_AU, everything worked just fine.
Yes. I reported correctly. The bug reproduces like described with the default installation.
My colleague patched the init script to set LANG/LC_ALL=C. ;)
Thanks for your effort!
I followed the step to set the locale to de_DE.UTF-8, restarted the mgmt server and before log in selected German as language. After login I see this (not sure if this has any error, maybe translation?):

@mdesaive @rafaelweingartner @DaanHoogland what is the expected error/screenshot and any ideas on fixing it. I'll remove the milestone of 4.11.1.0 on this as I'm not sure how to approach a fix to the reported issue.
@rhtyd answering on behalf of @mdesaive , the error is not triggered by selecting another language inside the UI at the login prompt. Instead, it occurs if the system locale (LANG environment variable) is set to a region with comma as decimal "point". e.g. in germany float is noted as NN,NNN .
At least for debian/ubuntu prior systemd /etc/init.d/cloudstack-management contains
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG
fi
we simple fixed this via
:~# cat /etc/default/locale
###LANG="de_DE.UTF-8"
## Cloudstack 4.11 Bug Decimalpoint versus Comma, we need a Point
LANG=C
LC_ALL=C
I think more then just German locales will show this error, if the comma is the issue. We just haven't encountered them. I think this must be fixed with an in UI translation of the data coming in from the server, in the API response.
This problem still persists. Affects too the Spanish locale (es_ES)
I'm not sure how to fix this one, any ideas @DaanHoogland @rafaelweingartner ? Should we export LANG via the /etc/default/cloudstack-management or open a docs PR?
@rhtyd we need to test that if we force LANG=C on the server we have no issues on the UI. If that's the case your solution should/could/would solve this. Being Dutch, I never use Dutch, so I have no experience with this. (Dutch also uses a decimal comma instead of a point and uses the point for thousands separation to make things worse) In general I prefer the reasonable default over the good documentation, if that answers your question.
Checked not reproducible @mdesaive can you test against Primate and re-open if you can reproduce against latest master or Primate. Thanks.