1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-22 23:30:07 +02:00

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.
This commit is contained in:
James Crook 2016-09-07 15:53:23 +01:00
parent 67cec5ad83
commit b56ea0599b

View File

@ -995,10 +995,21 @@ wxString ExportMultiple::MakeFileName(const wxString &input)
{ // need to get user to fix file name { // need to get user to fix file name
// build the dialog // build the dialog
wxString msg; wxString msg;
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input.c_str(), wxString excluded = ::wxJoin( Internat::GetExcludedCharacters(), wxChar(' ') );
::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 ); wxTextEntryDialog dlg( this, msg, _("Save As..."), newname );
// And tell the validator about excluded chars // And tell the validator about excluded chars
dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST ); dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST );
wxTextValidator *tv = dlg.GetTextValidator(); wxTextValidator *tv = dlg.GetTextValidator();