From e7f409a3c7a92d50cf857b808b61f4d5aadea8c3 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 1 Feb 2016 17:52:43 -0300 Subject: fix hour12 React warning for FormattedDate --- web/react/components/file_upload.jsx | 6 +++++- web/react/components/rhs_comment.jsx | 2 +- web/react/components/rhs_root_post.jsx | 2 +- web/react/components/search_results_item.jsx | 2 +- web/static/i18n/en.json | 1 + web/static/i18n/es.json | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) (limited to 'web') 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' /> diff --git a/web/static/i18n/en.json b/web/static/i18n/en.json index 78e4c625d..d6401ab6e 100644 --- a/web/static/i18n/en.json +++ b/web/static/i18n/en.json @@ -513,6 +513,7 @@ "file_upload.limited": "Uploads limited to {count} files maximum. Please use additional posts for more files.", "file_upload.filesAbove": "Files above {max}MB could not be uploaded: {filenames}", "file_upload.fileAbove": "File above {max}MB could not be uploaded: {filename}", + "file_upload.pasted": "Image Pasted at ", "find_team.submitError": "Please enter a valid email address", "find_team.placeholder": "you@domain.com", "find_team.findTitle": "Find Your Team", diff --git a/web/static/i18n/es.json b/web/static/i18n/es.json index 6b5eee94a..cb3e8a199 100644 --- a/web/static/i18n/es.json +++ b/web/static/i18n/es.json @@ -545,7 +545,7 @@ "file_upload.fileAbove": "No se puede subir un archivo que pesa más de {max}MB: {filename}", "file_upload.filesAbove": "No se pueden subir archivos de más de {max}MB: {filenames}", "file_upload.limited": "Se pueden subir un máximo de {count} archivos. Por favor envía otros mensajes para adjuntar más archivos.", - "file_upload.pasted": "Imagen Pegada en ", + "file_upload.pasted": "Imagen Pegada el ", "find_team.email": "Correo electrónico", "find_team.findDescription": "Enviamos un correo electrónico con los equipos a los que perteneces.", "find_team.findTitle": "Encuentra tu equipo", -- cgit v1.2.3-1-g7c22