From 9b830cd55f7f41fd5df63786aae08a19da8a75af Mon Sep 17 00:00:00 2001 From: hefee <me@hefee.de> Date: Thu, 22 Mar 2018 16:55:21 +0100 Subject: [PATCH] more README :D --- README | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/README b/README index 4ac7824..483d080 100644 --- a/README +++ b/README @@ -1,2 +1,56 @@ +### Installing + +* copy mergetool to a locaton `<pathto>` +* Add this to your .git/config or ~/.gitconfig: + + [merge "po-merge"] + name = Gettext merge driver + driver = <patho> %O %A %B + +Add this to .gitattributes in some dir: + + *.po merge=po-merge + *.pot merge=po-merge + +### Testing + +run: ipython3 -i runtests.py + + In [18]: runTest("translated-remote") + Using custom PO merge driver (local; /tmp/merge-po.JIyZ) + 0 + 0 + + In [19]: runTest("translated-local-and-remote") + Using custom PO merge driver (local; /tmp/merge-po.lZsH) + 0 + 0 + + + In [22]: runTest("confict") + Using custom PO merge driver (local; /tmp/merge-po.7FoH) + Conflict(s) detected + between /tmp/merge-po.7FoH.local and /tmp/merge-po.7FoH.remote + 1 + --- /tmp/tmp5cbetvbs/local 2018-03-22 16:40:55.000000000 +0100 + +++ tests/confict/merged 2018-03-22 16:40:51.954196950 +0100 + @@ -27,9 +27,9 @@ + "> **amnesia**, *noun*:<br/>\n" + "> forgetfulness; loss of long-term memory.\n" + msgstr "" + -"#-#-#-#-# merge-po.7FoH.local-only (Tails) #-#-#-#-#\n" + +"#-#-#-#-# merge-po.PE9w.local-only (Tails) #-#-#-#-#\n" + "> Je ne sais pas \n" + -"#-#-#-#-# merge-po.7FoH.remote-only (Tails) #-#-#-#-#\n" + +"#-#-#-#-# merge-po.PE9w.remote-only (Tails) #-#-#-#-#\n" + "Un deuxième traduction." + + #. type: Plain text + 1 + +### Documentation + +I didn't have written the different po merge tools. I found them at the internet :D + https://stackoverflow.com/questions/16214067/wheres-the-3-way-git-merge-driver-for-po-gettext-files https://github.com/mezis/git-whistles/blob/master/libexec/git-merge-po.sh -- GitLab