Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. This integration enables you to connect the Smartcat Platform to a Git repository and leverage Smartcat's comprehensive functionality to translate XML resources of native Android apps.
1. Configuring the integration
To configure a Git for Android Apps integration, log in to Git and open the repository where the source XML files reside. Then log in to Smartcat and complete the following steps:
- Create a new integration project as described here.
- In the Integrations tab, click Connect in the Git for Android Apps integration tile.
- The integration configuration parameters are displayed.
- In your Git repository, copy the URL address without https://github.com.
- Return to the integration configuration properties. In the Repository URL field, type git@github.com: and paste the copied URL address.
- If your Android resource XML files reside in the master branch, skip this step. If they reside in a different branch, enter the branch name to the Branch field.
- Now you need to register the public SSH key generated by Smartcat on your Git server. Click Copy Value in the integration configuration properties, and then proceed as follows in your Git repository: click your avatar and choose Settings, select SSH and GPG keys, click New SSH key, enter a descriptive title, paste the copied SSH key into the Key field, and then click Add SSH key.
- Return to the integration configuration properties and click Create integration.
- The integration will automatically locate your Android resource files in XML format, which usually reside in the values folder.
- Click Create Integration to display the dialog where you are prompted to indicate the target languages and choose the desired translation workflow, Automatic or Human.
- Click Translate.
If you already have pre-existing translations in your Git repository, the integration will discover them and offer you to import them. - Review the translations by clicking the icon in the respective row and click Import to create a new translation project containing source documents from your Git repository. If pre-existing translations were imported, they will appear in the corresponding target segments.
2. Using the integration
After a document translation is completed, return to the integration settings, open the Settings tab, make sure that the option Push translations back is enabled and click Sync Now. The translated documents will be pushed to the Git repository where the source documents reside.
If a source file in Git is modified and committed, the integration will detect the change during the next sync and indicate the modified files as Source updated. After updating the translation, return to the Settings tab and click Sync now.
Use the option Publish incomplete documents to control whether to include incomplete translations in every sync or disregard them.
Instead of explicitly performing sync by clicking Sync Now, you can schedule a sync at the required intervals. To do this, click on Do not repeat and select the appropriate option from the drop-down menu.
The entire procedure of configuring the integration is shown in the video below: