Annoying 'langdefs.py' warning

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

Annoying 'langdefs.py' warning

Werner LEMBERG


Building lilypond you get a bunch of harmless but annoying

  langdefs.py: warning: lilypond-doc gettext domain not found.

and

  .../podir-targets.make:14: warning: ignoring old recipe for target 'po-update'

messages.  Is there a way to suppress them?


    Werner

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Valentin Villenave-3
On 4/16/20, Werner LEMBERG <[hidden email]> wrote:
> Building lilypond you get a bunch of harmless but annoying
>   langdefs.py: warning: lilypond-doc gettext domain not found.
> and
>   .../podir-targets.make:14: warning: ignoring old recipe for target
> 'po-update'
> messages.  Is there a way to suppress them?

Hi Werner,
I’ve been annoyed by these for quite some time as well. Is it worth
opening a tracker page?

V.

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jean-Charles Malahieude-2
Le 19/04/2020 à 16:17, Valentin Villenave a écrit :

> On 4/16/20, Werner LEMBERG <[hidden email]> wrote:
>> Building lilypond you get a bunch of harmless but annoying
>>    langdefs.py: warning: lilypond-doc gettext domain not found.
>> and
>>    .../podir-targets.make:14: warning: ignoring old recipe for target
>> 'po-update'
>> messages.  Is there a way to suppress them?
>
> Hi Werner,
> I’ve been annoyed by these for quite some time as well. Is it worth
> opening a tracker page?
>

I've tried to understand how it comes, but with no success.
I think John had a good reason for it back in 2008 when creating the
infrastructure for translated web and docs.

Cheers,
--
Jean-Charles

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jonas Hahnfeld
In reply to this post by Werner LEMBERG
Am Donnerstag, den 16.04.2020, 12:14 +0200 schrieb Werner LEMBERG:
> Building lilypond you get a bunch of harmless but annoying
>
>   langdefs.py: warning: lilypond-doc gettext domain not found.
>
> and
>
>   .../podir-targets.make:14: warning: ignoring old recipe for target 'po-update'
>
> messages.  Is there a way to suppress them?

