Closed Bug 1269104 Opened 8 years ago Closed 7 years ago

As a moderator, I want to compare a new translation to the English document

Categories

(developer.mozilla.org Graveyard :: User management, task)

All
Other
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Assigned: safwan)

References

Details

(Keywords: in-triage, Whiteboard: [specification][type:feature])

What problem would this feature solve?
======================================
When a contributor creates a new translation, there is no way in the UI to see what was changed in the first edit. For legitimate translators, this is an annoyance. If the editor is adding spam, this makes it more difficult to detect.

Who has this problem?
=====================
Staff contributors to MDN

How do you know that the users identified above have this problem?
==================================================================
On the history view of a translation [1], the first translated version does not have an option to compare translations.

When a user submits their first edit, an email is sent to the spam moderators. If the first edit is a new translation, no diff is shown.

[1] https://developer.mozilla.org/es/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL$history for example

How are the users identified above solving this problem now?
============================================================
Moderators open the first translated revision and visually confirm the edit looks reasonable. Or, they skip it because it is too difficult.

Do you have any suggestions for solving the problem? Please explain in detail.
==============================================================================
When a page is a translation, the interface could add the English revision the translation was based on as a fake "first edit", allowing comparison using the UI.

When the first edit diff is sent to spam moderators, it can be compared to the base English revision.

Is there anything else we should know?
======================================
When sending new translations to Akismet, the first translated content is compared to the English base revision.
Would be great to have this in the first edit emails as well.
Assignee: nobody → safwan.rahman15
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/6961f876e75ade7ec72f575d3b7eed84be16bd33
[Bug 1269104] Compare a new translation to the English document

https://github.com/mozilla/kuma/commit/a5bee8e019f785f03afca471227f3b64c04e1b1a
Merge pull request #4144 from safwanrahman/compare

[Bug 1269104] Compare a new translation to the English document
Deployed to stage, production.  For translations, the first revision in revision history is the English revision it is based on, making it easy to create a diff.  For some old translations, we may not have this information available.

Follow-on work:

* Monitor performance of new revision history query
* Add first translation diff to first edit and detected spam emails
* Investigate removing TransformQuerySet, TransformManager
Blocks: MDNSpamMail
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/e30097d46c863a1c91bbb033010fea596ca9a446
bug 1269104: Convert events tests to py.test

Convert from unittest-style tests to py.test, with complete coverage.

https://github.com/mozilla/kuma/commit/705c89214d124954eea8f0c48ff8fe76b3e00c93
bug 1269104: Move first_edit_email to events

Move the code that creates the first edit email with the other
notification email code. Rename context_dict to notification_context.

https://github.com/mozilla/kuma/commit/ab60dae4bcbbdde91445a294856530e5e9ef8290
bug 1269104: Move spam attempt email to events

Move the code that creates the spam attempt notification email with the
other notification email code.

https://github.com/mozilla/kuma/commit/221c218efdf93194b1ba8ad8802f14585eef82db
bug 1269104: Re-write test for revision.previous

https://github.com/mozilla/kuma/commit/de182d8c0b65930ed30f69908cdea46903ce2ed7
bug 1269104: Add tests for first translation

https://github.com/mozilla/kuma/commit/75b1963242781ebbd8d59fa64d3c5d05d3de4f33
fix bug 1269104: diff to en for first translation

When creating a diff for notification emails, compare the first
translation to the English revision it is based on.

https://github.com/mozilla/kuma/commit/1d4b33919501cad57713f4f99560d46477d1b647
bug 1269104: Move kuma.wiki fixtures to conftest

https://github.com/mozilla/kuma/commit/bff42c16c279e4354e622c14153605214419d629
Merge pull request #4181 from jwhitlock/diff_trans_1269104

bug 1269104: Refactor notification emails, provide diff for first translations
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/25628608c0c34c9c8f19fd30ca6ee16dca032c5c
bug 1269104: Fix revision history for translations

* Ensure the "view revision" link has the right URL
* Omit the "Revert to this revision" action for first translation,
  English source revision
* Mark the English source row with a class

https://github.com/mozilla/kuma/commit/e7880993468ee0098486596b25f63d106e51b9ea
Merge pull request #4194 from jwhitlock/en_rev_link_1269104

bug 1269104: Fix revision history
Deployed to stage and production.  There are some additional issues:

