Leveraging merge conflicts in Translation MRs for managing target updates
## Context
Localized files (target files) in the marketing project (https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com) are sometimes edited by other GitLab teams for SEO optimization, pipeline fixes, or simply content improvement.
**Current Problem:** Our translation workflow doesn't automatically account for changes made directly to target files. When updated EN files are sent for translation, project managers must manually:
* Check if target files have been modified since the last translation
* Inspect changes and update translation memory accordingly to avoid overwritting such target file changes upon new translation request delivery
## Goal
Enable anyone at GitLab to edit target files while ensuring these changes are properly integrated into the translation process, preventing continuous localization workflow from overriding manual edits.
## Proposed Solution
Leverage [GitLab's merge conflict feature](https://docs.gitlab.com/user/project/merge_requests/conflicts/) within our existing workflow:
**Current Workflow:**
1. Argo integration detects source file changes
2. Creates translation requests automatically
3. Sends requests to TranslationOS and Matecat via Argo
4. Completed translations return through Argo
5. Translation MR is created automatically
6. Translation MR is reviewed sometimes by DEX engineers and sometimes by GitLab Localization team members.
**Enhanced Process:** Translation MRs should be monitored by Translated project managers and they should help resolve merge conflicts. When merge conflicts occur between the incoming translation and existing target files in main, project managers will:
1. Review target file history using git blame
2. Examine translation memory history
3. Determine which version should be retained
### Example Analysis
* Translation MR https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/merge_requests/942
* Merge conflict example: a string is slightly different in main (_theirs_) and in the translation MR branch (_ours_):
* Incoming translation in translation branch: `Tutorials, Produktinformationen, Expertenwissen und mehr von GitLab, dass DevSecOps-Teams sichere Software schneller erstellen, testen und bereitstellen können.`
* Current version in `main`: `Tutorials, Produktinfo, Expertenwissen und mehr von GitLab, damit DevSecOps-Teams sichere Software schneller entwickeln, testen und bereitstellen können.`
{width=1360 height=414}
#### Resolution steps
1. Verify the incoming translation is the latest from the TM and it's actually the one we want to merge
2. Use[ git blame](https://docs.gitlab.com/user/project/repository/files/git_blame/) to trace the origin of the main version to see where that translation was coming from
3. Investigate potential TM inconsistencies and/or TM updates if needed
4. Select the most appropriate version based on investigation by selecting "Use ours" or "Use theirs"
1. Caveat: Translated PMs permissions should be revisited
{width=1370 height=394}
It seems that the other DE version comes from another translation request so it'll be worth investigating if there's such inconsistency in the TM and, then choose one version.
issue