From e47e8dc419d5c9657a0ff357a3c32cd4d84a7fac Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 28 Jun 2012 10:12:25 +0200 Subject: [PATCH] Add some translation markers; normalize whitespace. --- lily/arpeggio.cc | 3 ++- lily/directional-element-interface.cc | 2 +- lily/dispatcher.cc | 4 ++-- lily/general-scheme.cc | 2 +- lily/global-context-scheme.cc | 2 +- lily/global-context.cc | 3 ++- lily/hairpin.cc | 2 +- lily/key-engraver.cc | 3 ++- lily/lyric-combine-music-iterator.cc | 2 +- lily/lyric-engraver.cc | 3 ++- lily/midi-item.cc | 2 +- lily/multi-measure-rest.cc | 5 +++-- lily/page-layout-problem.cc | 2 +- lily/piano-pedal-align-engraver.cc | 2 +- lily/pitch-scheme.cc | 6 +++--- lily/scale.cc | 4 ++-- lily/semi-tie.cc | 2 +- lily/slur-configuration.cc | 2 +- lily/slur.cc | 2 +- lily/spacing-determine-loose-columns.cc | 2 +- lily/spacing-loose-columns.cc | 3 ++- lily/spanner.cc | 5 +++-- lily/stencil-scheme.cc | 2 +- lily/text-interface.cc | 2 +- lily/tie.cc | 2 +- lily/translator-group-ctors.cc | 2 +- lily/unpure-pure-container.cc | 2 +- lily/vaticana-ligature-engraver.cc | 14 +++++++------- lily/warn-scheme.cc | 2 +- 29 files changed, 48 insertions(+), 41 deletions(-) diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 2f9135e034..96b6bbd3d5 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -22,6 +22,7 @@ #include "bezier.hh" #include "font-interface.hh" #include "grob.hh" +#include "international.hh" #include "lookup.hh" #include "output-def.hh" #include "pointer-group-interface.hh" @@ -111,7 +112,7 @@ Arpeggio::print (SCM smob) } else { - me->warning ("no heads for arpeggio found?"); + me->warning (_ ("no heads for arpeggio found?")); me->suicide (); return SCM_EOL; } diff --git a/lily/directional-element-interface.cc b/lily/directional-element-interface.cc index 25a05c648d..cd8d2c4d98 100644 --- a/lily/directional-element-interface.cc +++ b/lily/directional-element-interface.cc @@ -28,7 +28,7 @@ get_grob_direction (Grob *me) if (d == ly_symbol2scm ("calculation-in-progress")) { programming_error ("Grob direction requested while calculation in" - " progress. "); + " progress."); return UP; } if (!is_direction (d)) diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index c2e777a131..8e6350f294 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -259,7 +259,7 @@ Dispatcher::remove_listener (Listener l, SCM ev_class) scm_hashq_set_x (listeners_, ev_class, list); if (first) - warning ("Attempting to remove nonexisting listener."); + warning (_ ("Attempting to remove nonexisting listener.")); else if (!scm_is_pair (list)) { /* Unregister with all dispatchers. */ @@ -281,7 +281,7 @@ Dispatcher::register_as_listener (Dispatcher *disp) // Don't register twice to the same dispatcher. if (scm_assq (disp->self_scm (), dispatchers_) != SCM_BOOL_F) { - warning ("Already listening to dispatcher, ignoring request"); + warning (_ ("Already listening to dispatcher, ignoring request")); return; } diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index b950776689..f2b3ff1ae5 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -466,7 +466,7 @@ format_single_argument (SCM arg, int precision, bool escape = false) if (isnan (val) || isinf (val)) { - warning (_ ("Found infinity or nan in output. Substituting 0.0")); + warning (_ ("Found infinity or nan in output. Substituting 0.0")); return ("0.0"); if (strict_infinity_checking) abort (); diff --git a/lily/global-context-scheme.cc b/lily/global-context-scheme.cc index edd4c8cdbc..1267793cf3 100644 --- a/lily/global-context-scheme.cc +++ b/lily/global-context-scheme.cc @@ -101,7 +101,7 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression", Cpu_timer timer; - message (_ ("Interpreting music... ")); + message (_ ("Interpreting music...")); SCM protected_iter = Music_iterator::get_static_get_iterator (music); Music_iterator *iter = unsmob_iterator (protected_iter); diff --git a/lily/global-context.cc b/lily/global-context.cc index 3384133f35..431ffe4de3 100644 --- a/lily/global-context.cc +++ b/lily/global-context.cc @@ -154,7 +154,8 @@ Global_context::run_iterator_on_me (Music_iterator *iter) if (w == prev_mom_) { - programming_error ("Moment is not increasing. Aborting interpretation."); + programming_error ("Moment is not increasing." + " Aborting interpretation."); break; } diff --git a/lily/hairpin.cc b/lily/hairpin.cc index adaa201593..3933bd8a3b 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -58,7 +58,7 @@ Hairpin::broken_bound_padding (SCM smob) Item *r_bound = me->get_bound (RIGHT); if (r_bound->break_status_dir () != -1) { - me->warning ("Asking for broken bound padding at a non-broken bound."); + me->warning (_ ("Asking for broken bound padding at a non-broken bound.")); return scm_from_double (0.0); } diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index fd60570821..6f1d9a374e 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -21,6 +21,7 @@ #include "clef.hh" #include "context.hh" #include "engraver.hh" +#include "international.hh" #include "item.hh" #include "pitch.hh" #include "protected-scm.hh" @@ -195,7 +196,7 @@ Key_engraver::read_event (Stream_event const *r) } if (warn) - r->origin ()->warning ("Incomplete keyAlterationOrder for key signature"); + r->origin ()->warning (_ ("Incomplete keyAlterationOrder for key signature")); } context ()->set_property ("keySignature", scm_reverse_x (accs, SCM_EOL)); diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 061148d976..48c8af205e 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -196,7 +196,7 @@ Lyric_combine_music_iterator::construct_children () if (!lyrics_context_) { - m->origin ()->warning ("argument of \\lyricsto should contain Lyrics context"); + m->origin ()->warning (_ ("argument of \\lyricsto should contain Lyrics context")); } lyricsto_voice_name_ = get_music ()->get_property ("associated-context"); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index f6356330f8..e4b23d1f94 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -183,7 +183,8 @@ Lyric_engraver::stop_translation_timestep () } else { - text_->warning (_ ("Lyric syllable does not have note. Use \\lyricsto or associatedVoice.")); + text_->warning (_ ("Lyric syllable does not have note." + " Use \\lyricsto or associatedVoice.")); text_->set_property ("X-offset", scm_from_int (0)); } } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index fb7df24375..0d0edbb4c7 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -158,7 +158,7 @@ Midi_time_signature::to_string () const int num = abs (audio_->beats_); if (num > 255) { - warning ("Time signature with more than 255 beats. Truncating"); + warning (_ ("Time signature with more than 255 beats. Truncating")); num = 255; } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index c0f26f5c85..47718a2fec 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -135,7 +135,8 @@ calc_closest_duration_log (Grob *me, double duration, bool force_round_up, bool && (to_boolean (scm_null_p (duration_logs_list)) || !to_boolean (scm_list_p (duration_logs_list)))) { - warning (_ ("usable-duration-logs must be a non-empty list. Falling back to whole rests.")); + warning (_ ("usable-duration-logs must be a non-empty list." + " Falling back to whole rests.")); closest_usable_duration_log = 0; } else @@ -324,7 +325,7 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length) if (!spacing) spacing = unsmob_grob (ri->get_object ("spacing")); if (!spacing) - me->warning ("Using naive multi measure rest spacing."); + me->warning (_ ("Using naive multi measure rest spacing.")); else { Spacing_options options; diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 7120c6c680..dd9b6da71c 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -400,7 +400,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst foot_stencil = add_footnotes_to_footer (footnotes, foot_stencil, pb); } else - warning ("A page layout problem has been initiated that cannot accommodate footnotes."); + warning (_ ("A page layout problem has been initiated that cannot accommodate footnotes.")); header_height_ = head ? head->extent (Y_AXIS).length () : 0; footer_height_ = foot_stencil.extent (Y_AXIS).length (); diff --git a/lily/piano-pedal-align-engraver.cc b/lily/piano-pedal-align-engraver.cc index 302a39bd3c..3111592599 100644 --- a/lily/piano-pedal-align-engraver.cc +++ b/lily/piano-pedal-align-engraver.cc @@ -165,7 +165,7 @@ Piano_pedal_align_engraver::get_grob_pedal_type (Grob_info g) if (g.event_cause ()->in_event_class ("una-corda-event")) return UNA_CORDA; - programming_error ("Unknown piano pedal type. Defaulting to sustain"); + programming_error ("Unknown piano pedal type. Defaulting to sustain"); return SUSTAIN; } diff --git a/lily/pitch-scheme.cc b/lily/pitch-scheme.cc index a1f58ae63b..f4231f0685 100644 --- a/lily/pitch-scheme.cc +++ b/lily/pitch-scheme.cc @@ -35,10 +35,10 @@ LY_DEFINE (ly_pitch_transpose, "ly:pitch-transpose", LY_DEFINE (ly_make_pitch, "ly:make-pitch", 2, 1, 0, (SCM octave, SCM note, SCM alter), "@var{octave} is specified by an integer, zero for the octave" - " containing middle@tie{}C. @var{note} is a number indexing the" + " containing middle@tie{}C. @var{note} is a number indexing the" " global default scale, with 0 corresponding to pitch@tie{}C" - " and 6 usually corresponding to pitch@tie{}B. " - " Optional @var{alter} is" + " and 6 usually corresponding to pitch@tie{}B." + " Optional @var{alter} is" " a rational number of 200-cent whole tones for alteration.") { diff --git a/lily/scale.cc b/lily/scale.cc index 516969f287..c4b3ccf2c5 100644 --- a/lily/scale.cc +++ b/lily/scale.cc @@ -75,9 +75,9 @@ Scale *default_global_scale = 0; LY_DEFINE (ly_set_default_scale, "ly:set-default-scale", 1, 0, 0, (SCM scale), - "Set the global default scale. This determines the tuning of" + "Set the global default scale. This determines the tuning of" " pitches with no accidentals or key signatures. The first" - " pitch is C. Alterations are calculated relative to this" + " pitch is C. Alterations are calculated relative to this" " scale. The number of pitches in this scale determines the" " number of scale steps that make up an octave. Usually the" " 7-note major scale.") diff --git a/lily/semi-tie.cc b/lily/semi-tie.cc index 75f2f4f8ed..02b7f29415 100644 --- a/lily/semi-tie.cc +++ b/lily/semi-tie.cc @@ -51,7 +51,7 @@ Semi_tie::calc_control_points (SCM smob) } else { - programming_error ("lv tie without Semi_tie_column. Killing lv tie."); + programming_error ("lv tie without Semi_tie_column. Killing lv tie."); me->suicide (); } diff --git a/lily/slur-configuration.cc b/lily/slur-configuration.cc index 6095cdf35b..b144b2656f 100644 --- a/lily/slur-configuration.cc +++ b/lily/slur-configuration.cc @@ -191,7 +191,7 @@ Slur_configuration::add_score (Real s, string desc) { if (s < 0) { - programming_error ("Negative demerits found for slur. Ignoring"); + programming_error ("Negative demerits found for slur. Ignoring"); s = 0.0; } diff --git a/lily/slur.cc b/lily/slur.cc index 7e2cb1d1b0..6d0d84203e 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -427,7 +427,7 @@ Slur::auxiliary_acknowledge_extra_object (Grob_info const &info, } } else if (avoid != ly_symbol2scm ("ignore")) - e->warning (_f ("Ignoring grob for slur: %s. avoid-slur not set?", + e->warning (_f ("Ignoring grob for slur: %s. avoid-slur not set?", e->name ().c_str ())); } diff --git a/lily/spacing-determine-loose-columns.cc b/lily/spacing-determine-loose-columns.cc index 785f01039c..2deae13b27 100644 --- a/lily/spacing-determine-loose-columns.cc +++ b/lily/spacing-determine-loose-columns.cc @@ -228,7 +228,7 @@ Spacing_spanner::prune_loose_columns (Grob *me, */ if (!right_neighbor || !left_neighbor) { - c->programming_error ("Cannot determine neighbors for floating column. "); + c->programming_error ("Cannot determine neighbors for floating column."); c->set_object ("between-cols", scm_cons (cols->at (i - 1)->self_scm (), cols->at (i + 1)->self_scm ())); } diff --git a/lily/spacing-loose-columns.cc b/lily/spacing-loose-columns.cc index 861b540e5f..bf8e13593a 100644 --- a/lily/spacing-loose-columns.cc +++ b/lily/spacing-loose-columns.cc @@ -83,7 +83,8 @@ set_loose_columns (System *which, Column_x_positions const *posns) if (!right) { - programming_error ("Can't attach loose column sensibly. Attaching to end of system."); + programming_error ("Can't attach loose column sensibly." + " Attaching to end of system."); right = which->get_bound (RIGHT); } diff --git a/lily/spanner.cc b/lily/spanner.cc index ae0094fc4b..eeff11bba7 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -101,7 +101,7 @@ Spanner::do_break_processing () if (!bounds[LEFT] || ! bounds[RIGHT]) { - programming_error ("bounds of this piece aren't breakable. "); + programming_error ("bounds of this piece aren't breakable."); continue; } @@ -110,7 +110,8 @@ Spanner::do_break_processing () if (!ok) { - programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner. Ignoring orphaned part", + programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner." + " Ignoring orphaned part", name ().c_str ())); continue; } diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index d73221ff89..7e346ca7f8 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -288,7 +288,7 @@ LY_DEFINE (ly_bracket, "ly:bracket", LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate", 4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y), "Return a stencil @var{stil} rotated @var{angle} degrees around" - " the relative offset (@var{x}, @var{y}). E.g. an offset of" + " the relative offset (@var{x}, @var{y}). E.g., an offset of" " (-1, 1) will rotate the stencil around the left upper corner.") { Stencil *s = unsmob_stencil (stil); diff --git a/lily/text-interface.cc b/lily/text-interface.cc index 940f42a075..cd906c2e8e 100644 --- a/lily/text-interface.cc +++ b/lily/text-interface.cc @@ -151,7 +151,7 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup) } else { - programming_error ("Object is not a markup. "); + programming_error ("Object is not a markup."); scm_puts ("This object should be a markup: ", scm_current_error_port ()); scm_display (markup, scm_current_error_port ()); scm_puts ("\n", scm_current_error_port ()); diff --git a/lily/tie.cc b/lily/tie.cc index aaac5fbbd4..23e8d4c7da 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -104,7 +104,7 @@ Tie::get_position (Grob *me) systems.. We should look at the first broken copy. */ - programming_error ("Tie without heads. Suicide"); + programming_error ("Tie without heads. Suicide"); me->suicide (); return 0; } diff --git a/lily/translator-group-ctors.cc b/lily/translator-group-ctors.cc index c21adb3856..bd349824d7 100644 --- a/lily/translator-group-ctors.cc +++ b/lily/translator-group-ctors.cc @@ -37,7 +37,7 @@ get_translator_group (SCM sym) else if (sym == ly_symbol2scm ("Score_performer")) return new Score_performer (); - error (_f ("fatal error. Couldn't find type: %s", + error (_f ("fatal error. Couldn't find type: %s", ly_symbol2string (sym).c_str ())); scm_flush (scm_current_error_port ()); scm_display (sym, scm_current_error_port ()); diff --git a/lily/unpure-pure-container.cc b/lily/unpure-pure-container.cc index 888cf24dae..2caba1216e 100644 --- a/lily/unpure-pure-container.cc +++ b/lily/unpure-pure-container.cc @@ -53,7 +53,7 @@ LY_DEFINE (ly_unpure_pure_container_p, "ly:unpure-pure-container?", LY_DEFINE (ly_make_unpure_pure_container, "ly:make-unpure-pure-container", 1, 1, 0, (SCM unpure, SCM pure), "Make an unpure-pure container. @var{unpure} should be an unpure" - " expression, and @var{pure} should be a pure expression. If @var{pure}" + " expression, and @var{pure} should be a pure expression. If @var{pure}" " is ommitted, the value of @var{unpure} will be used twice.") { SCM z; diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index ca90582d51..2e3148cc28 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -463,9 +463,9 @@ Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive) if (pitch == new_pitch) { primitive.grob ()-> - warning ("Ambiguous use of dots in ligature: there are" - " multiple dotted notes with the same pitch." - " The ligature should be split."); + warning (_ ("Ambiguous use of dots in ligature: there are" + " multiple dotted notes with the same pitch." + " The ligature should be split.")); return; // supress multiple identical warnings } } @@ -521,10 +521,10 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, } else if (augmented_primitives_.size () > 0) { - primitive->warning ("This ligature has a dotted head followed by" - " a non-dotted head. The ligature should be" - " split after the last dotted head before" - " this head."); + primitive->warning (_ ("This ligature has a dotted head followed by" + " a non-dotted head. The ligature should be" + " split after the last dotted head before" + " this head.")); } if (is_stacked_head (prefix_set, context_info)) diff --git a/lily/warn-scheme.cc b/lily/warn-scheme.cc index d3ba9d1840..c2449d164e 100644 --- a/lily/warn-scheme.cc +++ b/lily/warn-scheme.cc @@ -127,7 +127,7 @@ LY_DEFINE (ly_expect_warning, "ly:expect-warning", 1, 0, 1, (SCM str, SCM rest), "A Scheme callable function to register a warning to be expected" " and subsequently suppressed. If the warning is not encountered," - " a warning about the missing warning will be shown. The message" + " a warning about the missing warning will be shown. The message" " should be translated with @code{(_ ...)} and changing parameters" " given after the format string.") { -- 2.39.5