Log more explicitly why a translation job item is not accepted

Created on 11 December 2024, 10 days ago

Problem/Motivation

On this site, the translations got sent out and are coming back at random times. In some cases, the original workspace is no longer around. We handle that case in the module. But we don't tell the user this is a problem. Let's log the issue so it is more clear that you'll need to re-submit the translation job items.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @heddn
  • Merge request !8Update WorkspaceAwareJobItem.php → (Merged) created by heddn
  • This is working but the messages are only added to the job once its translation comes back/gets accepted.

    I wonder if we should write an update hook or even a small form or hook_cron that allows scanning for such jobs (which are pointing to irrelevant workspaces), lists and updates them. That would allow a more immediate feedback on such jobs to users.

    If we wanted to improve this situation a bit more, we could implement hook_workspace_update() and possible hook_workspace_delete() in this module to display/log warnings referring to the jobs and also updating the current jobs adding the message that is added in the MR.

  • heddn Nicaragua

    I _think_ the normal use case where this happens is when this module is installed after various translations were sent off. Translations come back and are accepted via a cron job. No one would visit the job items page to see any errors/warnings until after the jobs _still_ aren't accepted. So I think what we have here covers the majority use case. If we can't find a workspace, we could just dump translations into Live, but that seems error prone and unexpected. Better to leave in an error state and have the site owner cancel or edit the job to manually assign the correct workspace and re-process the jobs.

  • Pipeline finished with Skipped
    8 days ago
    #368055
    • heddn committed c2f685d6 on 1.0.x
      Issue #3493413: Log more explicitly why a translation job item is not...
Production build 0.71.5 2024