AddingItemsToAjob.cs
The AddingItemsToAjob.cs plugin demonstrates how to add an item to a translation job. You can add an item to a translation job at various moments in the life cycle of a job; on creation, on saving, and on resolving (when sending).
Deciding on when (what event) the item(s) is added depends essentially on whether you want the item to be visible to the user when they edit the job and whether you want them to be able to remove the item:
- On creation—if you add an item(s) to the job when it is created, the user can see the item and remove it from the job
- On saving—if you add an item(s) to the job when it is saved, the user can see the item next time they view a job but they cannot effectively remove it because it is added once more to the job next time it is saved
- On resolving—if you add an item(s) after the item(s) has been resolved, the item is displayed when the user views the job but only after it has been sent for translation (the job is read-only)