- // TRANS: %1$d is the byte limit for uploads, %2$d is the byte count for the uploaded file.
- // TRANS: %1$s is used for plural.
- return sprintf(_m('No file may be larger than %1$d byte and the file you sent was %2$d bytes. Try to upload a smaller version.',
- 'No file may be larger than %1$d bytes and the file you sent was %2$d bytes. Try to upload a smaller version.',
- common_config('attachments', 'file_quota')),
- common_config('attachments', 'file_quota'), $fileSize);
+ // TRANS: %1$d (used for plural) is the byte limit for uploads,
+ // TRANS: %2$s is the proper form of "n bytes". This is the only ways to have
+ // TRANS: gettext support multiple plurals in the same message, unfortunately...
+ throw new ClientException(
+ sprintf(_m('No file may be larger than %1$d byte and the file you sent was %2$s. Try to upload a smaller version.',
+ 'No file may be larger than %1$d bytes and the file you sent was %2$s. Try to upload a smaller version.',
+ $fileQuota),
+ $fileQuota, $fileSizeText));