Track restored and un-reviewed suggestions in the user translations API

Aperta
#4,647 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@flodolo ci sta già lavorando.

Dal 6/11/2026.

  • #4649 di @flodolo — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

API hours P2

GET /api/v2/users/<username>/translations/ lets external tools follow the status of suggestions they submitted.

Two cases are missing:

  1. Restored suggestions. When an uploaded suggestion matches a rejected translation, upload/suggestions/ un-rejects the existing translation instead of creating a new one. The translation keeps its original author and date, so it doesn't appear in the uploader's list: the endpoint filters by author. A bot that restores old suggestions can't tell whether a translator later rejects or approves them.
  2. Un-reviews. The date range only checks date, approved_date and rejected_date. An old translation that is un-rejected or unapproved within the range is missing, so clients never see it go back to unreviewed.

user-actions doesn't fit this use case. It returns every action for one project on one day, for all users, with no pagination. Following hundreds of suggestions would mean scanning projects × days and rebuilding each translation's state from events.

My plan is to:

  • Add an opt-in include=restored parameter that also returns translations by other users that the requested user un-rejected. This would come from ActionLog (translation:unrejected performed by the user), not from Translation.unrejected_user.
  • Add a restored boolean to each result, so clients can tell restored translations from their own.
Lingua principale
Python
Stelle
1.7k
Fork
620
Merge medio
1g 4h
PR unite (30g)
30

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/pontoon

Tutte le issue di mozilla/pontoon

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.