Skip to content
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

Store translation activity data in a separate table #3473

Open
mathjazz opened this issue Dec 5, 2024 · 1 comment
Open

Store translation activity data in a separate table #3473

mathjazz opened this issue Dec 5, 2024 · 1 comment
Labels
P3 Default, possibly shipping in the following two quarters task

Comments

@mathjazz
Copy link
Collaborator

mathjazz commented Dec 5, 2024

We'd like to move some of the Translation metadata related to user activity to a separate table:

# Active translations are displayed in the string list and as the first
# entry in the History tab. There can only be one active translation for
# each (entity, locale, plural_form) combination. See bug 1481175.
active = models.BooleanField(default=False)
pretranslated = models.BooleanField(default=False)
fuzzy = models.BooleanField(default=False)
approved = models.BooleanField(default=False)
approved_user = models.ForeignKey(
User,
models.SET_NULL,
related_name="approved_translations",
null=True,
blank=True,
)
approved_date = models.DateTimeField(null=True, blank=True)
unapproved_user = models.ForeignKey(
User,
models.SET_NULL,
related_name="unapproved_translations",
null=True,
blank=True,
)
unapproved_date = models.DateTimeField(null=True, blank=True)
rejected = models.BooleanField(default=False)
rejected_user = models.ForeignKey(
User,
models.SET_NULL,
related_name="rejected_translations",
null=True,
blank=True,
)
rejected_date = models.DateTimeField(null=True, blank=True)
unrejected_user = models.ForeignKey(
User,
models.SET_NULL,
related_name="unrejected_translations",
null=True,
blank=True,
)
unrejected_date = models.DateTimeField(null=True, blank=True)

See also #3443.

@mathjazz mathjazz added task P3 Default, possibly shipping in the following two quarters labels Dec 5, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs triage in Pontoon Roadmap Dec 5, 2024
@eemeli
Copy link
Member

eemeli commented Dec 5, 2024

The idea here would be to add a new table, something like TranslationActions, which would provide a per-entity-locale timestamped stream of approve/reject/add-fuzzy/pretranslate actions that would provide the information currently retained in the corresponding Translation status fields. The current status of an entity in a given locale would be determined by looking at the most recent action.

This could also replace a large part of ActionLog as well as ChangedEntityLocale.

@mathjazz mathjazz moved this from 🆕 Needs triage to 📋 Not ready yet in Pontoon Roadmap Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Default, possibly shipping in the following two quarters task
Projects
Status: 📋 Not ready yet
Development

No branches or pull requests

2 participants