[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-users] Re: CVS hooks on Savannah
From: |
Yavor Doganov |
Subject: |
[Savannah-users] Re: CVS hooks on Savannah |
Date: |
Tue, 05 Oct 2010 11:12:01 +0300 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
[Dropping savannah-users via BCC; please don't followup there as the
topic is no longer relevant.]
Jan Owoc wrote:
> My specific problem is that translators use different translation
> programs (gtranslator, Poedit, Virtaal etc.) with each having
> different conventions for maximum line length in po files. This made
> tracing changes impossible - all lines appeared changed.
Ah, yes, this is a common problem.
> I found that running:
> msgfilter -i file.po -o file.po cat
Use msgcat for that; it's more efficient and safer.
> An alternative proposed by one team member is to have a computer
> check for commits (for example, once per hour) and run the above
> command on changed po files. We could then do a "cvs diff" on every
> second revision.
This is possible. GNUmakefile.team in gnun CVS trunk has a `format'
rule which does exactly that. So you could install a cronjob that
runs `make format' regularly and commits the result. The bad thing is
that the repository would be still cluttered with crappy revisions.
Here it is for convenience:
# Helper target to rewrap all PO files; avoids spurious diffs when
# they get remerged by the official build.
.PHONY: format
format:
@echo Formatting .po files with msgcat:
@for file in $(translations); do \
if [ `LC_ALL=C <$$file wc --max-line-length` -gt 80 ]; then \
$(MSGCAT) -o $$file $$file && echo " $${file#./}"; \
fi; \
done
> How do the other translation teams get around this?
The solution is simple: teach all translators to rewrap the .po files
before committing, along with the msgfmt check and the
--check-accelerators check (not relevant for gnu.org, of course).
There are lots of ways to do this -- M-x po-wrap in Emacs, manual
msgcat usage, `make format' if you use GNUmakefile.team (if you don't,
you should :-)), post-save hooks for editors that support them, etc.
> Does the entire team agree to use the same gettext editor?
That would be extremely drastic and could possibly lead to discomfort,
resulting in reduced productivity.