Project

General

Profile

Feature #15364

Feature #10034: Translation web platform

Feature #15079: Integrate the platform with our Git and ikiwiki infrastructure

Create .gitattributes with merge strategy for po files

Added by u 3 months ago. Updated 6 days ago.

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
03/02/2018
Due date:
% Done:

0%

QA Check:
Feature Branch:
https://0xacab.org/Hefee/merge-po
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

gitattributes (shell)

implement a special merge strategy for po files (unify headers) → this file will propagate to all git clones and prevent merge conflicts upon po header modifications in two places at once. We've seen this happen too often, and we want to automate this so it does not happen.

To be done: define a bit more clearly what/how to unify the po headers.


Related issues

Related to Tails - Bug #15403: Unify po headers In Progress 03/13/2018

History

#1 Updated by hefee 2 months ago

addionally to #15403 there are more headers to unify before merge:

  • X-Generator: use from main git not from weblate
  • Plural-Forms
  • Report-Msgid-Bugs-To

msgmerge or msgcomm could help to do the "real" merge work.

#2 Updated by hefee 2 months ago

hefee wrote:

msgmerge or msgcomm could help to do the "real" merge work.

I tried so far a mergestrategy .git/config:

[merge "msgmerge"]
        name = msgmerge
        driver = msgmerge -w 79 --previous -o %A %B %A

and added to wiki/src/.gitattributes:

*po merge=msgmerge

the outcome of this is that we nice reformat the file to 79chars, but we loose any change from the other branch :(

#3 Updated by hefee 2 months ago

I created now a repository with tests, so we can simply have an environment for testing mergetools and have unittests to make sure, they do what we want them to do :D

https://0xacab.org/Hefee/merge-po

#4 Updated by u about 2 months ago

I implemented such a thing on the weblate platform using the merge-gettext-po driver from https://docs.weblate.org/en/latest/admin/continuous.html#updating-repositories Would this be useful wfor our gitattributes?

#5 Updated by u about 2 months ago

  • Related to Bug #15408: Consider forcing wrapping of po files at 79 chars per line added

#6 Updated by u about 2 months ago

u wrote:

I implemented such a thing on the weblate platform using the merge-gettext-po driver from https://docs.weblate.org/en/latest/admin/continuous.html#updating-repositories Would this be useful wfor our gitattributes?

-> talked with hefee about this and we would rather use his / the italian's merge driver, which we shall complete with more (check against pot files etc.).

#7 Updated by bertagaz 13 days ago

  • Target version changed from Tails_3.7 to Tails_3.8

#8 Updated by u 6 days ago

  • Feature Branch set to https://0xacab.org/Hefee/merge-po

#9 Updated by u 5 days ago

  • Related to deleted (Bug #15408: Consider forcing wrapping of po files at 79 chars per line)

#10 Updated by u 5 days ago

Also available in: Atom PDF