diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml
index 7a10a2530..71636bd1e 100644
--- a/app/views/photos/_new_photo.haml
+++ b/app/views/photos/_new_photo.haml
@@ -8,7 +8,24 @@
element: document.getElementById('file-upload'),
params: {'photo' : { 'to' : "#{aspect_id}"}, 'set_profile_image' : "#{set_profile_image if defined?(set_profile_image)}"},
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
- action: "#{photos_path}"
+ action: "#{photos_path}",
+ template: '
' +
+ '
#{t('.drop')}
' +
+ '
#{t('.upload')}
' +
+ '
' +
+ '
',
+ fileTemplate: '' +
+ '' +
+ '' +
+ '' +
+ '#{t('cancel')}' +
+ '#{t('.failed')}' +
+ '',
+ messages: {
+ typeError: "#{t('.invalid_ext')}",
+ sizeError: "#{t('.size_error')}",
+ emptyError: "#{t('.empty')}"
+ }
});
}
window.onload = createUploader;
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index bc66fab5a..8812eaff7 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -214,6 +214,13 @@ en:
error: "Failed to edit photo."
destroy:
notice: "Photo deleted."
+ new_photo:
+ drop: "Drop photos here to upload"
+ upload: "Upload a photo"
+ failed: "Failed"
+ invalid_ext: "{file} has invalid extension. Only {extensions} are allowed."
+ size_error: "{file} is too large, maximum file size is {sizeLimit}."
+ empty: "{file} is empty, please select files again without it."
registrations:
new:
sign_up: "Sign up"