-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
aDefeaturing->DumpErrors(errors);
aDefeaturing->DumpWarnings(errors);
myError = errors.str();
+ // the error string may end by '\n', remove it for correct translation
+ size_t aNbToRemove = 0;
+ for (std::string::reverse_iterator it = myError.rbegin();
+ it != myError.rend() && *it == '\n'; ++it)
+ ++aNbToRemove;
+ if (aNbToRemove > 0)
+ myError = myError.substr(0, myError.size() - aNbToRemove);
return;
}