Merge pull request #8283 from owncloud/translatable-max-in-upload

make max. text translatable
This commit is contained in:
Jörn Friedrich Dreyer 2014-04-22 10:23:08 +02:00
commit 4d9ff49f61
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ class Helper
$l = new \OC_L10N('files'); $l = new \OC_L10N('files');
$maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']); $maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']);
$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize); $maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize; $maxHumanFilesize = $l->t('Upload (max. %s)', array($maxHumanFilesize));
return array('uploadMaxFilesize' => $maxUploadFilesize, return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize, 'maxHumanFilesize' => $maxHumanFilesize,

View File

@ -19,7 +19,7 @@
</div> </div>
<?php endif;?> <?php endif;?>
<div id="upload" class="button" <div id="upload" class="button"
title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>"> title="<?php p($l->t('Upload (max. %s)', array($_['uploadMaxHumanFilesize']))) ?>">
<?php if($_['uploadMaxFilesize'] >= 0):?> <?php if($_['uploadMaxFilesize'] >= 0):?>
<input type="hidden" id="max_upload" name="MAX_FILE_SIZE" value="<?php p($_['uploadMaxFilesize']) ?>"> <input type="hidden" id="max_upload" name="MAX_FILE_SIZE" value="<?php p($_['uploadMaxFilesize']) ?>">
<?php endif;?> <?php endif;?>