Empty stats for a language other than English

regdos

Verified User
Joined
Nov 23, 2008
Messages
28
Location
Poland / Poznan
I have attached the statistics view (from System Info & Files / Complete Usage Statistics) and json data from endpoint CMD_ADMIN_STATS?json=yes&ipp=50&bytes=yes&redirect=yes for English and Polish language. For Polish lang statistics are not displayed. For other languages there is the same problem.
 

Attachments

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,989
Could you test the command DA calls in ssh?
DA literally runs this through /bin/sh:
Code:
LANG=en_US.UTF_8 /bin/df -P -B1
If you can also check the output of
Code:
echo $LANG
and let us know, such that we can test with that specific LANG encoding.
There is likely a parsing issue due to the variance in different languages that needs to be accounted for, so we'd just need to be able to duplicate it to see what's going on.

John
 

regdos

Verified User
Joined
Nov 23, 2008
Messages
28
Location
Poland / Poznan
Code:
~# LANG=en_US.UTF_8 /bin/df -P -B1
Filesystem         1-blocks         Used    Available Capacity Mounted on
udev             4144775168            0   4144775168       0% /dev
tmpfs            4294967296      1404928   4293562368       1% /run
/dev/md0        98292142080  43212795904  50079477760      47% /
tmpfs            4158631936            0   4158631936       0% /dev/shm
tmpfs               5242880            0      5242880       0% /run/lock
tmpfs            4158631936            0   4158631936       0% /sys/fs/cgroup
/dev/md3       383850708992 238824366080 125521002496      66% /home
/dev/sdc1      118014083072  73129107456  38866546688      66% /data/mysql
tmpfs             831725568            0    831725568       0% /run/user/0
Code:
~# echo $LANG
pl_PL.UTF-8
Can't you ignore the first line and add column name translate to skin?
 

regdos

Verified User
Joined
Nov 23, 2008
Messages
28
Location
Poland / Poznan
For other languages
Code:
~# LANG=pl_PL.UTF_8 /bin/df -P -B1
System plików          1-bl        użyte     dostępne pojemność zamont. na
udev             4144775168            0   4144775168        0% /dev
tmpfs            4294967296       917504   4294049792        1% /run
/dev/md0        98292142080  43108368384  50183905280       47% /
tmpfs            4158631936            0   4158631936        0% /dev/shm
tmpfs               5242880            0      5242880        0% /run/lock
tmpfs            4158631936            0   4158631936        0% /sys/fs/cgroup
/dev/md3       383850708992 233160978432 131184390144       64% /home
/dev/sdc1      118014083072  73129431040  38866223104       66% /data/mysql
tmpfs             831725568            0    831725568        0% /run/user/0
Code:
~# LANG=ru_RU.UTF_8 /bin/df -P -B1
Файловая система     1-блоков Использовано     Доступно Вместимость Cмонтировано в
udev               4144775168            0   4144775168          0% /dev
tmpfs              4294967296       917504   4294049792          1% /run
/dev/md0          98292142080  43108380672  50183892992         47% /
tmpfs              4158631936            0   4158631936          0% /dev/shm
tmpfs                 5242880            0      5242880          0% /run/lock
tmpfs              4158631936            0   4158631936          0% /sys/fs/cgroup
/dev/md3         383850708992 233160978432 131184390144         64% /home
/dev/sdc1        118014083072  73129431040  38866223104         66% /data/mysql
tmpfs               831725568            0    831725568          0% /run/user/0
 

regdos

Verified User
Joined
Nov 23, 2008
Messages
28
Location
Poland / Poznan
Hi

Now it's better but not good. Column "Size" always is "0B" (regardless of language). Json response from server has correct values.

Additionally when I change language all labels change automatically except stats column name. I must reload page in web browser.
 

Attachments

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,989
Thanks for that. I've re-checked again and adjust for the bytes=yes vs without. If affected the 1-blocks vs 1024-blocks header.
Pre-release binaries are up.
John
 

regdos

Verified User
Joined
Nov 23, 2008
Messages
28
Location
Poland / Poznan
Thanks.

The values are now displayed correctly.

There is still a problem with change language and not change column name. I must reload page in web browser.
 
Top