Skip to content

Conversation

Patryk26g
Copy link
Contributor

@Patryk26g Patryk26g commented Aug 30, 2025

Brief Description of What This PR Does

Adds custom merge driver for merging .PO files with conflicts in the dates. Also adds instruction for the users to set it up. The only thing that user has to do is to add the lines to the local .git/config file:

[merge "po-smart"]
    name = Merge PO preferring newer dates in header
    driver = merge_drivers/merge-po-smart.sh %O %A %B

It seems that custom merge driver works only through command lines and does not in IDE's git GUI (at least they are ignored by Rider, I don't know about vscode).

I have tested it on my local branches and it was always resolving the confilctis automatically, choosing the newest date

Closes #4072

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@@ -579,6 +579,24 @@ is available through Homebrew.
`msgmerge` is part of the gettext tools. So any errors with that
missing are about these gettext tools.

When you add new translation strings to the game, you need to run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is duplicating slightly too much information from working_with_translations.md. So I think this explanation here should be shortened a bit to be just a tl;dr; from that other file. And the primary information should be put into that file so that all translations info is contained in one place. Though I do think that mentioning how to install the merge driver would be good here as this setup instructions file does deal with git options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Create a custom merge driver for translation files that just accepts source file location changes
2 participants