check_translation crashes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

check_translation crashes

Jean-Charles MALAHIEUDE
Hi all,

As I'm done with the French translations for 2.20, I'd like to now take
care of 2.21 but… my workflow is now broken and I'm not able to diagnose
what's wrong. The only change in the body of check_translation.py since
2009 has been introduced with issue 5646. A "python --version" gives 3.7.6.

Here is the output on the transalation-staging branch (reflecting
stable/2.20):

-*- mode: compilation; default-directory:
"~/GIT/Doc-Stable/Documentation/" -*-
Compilation started at Sat Mar  7 10:48:28

make ISOLANG=fr NO_COLOR=1 check-translation > ../../chktrans
langdefs.py: warning: lilypond-doc gettext domain not found.

Compilation finished at Sat Mar  7 10:48:30


And on translation (reflecting master):

-*- mode: compilation; default-directory: "~/GIT/Traduc/Documentation" -*-
Compilation started at Sat Mar  7 10:14:19

make ISOLANG=fr NO_COLOR=1 check-translation > ../../chktrans
Traceback (most recent call last):
   File
"/home/jcharles/GIT/Traduc/scripts/auxiliar/check_translation.py", line
168, in <module>
     main ()
   File
"/home/jcharles/GIT/Traduc/scripts/auxiliar/check_translation.py", line
165, in main
     do_file (i, list(langdefs.LANGDICT.keys ()))
   File
"/home/jcharles/GIT/Traduc/scripts/auxiliar/check_translation.py", line
96, in do_file
     sys.stdout.write (diff_string)
TypeError: write() argument must be str, not bytes
make: *** [GNUmakefile:393: check-translation] Error 1

Compilation exited abnormally with code 2 at Sat Mar  7 10:14:19

Any help in resolving this will be really mostly appreciated.

Cheers,
--
Jean-Charles


Reply | Threaded
Open this post in threaded view
|

Re: check_translation crashes

Jean-Charles MALAHIEUDE
Le 08/03/2020 à 18:16, Jonas Hahnfeld a écrit :

> Am Samstag, den 07.03.2020, 11:27 +0100 schrieb Jean-Charles
> Malahieude:
>> Hi all,
>>
>> As I'm done with the French translations for 2.20, I'd like to now take
>> care of 2.21 but… my workflow is now broken and I'm not able to diagnose
>> what's wrong. The only change in the body of check_translation.py since
>> 2009 has been introduced with issue 5646. A "python --version" gives 3.7.6.
>
> Yes, that's fallout from the switch to Python 3 😞 please apply the one
> -liner from https://sourceforge.net/p/testlilyissues/issues/5838/. If
> that also works on your system, I'll likely super-fast-track this.
>

YES! works like a charm! 187 Ko like the one Franciso sent me privately
yesterday night.

It might be useful in other places as well, I don't know.

Thanks,
--
Jean-Charles