summaryrefslogtreecommitdiffstats
path: root/web/react/components/file_info_preview.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-02-03 14:32:01 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-02-03 14:32:01 -0500
commit2b4af8d8c73ba5b9b683b65b1df4d4e3f24edb81 (patch)
tree916555d3a3f53ce9c41873949706b3e723465937 /web/react/components/file_info_preview.jsx
parentacac4ab989ac5b0af87aa53a1a1d0c9356dcafc9 (diff)
parentac184720facfaf43f1e48448375d125da19ddefd (diff)
downloadchat-2b4af8d8c73ba5b9b683b65b1df4d4e3f24edb81.tar.gz
chat-2b4af8d8c73ba5b9b683b65b1df4d4e3f24edb81.tar.bz2
chat-2b4af8d8c73ba5b9b683b65b1df4d4e3f24edb81.zip
Merge pull request #2060 from ZBoxApp/PLT-7-channel
PLT-7: Refactoring frontend (chunk 11)
Diffstat (limited to 'web/react/components/file_info_preview.jsx')
-rw-r--r--web/react/components/file_info_preview.jsx19
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(', ');