lilypond-user
[Top][All Lists]
Advanced

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

Re: Translation handling of `ly:expect-warning`


From: Saul Tobin
Subject: Re: Translation handling of `ly:expect-warning`
Date: Sat, 17 Aug 2024 15:31:21 -0400

Try with G_ instead of _.

This change happened a while ago (https://gitlab.com/lilypond/lilypond/-/commit/a9fef9dee1399c24505d2f74623c9d15bb306ff7) but old code continued working with _ until a recent version. I'm not sure exactly why.

In any case, seems like this still needs to be updated in the documentation.

Saul

On Sat, Aug 17, 2024 at 2:14 PM Huanyu Liu <1293660441@qq.com> wrote:
Hi folks,

I'm trying to reproduce a score with cross-staff beams in LilyPond, using

  \change Staff = "blahblah"

The result looks fine, but a warning is spat out by LilyPond (in Chinese):

  没有可用的起始构型:可能找不到合适的符尾倾角

Or, in English:

  no viable initial configuration found: may not find good beam slope

I learned from other threads that this warning is generally harmless, and can
be suppressed by something like

  #(ly:expect-warning "no viable initial configuration found")

However, this only works when the language environment variable is set to
English (`LANGUAGE=en_US`). In a Chinese environment, I have to use something
like

  #(ly:expect-warning "没有可用的起始构型")

Well, things start to become inelegant. What if a user using another language
wants to compile the document?

The documentation of `ly:expect-warning` says I should use `(_ ...)` to
translate the message, but I can't get it to work:

  Unbound variable: _

I'm using LilyPond 2.25.7 (development version, but not the latest, for
compatibility reasons). What should I do?

See the attachment for a (not really minimal) working example that will
trigger the warning. I have tried to make it more minimal, but any further
simplification will eliminate the warning. Sorry for the inconvenience.

Huanyu

reply via email to

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