www-pl-discuss
[Top][All Lists]
Advanced

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

[www-pl-discuss] Fwd: CVS hooks on Savannah


From: Jan Owoc
Subject: [www-pl-discuss] Fwd: CVS hooks on Savannah
Date: Tue, 5 Oct 2010 10:28:47 +0200

Witam wszystkich o technicznym umyśle,


Dowiedziałem się, że cvs hooks odpadają, oraz co możemy zrobić zamiast
tego. Przekazuję dwie wiadomości (obie od Yavora). Co myślicie? Ja
mogę swoje commits ręcznie przepuszczać przez msgcat...

Niestety, żadne z sugerowanych rozwiązań nie ruszy w łatwy sposób na
Windowsie (trzeba np. mieć cygwin z gettext-utils).


Janek

---------- Forwarded message ----------
From: Yavor Doganov <address@hidden>
Date: Tue, Oct 5, 2010 at 7:44 AM
Subject: Re: CVS hooks on Savannah
To: Jan Owoc <address@hidden>


Jan Owoc wrote:
> I'm the team leader for the gnu.org Polish translation team, and we
> would like to implement cvs hooks on our Savannah CVS repository. Is
> this possible?

Not possible; see http://savannah.gnu.org/maintenance/AccessToCVSROOT.

> Specifically, we would like a bash script to run "msgfilter" on the
> translation files before they are committed.

Do you mean msgfmt?  Blindly applying msgfilter is a potentially
dangerous operation.  Can you describe why it is needed?



---------- Forwarded message ----------
From: Yavor Doganov <address@hidden>
Date: Tue, Oct 5, 2010 at 10:12 AM
Subject: Re: CVS hooks on Savannah
To: Discussion of translation coordination issues <address@hidden>


[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]