You can modify much of the default behavior of the GitHub Connector with any combination of custom settings within each configuration set, such as:
- Locale Management
- 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 (PR Mode) or commit (Single Branch Mode) 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
- Choose how commits are pushed back to 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.
Locale Management
By default, the GitHub Connector requests translations for all available locales in your project. You can customize this behavior and select specific languages for a particular configuration set using the Locale Management setting.
The Locale Management setting also allows you to map custom locale codes to target languages. The locale code is appended to the translated file path. If a custom locale value is not specified, the Smartling default value is used.
To modify the default behavior, click the Locale Management setting.
Next, select the checkbox next to Enable custom locale management, then choose the desired locales from the dropdown menu. Click Next to proceed.
Here, you can specify any custom locale codes you wish to use. If you prefer to use the default Smartling locale code, leave the Custom {locale} Value field empty. Click Save when finished.
The Locale Management status (Default or Custom) indicates whether the configuration set creates translation jobs for all available locales (Default) or a specific group of locales (Custom). It does not indicate whether custom locale codes have been mapped.
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
Decide whether you want Smartling to add all GitHub users who committed changes as reviewers in GitHub to the translation pull request (PR). This setting is only available for configuration sets using PR Mode or Single Branch Mode; it is not available for On-Demand Mode. The GitHub users do not need to be Smartling users.
For configuration sets using PR Mode, the connector tracks every GitHub user who commits to the PR that initially triggered a translation Job. When translations are delivered back to GitHub in a translation PR, all contributors to the original source PR are tagged as reviewers.
For configuration sets using Single Branch Mode, only the GitHub user who made the commit that triggered the translation Job is tagged as a reviewer of the translation PR.
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.
Commit Strategy
This setting allows you to control how commits are pushed back to GitHub in translation delivery pull requests. The available options include:
- Single Commit: Combines all translated files for all locales into one single commit.*
- Per Locale: Combines all translated files for each locale into one large commit.*
- Per File: Combines translations for each file across all locales into one large commit.*
-
Per File and Locale: Creates a separate commit for each file per translated locale.
* If the size of any commit is too large, it will be split into two or more parts.