git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/7] update git-stage.po

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 15, 2011, 13:25 UTC
Message-ID
<BANLkTin3hVusWc-oubW5T-L=mCatubHiKA@mail.gmail.com>
In-Reply-To
<20110515130856.GB3178@elie>
On Sun, May 15, 2011 at 15:08, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Hi again,
>
> Ævar Arnfjörð Bjarmason wrote:
>
>> We went over this for the main gettext series. Not commiting the line
>> numbers is unworkable, because it means that users who check out
>> git.git can't run msgmerge, because it completely fails without line
>> numbers.
>
> Please feel free to ignore my other reply.  You were saying something
> helpful there, not just calling me out, and I completely misunderstood.

No problem. Sorry about the terseness. I don't have a lot of time for mailing list trawling these days.

Show 13 quoted lines
> I assume you were referring to this discussion:
>
>  http://thread.gmane.org/gmane.comp.version-control.git/147973/focus=148044
>
> I'm confused about the msgmerge comment above.  I'll have to try it.
> But anyway, of course I agree with the more important point that not
> providing line numbers would make life harder for humans.
>
>> Having a merge strategy to deal with them would be nice, but that can
>> be done by using the existing gitattributes config + msgmerge(1) to do
>> the work.
>
> I'm still curious about this part, of course.

Maybe I'm just adding confusion here. I mean that as far as I can tell we need to have the line numbers in the *.po files, I've been unable to not make merges go horribly wrong without them.

Whenever I did a merge from git.pot to LANG.po where LANG.po didn't have line numbers I ended up with issues like msgmerge confusing strings between program A and program B, which doesn't happen if the PO file has file:line comments.

But having them will result in merge conflicts using Git's default merge strategy, which can be mitigated by using msgmerge(1) to resolve the conflicts, since it knows to ignore the line numbers and to look at the actual content.

We should be able to have a merge driver defined for git.git to do that using the "Defining a custom merge driver" facility defined in gitattributes(5), but I haven't actually tried to make one. But it looks easy enough, I'll look at doing that when this becomes a problem I have to deal with, and I'm hoping someone beats me to it :)

Previous: Jonathan NiederNext: Jonathan Nieder
Message 18 of 22 in “Document translation with po4a.”
  1. 0/7 Document translation with po4a.Osamu OKANO, May 13, 2011
  2. 1/7 Add new target pot in MakefileOsamu OKANO, May 13, 2011
  3. 2/7 add make(shell) scriptsOsamu OKANO, May 13, 2011
  4. 3/7 cp git-stage.pot ja/git-stage.poOsamu OKANO, May 13, 2011
  5. 4/7 translate ja/git-stage.poOsamu OKANO, May 13, 2011
  6. 5/7 your fileOsamu OKANO, May 13, 2011
  7. Junio C HamanoMay 13, 2011
  8. Drew NorthupMay 13, 2011
  9. 6/7 update git-stage.poOsamu OKANO, May 13, 2011
  10. Junio C HamanoMay 13, 2011
  11. Osamu OKANOMay 14, 2011
  12. Jonathan NiederMay 14, 2011
  13. Junio C HamanoMay 15, 2011
  14. Jonathan NiederMay 15, 2011
  15. Ævar Arnfjörð BjarmasonMay 15, 2011
  16. Jonathan NiederMay 15, 2011
  17. Jonathan NiederMay 15, 2011
  18. Ævar Arnfjörð BjarmasonMay 15, 2011
  19. Jonathan NiederMay 15, 2011
  20. 7/7 translate and remove fazzyOsamu OKANO, May 13, 2011
  21. Junio C HamanoMay 13, 2011
  22. Ævar Arnfjörð BjarmasonMay 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.