You can modify much of the default behavior of the GitHub Connector with any combination of custom settings within each configuration set, such as:
- Custom locale codes for translated files
- Automatically authorizing translation Jobs in Smartling once content has been pulled in because of a pull request or commit
- Choose to leave strings empty or insert the original source string in translated files when a translation is not available
- Create a new Job for the file, or use an existing Job when there is one still in progress for the same file
- Get Translations Before Job Completion with Early Delivery
- Add the developers who worked on the original pull request as reviewers to the translation pull request in GitHub
- Only monitor published pull requests and ignore draft pull requests
- Only send content for translation in Smartling once the translation hold label has been removed in GitHub
A configuration set must be first disabled to apply any of the custom settings below. For more information, read our documentation on Modifying a Configuration Set.
Custom Locale Code
This setting allows you to map custom locale codes to target languages. The locale code is appended to the translated file path. If a custom locale is not specified, the Smartling default value is used.
Auto Authorize
Once the connector is configured, you can enable ‘Auto-Authorize’ to automatically authorize all Jobs created by the Connector, and start the translation process in the language's default workflow
If this is not enabled, users must authorize Jobs from the Jobs Dashboard.
Tip: Consult your Solution Architect for assistance in deciding whether this option should be enabled for you.
Include original strings into translated file
This setting controls empty string behavior in a translated file. Decide if Smartling should return the original source string (on) or an empty string where no translation is available in the translated file (off). This setting is only supported for Android XML, gettext, Java properties, custom XML, and JSON files.
Job Options
Choose to always create a new Job for each pull request or commit containing files matching the path in the configuration (recommended).
Alternatively, choose to add the content to an existing Job (the existing Job is the Job the original PR triggered). If you choose this option, the connector looks for the last translation job it created for this particular configuration set (single branch mode) or pull request (pull request mode). If the status of this Job is "in progress", then the connector adds new files/strings from the commit to that Job. However, if the job status is "cancelled", "complete", or "deleted", the connector creates a new Job for the files. If you are pushing content at a high frequency, this option is not recommended as source content could be overwritten.
We recommend creating a new Job for each file, as this ensures the content that is translated in that file is the content that was committed. The downside to this is that multiple pull requests must remain open until the Job is completed (PR mode only), and the translated files are delivered. The upside to this is it won't delay translation delivery, as new content isn't continuously added to the Job.
Early Delivery
If your development process requires any translation to move forward, you can get prepublished translations delivered early by enabling Early Delivery. Prepublished translations are delivered in an early delivery pull request, which unblocks the original pull request, allowing you to merge both source and translations to the feature branch before the translation Job is complete. For more information, read our documentation on how to Get Translations Before Job Completion with Early Delivery.
Request translation pull request reviewers (PR mode only)
Decide if you want Smartling to add all developers who worked on the pull request (committers) as reviewers in GitHub to the translation pull request. The connector remembers the GitHub user who created the particular feature PR and sets them as reviewer for PRs with translations in GitHub. The GitHub users do not have to be Smartling users.
Ignore draft pull requests (PR Mode only)
You can configure the GitHub Connector on PR mode to watch only PR, and ignore content in draft PRs.
Translation Hold (PR Mode only)
When enabled, the GitHub Connector automatically applies a "hold" label to your GitHub pull requests. This instructs the connector to put a hold on the creation of Smartling translation jobs until the label is manually removed in GitHub. When a pull request is ready to be translated, removing the label manually in GitHub will trigger the creation of translation jobs.
The Translation Hold feature in the GitHub Connector is designed for development processes that use placeholder copy in pull requests, to prevent premature translations of the placeholder copy.
By using the Translation Hold feature, you can ensure that translations are triggered only when the placeholder copy has been replaced with the final copy in the pull request. This helps to streamline the translation process and ensure the accuracy of translations.