Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:25

Possibly related (same subject, not in this thread)

Æ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.
Or: git://github.com/avar/git.git gettextize-git-mainporcelain-v3
Looks good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help