* No "Previous" link for the first translation, for example on https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Opérateurs/Compréhensions_de_tableau$history?page=2
* When you compare the first translation to the English source, the $compare pages links to the wrong locale for the English version.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/7a5672ad06f69462c505b1adf0b9da453e9a584f
bug 1269104: Drop unused params from revision_diff

https://github.com/mozilla/kuma/commit/c11c9cc141cadf0fe23e4f910a9dc2ce14ccf26b
Merge pull request #4298 from jwhitlock/revision-diff-drop-header-1269104

bug 1269104: Drop unused params from revision_diff
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/73a5e466c793c8fe5084f287ba9561f9642914e8
bug 1269104: Convert revisions tests to pytest

https://github.com/mozilla/kuma/commit/32e2507e0fe2a213e19288cc96c5d1d72e0c68e7
bug 1269104: Optimize DB calls on rev history page

Minimize database queries for the document, revisions, and creators,
to only request data used in template rendering, and to reduce the total
number of DB queries from 15 to 10. This gives a 2.5x speed-up in the
local environment, and gets us a step closer to allowing scrapers.

New template context also adds "Previous" link for first translation
revision, when the English base revision is known, for a consistent UI.

https://github.com/mozilla/kuma/commit/a8956df82c3bea62a189cf81d0ba12e540715f80
bug 1269104: Remove TransformManager / Queryset

The TransformManager was used for Revisions for the .transform method,
which supported adding .previous_revision to the objects in a queryset.
This is no longer used, so the standard Django manager can be used
again.

https://github.com/mozilla/kuma/commit/960d66f68f8f1b58464084985ac7d9f3c495c560
bug 1269104: Switch to get_object_or_404

https://github.com/mozilla/kuma/commit/7fcf9ff41981b5273d0018b6bb76386ce89ab31a
bug 1269104: Handle translations w/o based_on

https://github.com/mozilla/kuma/commit/8b941c7ffa7fabbe146f9d17b74d792cf531c002
bug 1269104: Add another field to avoid a query

Pre-fetch document.current_revision_id to avoid loading it from the
database in wiki/list/revisions.html

https://github.com/mozilla/kuma/commit/d6730e89d7bd2ca583cf419100be00fb5d361220
bug 1269104: Avoid reading missing attribute

Revision.previous_revision was optionally added by the TransformManager,
which has been removed.  Instead, use previous_revision directly.

https://github.com/mozilla/kuma/commit/127f92f21ea358bcb1d56eaf056aae36707900a2
Merge pull request #4297 from jwhitlock/optimize_history_1269104

bug 1269104: Refactor and optimize revision history
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/49781ddeda029c814709e6376f18a3f836041585
bug 1269104: Add origin param to revision_diff

Add origin=translate or origin=compare, to return to the correct view
when selecting different revisions to compare.

https://github.com/mozilla/kuma/commit/264dbe1e0af2f3951e4afd740b9f857e364bae6b
bug 1269104: Use the 'to' revision for new compare

It is now possible that a translation is compared to an English
original. When the user is picking a new set of revisions to compare, go
to the compare page for the "to" revision, so that the translation's
history instead of the English history will be displayed.

https://github.com/mozilla/kuma/commit/a2d662173a0c6590ee35299bf3f533f4806008f9
Merge pull request #4304 from jwhitlock/diff-to-english-1269104

bug 1269104: Fix issues when comparing first translation to English revision
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/83bed199ab7f44ec9c1b98979ec04f15ecf671a6
bug 1269104: Rewrite CompareRevisionTests

Convert CompareRevisionTests to py.test tests. Most tests exercise the
view, not the template, so moving to new file test_views_revision.

https://github.com/mozilla/kuma/commit/0f15b1d30687e1c236a9b29765e2c639d834e2b3
bug 1269104: Template test for revision compare

https://github.com/mozilla/kuma/commit/614e8cbbb9de43005bd662f437e658acff7b0b36
bug 1269104: Add tests for translation compare

Add a view and template test for the revision compare view when
comparing a localized revision to the English source.

https://github.com/mozilla/kuma/commit/5b76229c20db1bb451a6d40eb4cecdf510ca8e85
Merge pull request #4309 from jwhitlock/english-diff-tests-1269104

bug 1269104 - Refactor compare_revisions tests, add translation tests
It is now easy to compare a translation to the English revision when the translation was started. Thanks, safwan!
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.