diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-02-01 17:52:43 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-02-01 17:52:43 -0300 |
commit | e7f409a3c7a92d50cf857b808b61f4d5aadea8c3 (patch) | |
tree | 30e65cff9d06664690623df1d0c54526e0c24171 /web/react/components | |
parent | 3f91bc2df2c6f9d8437f258233609e9801b7f8f6 (diff) | |
download | chat-e7f409a3c7a92d50cf857b808b61f4d5aadea8c3.tar.gz chat-e7f409a3c7a92d50cf857b808b61f4d5aadea8c3.tar.bz2 chat-e7f409a3c7a92d50cf857b808b61f4d5aadea8c3.zip |
fix hour12 React warning for FormattedDate
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/file_upload.jsx | 6 | ||||
-rw-r--r-- | web/react/components/rhs_comment.jsx | 2 | ||||
-rw-r--r-- | web/react/components/rhs_root_post.jsx | 2 | ||||
-rw-r--r-- | web/react/components/search_results_item.jsx | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index 2f9146193..626dbc5b3 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -20,6 +20,10 @@ const holders = defineMessages({ fileAbove: { id: 'file_upload.fileAbove', defaultMessage: 'File above {max}MB could not be uploaded: {filename}' + }, + pasted: { + id: 'file_upload.pasted', + defaultMessage: 'Image Pasted at ' } }); @@ -237,7 +241,7 @@ class FileUpload extends React.Component { min = String(d.getMinutes()); } - var name = 'Image Pasted at ' + d.getFullYear() + '-' + d.getMonth() + '-' + d.getDate() + ' ' + hour + '-' + min + '.' + ext; + var name = formatMessage(holders.pasted) + d.getFullYear() + '-' + d.getMonth() + '-' + d.getDate() + ' ' + hour + '-' + min + '.' + ext; formData.append('files', file, name); formData.append('client_ids', clientId); diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 1dd8354d7..1addebbe4 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -231,7 +231,7 @@ class RhsComment extends React.Component { day='numeric' month='long' year='numeric' - hour12='true' + hour12={true} hour='2-digit' minute='2-digit' /> diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx index bc772aaa5..f9f7f8f81 100644 --- a/web/react/components/rhs_root_post.jsx +++ b/web/react/components/rhs_root_post.jsx @@ -223,7 +223,7 @@ export default class RhsRootPost extends React.Component { day='numeric' month='long' year='numeric' - hour12='true' + hour12={true} hour='2-digit' minute='2-digit' /> diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index a0b252d25..0ad091d5b 100644 --- a/web/react/components/search_results_item.jsx +++ b/web/react/components/search_results_item.jsx @@ -81,7 +81,7 @@ export default class SearchResultsItem extends React.Component { day='numeric' month='long' year='numeric' - hour12='true' + hour12={true} hour='2-digit' minute='2-digit' /> |