diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-02-03 00:46:56 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-02-03 12:17:13 -0300 |
commit | 6a3806fe9d03abdfa1eb30fc62c7388a6922b60f (patch) | |
tree | ddd3c092a4ff8a7d241f264644804be1194b4768 /web/react/components/file_info_preview.jsx | |
parent | f7fddd6cce43ec75599eb4aa463276f18eb4ca28 (diff) | |
download | chat-6a3806fe9d03abdfa1eb30fc62c7388a6922b60f.tar.gz chat-6a3806fe9d03abdfa1eb30fc62c7388a6922b60f.tar.bz2 chat-6a3806fe9d03abdfa1eb30fc62c7388a6922b60f.zip |
PLT-7: Refactoring frontend (chunk 11)
- channel view
- Added translations for previous commits
- Fix bug on signup_team email body
Diffstat (limited to 'web/react/components/file_info_preview.jsx')
-rw-r--r-- | web/react/components/file_info_preview.jsx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/web/react/components/file_info_preview.jsx b/web/react/components/file_info_preview.jsx index 45d89007f..1dac140c9 100644 --- a/web/react/components/file_info_preview.jsx +++ b/web/react/components/file_info_preview.jsx @@ -3,15 +3,28 @@ import * as Utils from '../utils/utils.jsx'; -export default function FileInfoPreview({filename, fileUrl, fileInfo}) { +import {defineMessages} from 'mm-intl'; + +const holders = defineMessages({ + type: { + id: 'file_info_preview.type', + defaultMessage: 'File type ' + }, + size: { + id: 'file_info_preview.size', + defaultMessage: 'Size ' + } +}); + +export default function FileInfoPreview({filename, fileUrl, fileInfo, formatMessage}) { // non-image files include a section providing details about the file const infoParts = []; if (fileInfo.extension !== '') { - infoParts.push('File type ' + fileInfo.extension.toUpperCase()); + infoParts.push(formatMessage(holders.type) + fileInfo.extension.toUpperCase()); } - infoParts.push('Size ' + Utils.fileSizeToString(fileInfo.size)); + infoParts.push(formatMessage(holders.size) + Utils.fileSizeToString(fileInfo.size)); const infoString = infoParts.join(', '); |