Well, submitting fixes? IIRC langdefs.py complains that we set LANG=C
in the build process. Not really sure what the correct solution is,
could be as easy as removing the warning (don't scream at me if not...)

The warning regarding po-update comes from Documentation/po, right? As
Documentation/po/GNUmakefile is defining that rule itself, I don't
think it should have STEPMAKE_TEMPLATES=podir. If nobody objects, I can
probably prepare a patch (obvious caveat: take care of values used from
stepmake/stepmake/podir-vars.make).

Jonas

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Werner LEMBERG
In reply to this post by Valentin Villenave-3

>> [...]  Is there a way to suppress them?
>
> I’ve been annoyed by these for quite some time as well. Is it worth
> opening a tracker page?

For me, it's not *that* annoying :-)


    Werner
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Werner LEMBERG
In reply to this post by Jonas Hahnfeld

>> Is there a way to suppress them?
>
> Well, submitting fixes?

I looked into both issues some time ago, but couldn't find out a good
solution.  Thanks to your clean-ups I can imagine that it's now easier
to handle both problems.

> IIRC langdefs.py complains that we set LANG=C in the build
> process. Not really sure what the correct solution is, could be as
> easy as removing the warning (don't scream at me if not...)

:-)

> [...] If nobody objects, I can probably prepare a patch (obvious
> caveat: take care of values used from
> stepmake/stepmake/podir-vars.make).

Great, and thanks in advance!


    Werner

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Francisco Vila
In reply to this post by Jonas Hahnfeld
El 19/4/20 a las 17:12, Jonas Hahnfeld escribió:
> IIRC langdefs.py complains that we set LANG=C
> in the build process.

Contributor manual says in website-build:

%%%%%%%%%%%%%

create-weblinks-itexi.py creates a load of texi macros (of the order of
1000) similar to:

     (...)

It loads its languages from langdefs.py, and therefore outputs the
following unhelpful warning:

langdefs.py: warning: lilypond-doc gettext domain not found.

%%%%%%%%%%%%%

I understand 'therefore' as 'expectedly' here.

http://lilypond.org/doc/v2.19/Documentation/contributor/website-build

--
Francisco Vila, Ph.D. - Badajoz (Spain)
paconet.org , lilypond.es

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jonas Hahnfeld
Am Montag, den 20.04.2020, 19:10 +0200 schrieb Francisco Vila:

> El 19/4/20 a las 17:12, Jonas Hahnfeld escribió:
> > IIRC langdefs.py complains that we set LANG=C
> > in the build process.
>
> Contributor manual says in website-build:
>
> %%%%%%%%%%%%%
>
> create-weblinks-itexi.py creates a load of texi macros (of the order of
> 1000) similar to:
>
>      (...)
>
> It loads its languages from langdefs.py, and therefore outputs the
> following unhelpful warning:
>
> langdefs.py: warning: lilypond-doc gettext domain not found.
>
> %%%%%%%%%%%%%
>
> I understand 'therefore' as 'expectedly' here.
>
> http://lilypond.org/doc/v2.19/Documentation/contributor/website-build
Not necessarily: As far as I understand that page was produced while
trying to understand the current build system after it existed. Much of
the original content was already obsoleted by my and Han-Wen's cleanups
in the past. I tried to update a few pieces but probably not all. Over
time this will get worse, so maybe we should just consider deleting
that file altogether?

Jonas

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Werner LEMBERG
In reply to this post by Francisco Vila

> It loads its languages from langdefs.py, and therefore outputs the
> following unhelpful warning:
>
>   langdefs.py: warning: lilypond-doc gettext domain not found.
>
> I understand 'therefore' as 'expectedly' here.

Well, yes, but it's still annoying.  Since I don't see any reason to
have this warning – do you know any? – I vote for removal.


    Werner
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jonas Hahnfeld
In reply to this post by Werner LEMBERG
Am Sonntag, den 19.04.2020, 17:22 +0200 schrieb Werner LEMBERG:

> >> Is there a way to suppress them?
> >
> > Well, submitting fixes?
>
> I looked into both issues some time ago, but couldn't find out a good
> solution.  Thanks to your clean-ups I can imagine that it's now easier
> to handle both problems.
>
> > IIRC langdefs.py complains that we set LANG=C in the build
> > process. Not really sure what the correct solution is, could be as
> > easy as removing the warning (don't scream at me if not...)
>
> :-)
>
> > [...] If nobody objects, I can probably prepare a patch (obvious
> > caveat: take care of values used from
> > stepmake/stepmake/podir-vars.make).
>
> Great, and thanks in advance!
https://sourceforge.net/p/testlilyissues/issues/5932/
https://codereview.appspot.com/551830043

I hope I covered all existing use cases that should continue to be
live:
 - make po-update and po-replace work from top-level
 - make -C Documentation/po/ po-update does *something*

However I'm pretty sure that many translations in the latter are dead:
As far as I understand we don't translate the docs by putting the
strings in Documentation/po, but rather by copying the files and
translating them below Documentation/lang. Still, translations for the
footer in HTML pages appear to be used (like "Other languages:" and
"About automatic language selection"). Whoever is interested in
improving this situation is more than welcome!

Jonas

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Francisco Vila
El 24/4/20 a las 17:18, Jonas Hahnfeld escribió:
> However I'm pretty sure that many translations in the latter are dead:
> As far as I understand we don't translate the docs by putting the
> strings in Documentation/po, but rather by copying the files and
> translating them below Documentation/lang.

Documentation/po/'lang'.po used to work as a way to get comments in
verbatim code translated. In a certain point of time it stopped working.
This is what I'd like to see improved.

> Still, translations for the
> footer in HTML pages appear to be used (like "Other languages:" and
> "About automatic language selection"). Whoever is interested in
> improving this situation is more than welcome!

Any improvements here should not prevent anyone of seeing every page in
all other languages if he wants to, I think.

--
Francisco Vila, Ph.D. - Badajoz (Spain)
paconet.org , lilypond.es

Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jonas Hahnfeld
Am Samstag, den 25.04.2020, 21:53 +0200 schrieb Francisco Vila:
> El 24/4/20 a las 17:18, Jonas Hahnfeld escribió:
> > However I'm pretty sure that many translations in the latter are dead:
> > As far as I understand we don't translate the docs by putting the
> > strings in Documentation/po, but rather by copying the files and
> > translating them below Documentation/lang.
>
> Documentation/po/'lang'.po used to work as a way to get comments in
> verbatim code translated. In a certain point of time it stopped working.
> This is what I'd like to see improved.

My patch leaves all the infrastructure and existing translations in
place if somebody (not me) wants to make this work again. However
please keep in mind that translating snippets will render 'make doc'
even slower because it has to compile them for every language instead
of once.

> > Still, translations for the
> > footer in HTML pages appear to be used (like "Other languages:" and
> > "About automatic language selection"). Whoever is interested in
> > improving this situation is more than welcome!
>
> Any improvements here should not prevent anyone of seeing every page in
> all other languages if he wants to, I think.

Agreed, that should stay the way it is. Actually I wanted to express
that just deleting the files would break existing functionality that is
actually useful to have.

Jonas

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Annoying 'langdefs.py' warning

Jean-Charles Malahieude-2
Le 26/04/2020 à 09:46, Jonas Hahnfeld a écrit :

> Am Samstag, den 25.04.2020, 21:53 +0200 schrieb Francisco Vila:
>> El 24/4/20 a las 17:18, Jonas Hahnfeld escribió:
>>> However I'm pretty sure that many translations in the latter are dead:
>>> As far as I understand we don't translate the docs by putting the
>>> strings in Documentation/po, but rather by copying the files and
>>> translating them below Documentation/lang.
>>
>> Documentation/po/'lang'.po used to work as a way to get comments in
>> verbatim code translated. In a certain point of time it stopped working.
>> This is what I'd like to see improved.
>
> My patch leaves all the infrastructure and existing translations in
> place if somebody (not me) wants to make this work again. However
> please keep in mind that translating snippets will render 'make doc'
> even slower because it has to compile them for every language instead
> of once.
>

Thanks for letting the infra in place.

If you read AU 3.3, you'll see:
"If you would like to translate comments and variable names in verbatim
output but not in the sources, you may set the environment variable
LYDOC_LOCALEDIR to a directory path; the directory should contain a tree
of ‘.mo’ message catalogs with lilypond-doc as a domain."

So to say, the snippet is not generated multiple times. Only the
verbatim part gets rendered in the language specified in the header of
the .*texi/.*tely file. And it worked smoothly until some day during the
year 2010 (I've got an OK 2.13.1 tarball of the docs dated 2009/05/01, a
KO 2.13.45 from 2011/01/03 and the 2.12.3 (2010/01/13) on the download
site is OK).


>>> Still, translations for the
>>> footer in HTML pages appear to be used (like "Other languages:" and
>>> "About automatic language selection"). Whoever is interested in
>>> improving this situation is more than welcome!
>>
>> Any improvements here should not prevent anyone of seeing every page in
>> all other languages if he wants to, I think.
>
> Agreed, that should stay the way it is. Actually I wanted to express
> that just deleting the files would break existing functionality that is
> actually useful to have.
>

What makes me wonder is that "texidoc" end "doctitle" are honored as
opposed to the "gettextification" (even when forcing a full path for
LYDOC_LOCALEDIR in my .bashrc end commenting out the line in
make/lilypond-vars.make). It might be a side effect from Reinhold's
patches from June 2010 that makes LYDOC_LOCALEDIR not honored.

I'll try to build a test case tomorrow.

Cheers,
--
Jean-Charles