From 0fbea5f9ea669cd9202d32df8a8bdd6b18ef4c92 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 29 Oct 2018 13:43:13 -0400 Subject: [PATCH] Fix failure of Nyquist to translate some multiline strings... ... Don't trim leading whitespace from source file lines before passing them to eval. So when a string in Lisp code is (_ "like this") (the Lisp reader allows embedded newlines in quoted strings), then the string extracted to the .pot file by xgettext contains the spaces, and the string literal seen by our Lisp interpreter will also retain the spaces and match the msgid in the catalog exactly. --- src/effects/nyquist/Nyquist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 332b82b42..f09a42b3d 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -2129,7 +2129,7 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream) while (!stream.Eof() && stream.IsOk()) { bool dollar = false; - wxString line = pgm.ReadLine().Trim(false); + wxString line = pgm.ReadLine(); if (line.Length() > 1 && // New in 2.3.0: allow magic comment lines to start with $ // The trick is that xgettext will not consider such lines comments @@ -2144,7 +2144,7 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream) // Allow run-ons only for new $ format header lines done = Parse(tzer, line, !dollar || stream.Eof(), nLines == 1); while(!done && - (line = pgm.ReadLine().Trim(false), ++nLines, true)); + (line = pgm.ReadLine(), ++nLines, true)); // Don't pass these lines to the interpreter, so it doesn't get confused // by $, but pass blanks,