bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: x-scheme fails to parse multiline strings


From: Bruno Haible
Subject: Re: x-scheme fails to parse multiline strings
Date: Fri, 21 Apr 2006 15:02:32 +0200
User-agent: KMail/1.5

Tim Janik wrote:
> here's another one:
>
> (bse-script-register 'part-harmonic-transposer
>                       ""
>                       (N_ "/Part/Harmonic Transposer")
>                       ;; FIXME: the description may be suboptimal; the 
> problem is
>                       ;; that I can't precisely describe details of musical 
> theory
>                       ;; in english. -- stw
>                       (N_ "The harmonic transposer takes the selection of a 
> part "
>                           "and transposes it to different harmonies. If you 
> for "
>                           "instance have selected a measure filled with C 
> major "
>                           "chords, and enter \"C,Am,F,G\" as harmonic 
> sequence, "
>                           "the result will be four measures, filled with C 
> major, "
>                           "A minor, F major and G major chords. "
>                           "\n\n"
>                           "This also works for melodies, so you can transpose 
> a "
>                           "whole melody written in G major to D minor. The 
> standard "
>                           "scales used in church music (ionian, dorian, 
> phrygian, "
>                           "lydian, mixolydian, aeolian, locrian) are also 
> supported: "
>                           "it is for instance possible to write Ddorian or 
> Caeolian. "
>                           "The aeolian scale is equivalent to minor and the 
> ionian "
>                           "scale is equivalent to major. "
>                           "\n\n"
>                           "Since musically, there is no preference on whether 
> to transpose up or "
>                           "down it is possible to specify the first harmony 
> that will be transposed "
>                           "down (all harmonies below this will be transposed 
> up). It is possible "
>                           "to omit this value. Then all notes will be 
> transposed up.")
>                       "Stefan Westerfeld"
>                       "GNU General Public License"
>                       (bse-param-part   (N_ "Part"))
>                       (bse-param-string (N_ "Harmony Sequence") "C,Amin,F,G")
>                       (bse-param-string (N_ "Transpose down starting at") 
> "F"))

Two remarks on this one:

- It is welcome to split the strings at paragraph boundaries, i.e. let the
  translator translate three paragraphs rather than one large block. The
  reason is that when small changes occur to the English strings, it helps
  the translator to see which paragraph has changed. This is harder to see
  when the entire string has 18 lines.

- The absence of newlines in these strings indicates that some formatting
  occurs to them during the rendering/display process. This is a good thing,
  because it usually means that there is word-wrapping that adapts to the
  available width. You can change this rendering so that newlines are
  treated in same way as spaces, like in HTML, and then you can write it
  with real multi-line strings:

(bse-script-register 'part-harmonic-transposer
                      ""
                      (N_ "/Part/Harmonic Transposer")
                      ;; FIXME: the description may be suboptimal; the problem 
is
                      ;; that I can't precisely describe details of musical 
theory
                      ;; in english. -- stw
                      (list
                        (N_ "
The harmonic transposer takes the selection of a part
and transposes it to different harmonies. If you for
instance have selected a measure filled with C major
chords, and enter \"C,Am,F,G\" as harmonic sequence,
the result will be four measures, filled with C major,
A minor, F major and G major chords.
")
                        (N_ "
This also works for melodies, so you can transpose a
whole melody written in G major to D minor. The standard
scales used in church music (ionian, dorian, phrygian,
lydian, mixolydian, aeolian, locrian) are also supported:
it is for instance possible to write Ddorian or Caeolian.
The aeolian scale is equivalent to minor and the ionian
scale is equivalent to major.
")
                        (N_ "
Since musically, there is no preference on whether to transpose up or
down it is possible to specify the first harmony that will be transposed
down (all harmonies below this will be transposed up). It is possible
to omit this value. Then all notes will be transposed up.
"))
                      "Stefan Westerfeld"
                      "GNU General Public License"
                      (bse-param-part   (N_ "Part"))
                      (bse-param-string (N_ "Harmony Sequence") "C,Amin,F,G")
                      (bse-param-string (N_ "Transpose down starting at") "F"))

Another option is to move such long explanations to HTML files and use the
extraction/merge scripts for HTML that KDE uses (similar to xgettext in
spirit, just for HTML).

> don't you agree that supporting multi arg strings (as we do in C as well)
> is the better option here?

Not necessarily: With the automatic string concatenation,
  - You (the programmer) have to put double-quotes on each line,
  - The translator wouldn't know whether he should insert newlines or not.

Bruno





reply via email to

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