From b56ea0599b935a677cbbe449bc4a6ad57a45eafd Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 7 Sep 2016 15:53:23 +0100 Subject: [PATCH] Bug 1440 - (Residual) Error message looks funny on Mac as only ":" is disallowed. Previously the dialog listed multiple characters that are disallowed. On Mac, only ":" is disallowed, so the text in that case can't say "any of" without looking funny. --- src/export/ExportMultiple.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index f6b1efa62..8b5cf2f2b 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -995,10 +995,21 @@ wxString ExportMultiple::MakeFileName(const wxString &input) { // need to get user to fix file name // build the dialog wxString msg; - msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input.c_str(), - ::wxJoin(Internat::GetExcludedCharacters(), wxChar(' '))); + wxString excluded = ::wxJoin( Internat::GetExcludedCharacters(), wxChar(' ') ); + // TODO: For Russian langauge we should have separate cases for 2 and more than 2 letters. + if( excluded.Length() > 1 ){ + // i18ln-hint: The second %s gives some letters that can't be used. + msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input.c_str(), + excluded.c_str()); + } else { + // i18ln-hint: The second %s gives a letter that can't be used. + msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use \"%s\".\nUse..."), input.c_str(), + excluded.c_str()); + } + wxTextEntryDialog dlg( this, msg, _("Save As..."), newname ); + // And tell the validator about excluded chars dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST ); wxTextValidator *tv = dlg.GetTextValidator();