Re: [Tails-dev] language_statistics.sh script broken?

Üzenet törlése

Válasz az üzenetre
Szerző: Cyril Brulebois
Dátum:  
Címzett: The Tails public development discussion list
Tárgy: Re: [Tails-dev] language_statistics.sh script broken?
Hi Muri,

Muri Nicanor <muri@???> (2017-12-10):
> when trying to run the
> ./wiki/src/contribute/l10n_tricks/language_statistics.sh script to get
> the statistics for the monthly report, it fails with:
> > xgettext: error while opening "../tmp/pot/60-tor-ready.sh.pot" for
> > reading: No such file or directory
> > ERROR: xgettext failed to generate PO template file. Please consult
> >       error message above if there is any.

>
> this happens when i checkout --before="December 1" or --before="November
> 1", but apparently it worked for the last report- so does anyone have an
> idea? (i'm running buster, but i've also tried in a jessie chroot...)


This script seems to rely on ./refresh-translations, which used to leave
files under tmp/pot. Starting with the commit below, files are cleaned
up in every situation, including clean exit; this explains why attempts
with recent dates fail, while going back earlier in time makes this
succeed again.

| commit d199d512d5cf64782a159176cf99412d332d40ac
| Author: anonym <anonym@???>
| Date:   Thu Sep 7 18:58:48 2017 +0200
| 
|     Do some clean up.
|     
|     If the script fails at various points, these files would linger.


If you want to get a one-time report, commenting out this line seems
sufficient:
| trap "rm -fr tmp/pot po/*.new po/*.orig" EXIT


It might be worth supporting an option (or environment variable) in that
script to avoid cleaning tmp/pot when it's called with this extra
setting from the language_statistics.sh script?


Cheers,
--
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/