By default, the GitHub Connector delivers translations to GitHub via a translation pull request when all the strings in the Job reach the published step. However, you can receive translations before completing the job by enabling Early Delivery on a GitHub Connector configuration set.
To use Early Delivery, you must ensure that the Prepublish feature is enabled on a relevant workflow step and any SmartMatch settings that push content to a revision step. Requirements for using Early Delivery are detailed below.
Considerations
Configuration modes
Early delivery is supported on both Pull Request Mode and Single Branch Mode.
Translation providers
Any translation type (human, machine translation) can be delivered early.
SmartMatch
SmartMatched strings are included in the early delivery. SmartMatch rules that send strings to any step except the Publish step (meaning Edit, Revision, or Hold steps) must have the Enable Pre-Publish checkbox enabled, as shown:
Prepublish enabled in your workflows
Early Delivery only triggers when ALL strings in a Job have been prepublished. This means you must have prepublish enabled on a step of any workflow used for content for that Job.
One Early Delivery per Job
Once all content in a Job is prepublished, Early Delivery will trigger. Further changes to the translations will not re-trigger Early Delivery. Finalized translations will be delivered when the Job reaches the Completed status.
New content will not be added to the Job
New source content will not be added after Early Delivery is triggered for a Job. This impacts configuration sets with "Translation job create mode" configured to “reuse existing job if possible”. A new job will be created for any further content added (i.e., via additional commits in a Pull-Request mode configuration set).
Translation Delivery Flow
Two translation pushes will be sent out per Job when Early Delivery is enabled.
- Early Delivery
This push contains the first set of available translations for all the strings in the Job. This can include new translations, SmartMatches to a workflow step, SmartMatches to Published, and existing translations already published. - Final Delivery
These are the final versions of translations for strings in the Job once it hits the Completed status.
Early Delivery pull request
- Translation delivery is triggered when all strings in the Job are prepublished.
- Already published strings do not factor into this trigger (i.e. they are ignored).
- The Early Delivery references the source pull request or commit, depending on the configuration set mode.
- If in Pull Request mode, the source pull request that triggered translation is unblocked after the Early Delivery, allowing you to merge both source pull request and prepublished translations to the monitored branch.
Final Delivery pull request
- Published translations are delivered in a translation pull request referencing the source pull request or commit.
- In Pull Request mode, the GitHub Connector checks If the source pull request is still open or has been merged.
- If already merged, the translation pull request is forked from the monitored branch, allowing you to merge the completed translations to the monitored branch and overwrite the Early Delivery translations.
- If still open, the translation pull request is forked from the source pull request branch. Additionally, if the Early Delivery pull request is still open, it will be automatically closed as it is no longer necessary.
How to enable Early Delivery
STEP ONE: Enable Prepublish in the workflow
- In your GitHub Connector project in Smartling, go to Settings > Workflows
- Find the workflow your GitHub content is translated in
- On the step you want translations to be delivered early from, click Manage Step
- It can be the translation step or an edit or review step if preferred
- Under Automation, set prepublish strings to On Submit (when the translations are submitted to the next step).
Note: Currently, the On Save option is not supported as the Early Delivery may not trigger reliably.
Note: If prepublishing is enabled on a workflow step of an account-level workflow, strings in any project that uses that workflow will also be impacted by the prepublished setting.
STEP TWO: Enable Prepublish in SmartMatch Rules
If your GitHub project's linguistic package uses SmartMatch rules in its leverage configuration, do the following:
- In your GitHub Connector project in Smartling, go to Settings > Linguistic Package
- Under Leverage: Read from, click the leverage configuration name
- Under SmartMatch, click Enabled
- On any rules that are enabled and don't send strings to Published (i.e. rules that send strings to the First Revision or Hold step), select the Enable Pre-Publish checkbox
- Click Save
STEP THREE: Enable Early Delivery in the configuration set
- In your GitHub Connector project in Smartling, go to Settings > GitHub Settings
- On the configuration set you want to enable Early Delivery, click Early Delivery
- Select the Early Delivery checkbox and choose a naming option for the branch where the Final Delivery.
- The default option will use branch names selected by Smartling. Custom will allow you to build a pattern for the branch used to deliver translations. Available name tokens include: {source_branch_name}, {source_pull_request_number}, {commit}, {translation_job_id}
Viewing Early Delivery Translations in GitHub
The prepublished translations are delivered, according to the workflow step settings (on save or on submit), in an Early Delivery pull request, as shown:
Once the Job is completed, the published translations are delivered in a final delivery pull request, as shown: