lilypond-auto
[Top][All Lists]
Advanced

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

[Lilypond-auto] Issue 4337 in lilypond: Enhancement: automatically trans


From: lilypond
Subject: [Lilypond-auto] Issue 4337 in lilypond: Enhancement: automatically translate tagline
Date: Fri, 03 Apr 2015 11:29:04 +0000

Status: Accepted
Owner: ----
Labels: Type-Enhancement

New issue 4337 by address@hidden: Enhancement: automatically translate tagline
https://code.google.com/p/lilypond/issues/detail?id=4337

Simon Albrecht wrote :

please open a tracker issue for this thread. I’m going to make another essay at coding something sensible.

Yours,
Simon

Am 16.03.2015 um 12:13 schrieb Simon Albrecht:
Am 16.03.2015 um 10:22 schrieb David Kastrup:
Simon Albrecht <address@hidden> writes:

Thanks for elaborating, Harm. That’s some elegant coding with which I
couldn’t have come up :-)

Am 15.03.2015 um 19:22 schrieb Thomas Morley:

[snip]
\version "2.19.16"

%% Please note, \language has to be declared before 'used-language'
%% is done or included, (if stored elsewhere)
\language "deutsch"
%\language "english"
%% if no tagline for a language is defined, default-english will be
printed
%\language "catalan"

%% TODO: find better method to detect which language is actually used
#(define used-language
   (car
     (find
       (lambda (e) (eq? (cdr e) (ly:parser-lookup parser 'pitchnames)))
       language-pitch-names)))
I imagine that a generic solution worth being included in the code
base would require this definition to be made through the \language
command itself.
I don't think it is a tenable solution to equate notename language with
document language.

Definitely. Or would a survey be useful on the relationship of “input and output language” in current use? After all, I have no idea on how many users actually change the defaults for both (i.e. use \language and define their own tagline and tocHeaderMarkup &c.).
Alternative user syntax drafts:

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

document-languages =
#'((input-language . dutch)
  (output-language . english))
%% that would be the default
%% output-language might be used for other things also, e.g. table of contents.

% Scenario 1: (my favourite)
\language "deutsch"
% sets both values to 'deutsch
\language output "italiano"
% sets only output-language and leaves input-language as default
% two language commands would be used
% in order to have different non-default settings for both

% Scenario 2:
\inputLanguage "catalan"
\outputLanguage "english"
% perhaps with \language still setting both –
% or only input-language for backwards compatibility?
% Shouldn’t be too difficult for convert-ly though.

% mix both scenarios

\language "deutsch"
% sets only input-language for backward compatibility reasons
\language output "espanol"
% provide no command for setting both – may be easier understood then

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

On naming: perhaps input-language is too wide, because all the commands and identifiers are in English anyway. Then it would better be called notename-language.

I hope you agree that it’s worthwhile to make all these thoughts and that it would be good to have such functionality in an easy-to-use way.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

reply via email to

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