Re: [PATCH/RFC 00/17] Begin gettextizing Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 31, 2010 at 19:22, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
>> Maybe, but it'll always be --output=po/git.pot so I saw no reason to
>> seperate it. Should it be?
>
> No big deal.  I am vaguely worried about interrupted "make"
> invocations.  Don't gettextized packages typically do something like this?
>
>        remove_creation_date() {
>                sed '#!/bin/sed -f
>                        /^"POT-Creation-Date: .*"$/!b
>                        x
>                        # Test if the hold space is empty.
>                        s/P/P/
>                        ta
>                        # Yes it was empty. First occurrence. Remove the line.
>                        g
>                        d
>                        bb
>                        :a
>                        # The hold space was nonempty. Following occurrences. Do nothing.
>                        x
>                        :b'
>        }
>        (cd po && xgettext --default-domain=git ...)
>        set -e; \
>        if test -f po/git.pot &&
>                remove_creation_date <po/git.pot >po/git.1po+ &&
>                remove_creation_date <po/git.po >po/git.2po+ &&
>                cmp po/git.1po+ po/git.2po+; \
>        then \
>                rm -f po/git.1po+ po/git.2po+ po/git.po; \
>        else \
>                rm -f po/git.1po+ po/git.2po+ po/git.pot; \
>                mv po/git.po po/git.pot; \
>        fi
>
>> The -o for the C compiler changes, but the
>> "make pot" target will always write to po/git.pot.
>
> In particular, to avoid using a partial .pot file, one might want to write to
> po/git.pot+, po/git.po, or similar and then rename it.

I don't know what they usually do. But that looks like a lot of work
to work around a very rare potential edge case. "make pot" is only
ever run manually by a translator right before msgmerge.

In the very rare case where make is interrupted and git.pot is left in
a partial state you'll notice because your msgmerge fails.

>> Or: git://github.com/avar/git.git gettextize-git-mainporcelain-v3
>
> Looks good.

Thanks for checking it out.
��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]