From e88ee4ec46da3519c888d0af758f3d6b349207c0 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 12 Sep 2010 18:11:28 +0200 Subject: [PATCH] Fix i18n issue and add translator documentation. --- lib/mediafile.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/mediafile.php b/lib/mediafile.php index c96c78ab5d..5946363207 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -315,12 +315,17 @@ class MediaFile } $media = MIME_Type::getMedia($filetype); if ('application' !== $media) { - $hint = sprintf(_(' Try using another %s format.'), $media); + // TRANS: Client exception thrown trying to upload a forbidden MIME type. + // TRANS: %1$s is the file type that was denied, %2$s is the application part of + // TRANS: the MIME type that was denied. + $hint = sprintf(_('"%1$s" is not a supported file type on this server. ' . + 'Try using another %2$s format.'), $filetype, $media); } else { - $hint = ''; + // TRANS: Client exception thrown trying to upload a forbidden MIME type. + // TRANS: %s is the file type that was denied. + $hint = sprintf(_('"%s" is not a supported file type on this server.'), $filetype); } - throw new ClientException(sprintf( - _('%s is not a supported file type on this server.'), $filetype) . $hint); + throw new ClientException($hint); } static function respectsQuota($user, $filesize)