X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fimagefile.php;h=b70fd248e111dfc72d0a91b44c43cfda8a2c80c4;hb=2306f7a7f4f746215d432af4351452ed4aa423f0;hp=e4728774103860c9cbc6034f2850d7d86ca2216c;hpb=ac609e804078cf70fcc02b36aa1eb40115354715;p=quix0rs-gnu-social.git diff --git a/lib/imagefile.php b/lib/imagefile.php index e472877410..b70fd248e1 100644 --- a/lib/imagefile.php +++ b/lib/imagefile.php @@ -85,6 +85,8 @@ class ImageFile break; case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: + // TRANS: Exception thrown when too large a file is uploaded. + // TRANS: %s is the maximum file size, for example "500b", "10kB" or "2MB". throw new Exception(sprintf(_('That file is too big. The maximum file size is %s.'), ImageFile::maxFileSize())); return; @@ -241,11 +243,16 @@ class ImageFile $value = ImageFile::maxFileSizeInt(); if ($value > 1024 * 1024) { - return ($value/(1024*1024)) . _('MB'); + $value = $value/(1024*1024); + // TRANS: Number of megabytes. %d is the number. + return sprintf(_m('%dMB','%dMB',$value),$value); } else if ($value > 1024) { - return ($value/(1024)) . _('kB'); + $value = $value/1024; + // TRANS: Number of kilobytes. %d is the number. + return sprintf(_m('%dkB','%dkB',$value),$value); } else { - return $value; + // TRANS: Number of bytes. %d is the number. + return sprintf(_m('%dB','%dB',$value),$value); } }