Closed Bug 1545964 Opened 1 year ago Closed 4 months ago

[Translate.Next] Button to accept a suggested translation has an inaccurate/confusing tooltip

Categories

(Webtools :: Pontoon, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pornel, Assigned: MonikaMaheshwari, Mentored)

Details

(Whiteboard: outreachyround19)

Attachments

(2 files)

Attached image screenshot

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. Found a "missing" translation that has a suggestion for translation (https://pontoon.mozilla.org/pl/common-voice/web/locales/en/messages.ftl/?status=missing)
  2. Tried to accept a suggestion by clicking a button with a checkmark.

Actual results:

The button, when inactive, only shows a tooltip "Copy Into Translation (Tab)". That's surprising, because that seems like an completely unrelated option. Did some CSS/JS break?

Expected results:

The button should have a tooltip that explains what the button does. When it's disabled, it should explain why.

Thanks for the report! What happens here is that review actions (approve, unapprove, reject, unreject, delete) are disabled, because you don't have permissions, or aren't logged in or the string is in read-only mode. We still show the buttons, because they reveal the status of the translation.

To fix the bug, we should also remove the "Copy Into Translation (Tab)" tooltip when translations cannot be copied to the editor.

Since we're rewriting frontend and might not fix this in Translate.Current, I'm marking it as Translate.Next bug.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4
Summary: Button to accept a suggested translation has an inaccurate/confusing tooltip → [Translate.Next] Button to accept a suggested translation has an inaccurate/confusing tooltip
Mentor: adrian

Hello I would like to work on this bug, I am an applicant from outreachy

Hi Veronica, the bug is now assigned to you!

Adrian will get back to you with more details shortly.

Assignee: nobody → vlikunama
Status: NEW → ASSIGNED

Thanks

Hi Veronica, thanks for offering to contribute.

Before anything else, if you haven't done so yet, please install Pontoon and make sure it works locally. Instructions are here: https://github.com/mozilla/pontoon#contributing

This bug is about a piece of Translate.Next, and the code lives in the frontend folder. You can read the documentation specific to this here: https://github.com/mozilla/pontoon/blob/master/frontend/README.md

The file this is about is here: https://github.com/mozilla/pontoon/blob/master/frontend/src/modules/history/components/Translation.js

This is a React component. I believe the problem at hand is well described in the previous comments. Your goal is to make it work, test it on your local instance, verify that all the tests pass, then file a pull request.

We're getting lots of requests by Outreachy participants, so we often run out of Mentored bugs. We've decided to unassign all Mentored bugs until the assignee sets up a development environment.

Please send us a screenshot of your working development environment via #pontoon on Mozilla IRC and we'll assign you a Mentored bug afterwards.

Thanks for understanding!

Assignee: vlikunama → nobody
Status: ASSIGNED → NEW
Assignee: nobody → monikamaheshwari1996
Status: NEW → ASSIGNED

Instead of Copy Into Translation (Tab) what title is needed to be shown.

Flags: needinfo?(m)

:MonikaMaheshwari we shouldn't show any title if !user.isAuthenticated || isReadOnlyEditor, because in this case Translation cannot be copied into the editor.

Is the user doesn't have permission to review translations (but can still copy them into the editor), we can keep the current behaviour.

Flags: needinfo?(m)

I think what you're proposing Matjaz is not entirely satisfying and will lead to other confusions. I propose that we go further and keep a title on the review icons, but when the user cannot perform those actions, the title tells what the status is.

Here are the use cases I can think of:

User is logged out

  • no "copy" title
  • approve icon says "Approved" or "Not approved", reject icon says "Rejected" or "Not rejected"

User is logged in, cannot perform review actions

  • "copy" title is there
  • approve icon says "Approved" or "Not approved", reject icon says "Rejected" or "Not rejected"

User is logged in, can perform review actions

  • "copy" title is there
  • approve icon says "Approve" or "Unapprove", reject icon says "Reject" or "Unreject"

Matjaz, what do you think?

Flags: needinfo?(m)

That's even better.

We should change "User is logged out" to "User is logged out or the editor is read-only".

Flags: needinfo?(m)

Cool, will do that :)

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Whiteboard: outreachyround19
You need to log in before you can comment on or make changes to this bug.