Closed Bug 1564841 Opened 1 year ago Closed 1 year ago

Add ability to filter "Imported" strings

Categories

(Webtools :: Pontoon, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: karskaja, Mentored)

Details

(Whiteboard: outreachyround19)

Attachments

(2 files)

Translation authors filter should include an entry for translations that don't have an author.

Mentor: m
Priority: P3 → P2

Hi Majaz,

In order to review all translations made by other translators, I filter by author, one by one.
Adding a filter by no author will resolve my need to review imported strings.
But to do this work, it would be even easier if there was an option to appear only the strings approved by the author, instead of all strings that had her/his contribution.
Is it possible?

Flags: needinfo?(m)

Marcelo,

As the name suggests, the "Translation Authors" filter filters by users who authored the translations.

Adding the ability to filter by reviewers (users who approved, maybe also rejected translations) is a bigger feature, which also requires some design changes. Please file a separate bug for it.

Flags: needinfo?(m)

Matjaz,

I'm afraid I didn't explain correctly.
I didn't mean add filter by reviewer.

For example, if I filter by Cynthia, appear all strings that have her contribution, either approved or rejected.
What I asked for is an option to appear only the strings whose Cynthia's contributions are approved.
With this option, I'd be able to view only IMPORTED (or any author) translations that was not replaced by another author's approved translation.
This will easy the reviewing process.

Marcelo,

Thanks for clarifying this. I wonder if combining the Author filter and the Translated status filter would be helpful.

You need to click on the filter icon to select multiple filters, for example:
https://pontoon.mozilla.org/translate/pt-BR/firefox/all-resources/?status=translated&author=cynthiacpereira%40gmail.com

I know this is not the same as what you are asking for, because it also includes approved strings for which Cynthia contributed rejected and unreviewed translations. But it might still be helpful.

If not, feel free to file a separate bug and let's keep this one for the Imported filter.

Hi Pachi, I've assigned the bug to you. Please let me know if you have any questions, either here or in #pontoon on IRC.

You can start by installing Pontoon locally using Docker.

Once you have a working local environment, please make sure to read our contribution docs. It contains information on how to style code, how to run tests, how to name your commits, etc. All the things you need to know if you want your work to be merged into Pontoon!

--

Albiona, we have several other mentored bugs available. For instance, you can have a look at bug 1564837 or you can find me in #pontoon on IRC and we can find something that will suit you together.

Assignee: nobody → pachicarlson
Status: NEW → ASSIGNED
Flags: needinfo?(m)

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: pachicarlson → nobody
Status: ASSIGNED → NEW

Hi all, I'm new here and an Outreachy participant. Judging from my User Activity Report, it looks like I've been assigned this bug. Is this correct?

Now it is. :) I see you've already set up the environment.

Assignee: nobody → rajsandhu
Status: NEW → ASSIGNED

Yes, and I feel as clueless as a kid sitting in a 747 cockpit, trying on the captain's hat. But I'm looking through the documentation and will have plenty of questions, the answers to which will hopefully have me flying soon. :D

Assignee: rajsandhu → henikilana
Assignee: henikilana → nobody
Status: ASSIGNED → NEW

Hi @mathjazz! I'm ready to try this. Can I?

Assignee: nobody → karskaja
Status: NEW → ASSIGNED

@mathjazz I have a question: this Imported(System User) is it exist somewhere in the system?
Because I do not see it in a list of users(props.authorData array).
Should it be done by just adding additional html block with unexisting virtual 'Imported' user?
Or it can be received into props.authorData array somehow?

As I understood all imported translations will be filtered if it will be possible to filter by empty email here:
https://github.com/mozilla/pontoon/blob/82190d5bdf065dec294153e95fc850b13a58716c/pontoon/base/models.py#L2175
Am I right?

We don't have such System user.

First, you'll need to make sure that the "Imported" System User is returned by the API:
https://github.com/mozilla/pontoon/blob/master/frontend/src/core/api/filter.js

Right now the API excludes translations for which the user is None:
https://github.com/mozilla/pontoon/blob/master/pontoon/contributors/utils.py#L59

Instead of empty email, we should use something like "Imported" here:
https://github.com/mozilla/pontoon/blob/82190d5bdf065dec294153e95fc850b13a58716c/pontoon/base/models.py#L2175

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