-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload screenshot from clipboard #6710
Comments
This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented. In case you need this feature soon, please consider helping or push it by funding the development. |
+1 I was just going to write this feature request myself. It would be a great help indeed. |
@nijel i would like to work on this if possible! could you possibly direct me as to where i should be looking to make this modification? |
The screenshot upload form is here: weblate/weblate/screenshots/forms.py Lines 40 to 59 in f785813
It is being rendered here: weblate/weblate/templates/screenshots/screenshot_list.html Lines 19 to 32 in f785813
|
@nijel I have some questions:
|
No rules so far. Historically, there has been a single JS file, but recently, we've started to split out some logic - we now have also We're using django-crispy-forms, it should allow customizing the form rendering, see https://django-crispy-forms.readthedocs.io/en/latest/layouts.html. The screenshot forms are here: https://github.com/WeblateOrg/weblate/blob/main/weblate/screenshots/forms.py, and for now, I'd make this change only to allow pasting screenshots, not anything else. |
The user clicks paste. Then the clipboard is read if the permesion is given and the context is secure (as required by the clipboard API). Then the image is pasted into the select file input. Otherwise if no image is available we only inform the user about that. NOTE: Implemented only in the add screenshot form in /screenshots page and not in the modal. Related: WeblateOrg#6710
The previous commit added pase screenshot in screenshot/ pages. This adds it in the modal box that opens when Add Screenshot button clicked while checking individual strings. Related: WeblateOrg#6710
The user clicks paste. Then the clipboard is read if the permesion is given and the context is secure (as required by the clipboard API). Then the image is pasted into the select file input. Otherwise if no image is available we only inform the user about that. NOTE: Implemented only in the add screenshot form in /screenshots page and not in the modal. Related: WeblateOrg#6710
The previous commit added pase screenshot in screenshot/ pages. This adds it in the modal box that opens when Add Screenshot button clicked while checking individual strings. Related: WeblateOrg#6710
…12181) * Feat: Add clipboard paste functionality for screenshots The user clicks paste. Then the clipboard is read if the permesion is given and the context is secure (as required by the clipboard API). Then the image is pasted into the select file input. Otherwise if no image is available we only inform the user about that. NOTE: Implemented only in the add screenshot form in /screenshots page and not in the modal. Related: #6710 * Add screenshot clipboard paste in the modal box. The previous commit added pase screenshot in screenshot/ pages. This adds it in the modal box that opens when Add Screenshot button clicked while checking individual strings. Related: #6710 * Move the paste button closer to image input The paste button now is rendered by django screenshot form isntead of being in the template. * Remove the paste button if clipboard API isn't supported by the browser * Remove part of the forgotten paste button * Use custom input instead of using dummy one * Add paste button to screenshot editing * Add changelog entry Co-authored-by: Michal Čihař <michal@cihar.com>
Thank you for your report; the issue you have reported has just been fixed.
|
Is your feature request related to a problem? If so, please describe.
I often find myself taking screenshots from our web app via the Firefox screenshot tool. By default I always copy to clipboard so that I can paste the screenshot into other tools later. Unfortunately Weblate does not allow this. I must go back to the webapp, take the screenshot again and save it to disk. Then I must upload it to Weblate via the "Browse" button (navigating to the screenshot folder on my disk).
Describe the solution you'd like
Allow pasting screenshots into the "Add new screenshot" dialogue.*
*Might have to be resized automatically to comply with 2000x2000 px limit.
Describe alternatives you've considered
Download & Upload screenshots.
Screenshots
Paste screenshot into this dialogue:
The text was updated successfully, but these errors were encountered: