diff --git a/Changelog.md b/Changelog.md index 48e607a50..4fd01ec8e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -23,6 +23,7 @@ ## Refactor ## Bug fixes +* Make photo upload button hover text translatable [#7429](https://github.com/diaspora/diaspora/pull/7429) ## Features diff --git a/app/assets/javascripts/app/views/publisher/uploader_view.js b/app/assets/javascripts/app/views/publisher/uploader_view.js index 841952112..26541c794 100644 --- a/app/assets/javascripts/app/views/publisher/uploader_view.js +++ b/app/assets/javascripts/app/views/publisher/uploader_view.js @@ -14,6 +14,9 @@ app.views.PublisherUploader = Backbone.View.extend({ element: this.el, button: this.el, + text: { + fileInputTitle: Diaspora.I18n.t("photo_uploader.upload_photos") + }, request: { endpoint: Routes.photos(), params: { diff --git a/app/assets/javascripts/mobile/mobile_file_uploader.js b/app/assets/javascripts/mobile/mobile_file_uploader.js index 3b5f996a7..86c784818 100644 --- a/app/assets/javascripts/mobile/mobile_file_uploader.js +++ b/app/assets/javascripts/mobile/mobile_file_uploader.js @@ -23,6 +23,9 @@ function createUploader(){ sizeLimit: 4194304 }, button: document.getElementById("file-upload-publisher"), + text: { + fileInputTitle: Diaspora.I18n.t("photo_uploader.upload_photos") + }, callbacks: { onProgress: function(id, fileName, loaded, total) { diff --git a/app/views/publisher/_publisher.html.haml b/app/views/publisher/_publisher.html.haml index 7eb8e3319..be5826469 100644 --- a/app/views/publisher/_publisher.html.haml +++ b/app/views/publisher/_publisher.html.haml @@ -27,7 +27,7 @@ .publisher-buttonbar#publisher-images .btn.btn-link.poll-creator#poll_creator{title: t("shared.publisher.poll.add_a_poll")} %i.entypo-bar-graph - .btn.btn-link.file-upload#file-upload{title: t("shared.publisher.upload_photos")} + .btn.btn-link.file-upload#file-upload %i.entypo-camera.publisher_image .btn.btn-link.locator#locator{title: t("shared.publisher.get_location")} %i.entypo-location.publisher_image diff --git a/app/views/publisher/_publisher.mobile.haml b/app/views/publisher/_publisher.mobile.haml index 4399b7c13..dd6bcf2b7 100644 --- a/app/views/publisher/_publisher.mobile.haml +++ b/app/views/publisher/_publisher.mobile.haml @@ -31,7 +31,7 @@ %ul#photodropzone #fileInfo-publisher - #file-upload-publisher{title: t('shared.publisher.upload_photos'), class: 'btn btn-default'} + #file-upload-publisher{class: "btn btn-default"} %i.entypo-camera.middle #publisher_mobile = submit_tag t("shared.publisher.share"), diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index afcf15e5a..b4f0119e4 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -1073,7 +1073,6 @@ en: formatWithMarkdown: "You can use %{markdown_link} to format your post" posting: "Posting..." share: "Share" - upload_photos: "Upload photos" get_location: "Get your location" remove_location: "Remove location" whats_on_your_mind: "What’s on your mind?" diff --git a/config/locales/javascript/javascript.en.yml b/config/locales/javascript/javascript.en.yml index 3a93a9d5e..5ef87d181 100644 --- a/config/locales/javascript/javascript.en.yml +++ b/config/locales/javascript/javascript.en.yml @@ -210,6 +210,7 @@ en: alright_ill_wait: "All right, I’ll wait." preparing_your_stream: "Preparing your personalized stream..." photo_uploader: + upload_photos: "Upload photos" looking_good: "OMG, you look awesome!" completed: "<%= file %> completed" error: "A problem occurred while uploading file <%= file %>"