diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 38663e13faf..8f456273f69 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -104,7 +104,7 @@ var humanUsed = OC.Util.humanFileSize(response.data.used, true); var humanTotal = OC.Util.humanFileSize(response.data.total, true); if (response.data.quota > 0) { - $('#quota').attr('data-original-title', Math.floor(response.data.used/response.data.quota*1000)/10 + '%'); + $('#quota').attr('data-original-title', t('files', '{used}%', {used: Math.round(response.data.usedSpacePercent)})); $('#quota progress').val(response.data.usedSpacePercent); $('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanTotal})); } else { diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 22744e5940f..1d9591cafe0 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -60,7 +60,7 @@ class Helper { 'quota' => $storageInfo['quota'], 'total' => $storageInfo['total'], 'used' => $storageInfo['used'], - 'usedSpacePercent' => (int)$storageInfo['relative'], + 'usedSpacePercent' => $storageInfo['relative'], 'owner' => $storageInfo['owner'], 'ownerDisplayName' => $storageInfo['ownerDisplayName'], 'mountType' => $storageInfo['mountType'], diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php index 9c875d9530c..9ff680d6a8d 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -17,7 +17,7 @@
  • + title="t('%s%%', [round($_['usage_relative'])])); ?>">

    t('%1$s of %2$s used', [$_['usage'], $_['total_space']])); ?>