1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-18 17:10:55 +02:00

Improved message for failed file writes in recording, and elsewhere

This commit is contained in:
Paul Licameli 2017-10-17 07:18:38 -04:00
parent 49174461d1
commit 93f20b2bf2

View File

@ -8,6 +8,7 @@
#include "Audacity.h"
#include "FileException.h"
#include "Prefs.h"
FileException::~FileException()
{
@ -29,9 +30,20 @@ wxString FileException::ErrorMessage() const
case Cause::Read:
format = _("Audacity failed to read from a file in %s.");
break;
case Cause::Write:
format = _("Audacity failed to write to a file in %s.");
case Cause::Write: {
auto lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
if (lang.empty())
// PRL: last-minute improved message for 2.2.0 RC1.
// It was too late to translate the new message, so improve it
// in English only.
// This message is more like that for failed save of a project.
format =
_("Audacity failed to write to a file.\n"
"Perhaps %s is not writable or the disk is full.");
else
format = _("Audacity failed to write to a file in %s.");
break;
}
case Cause::Rename:
format =
_("Audacity successfully wrote a file in %s but failed to rename it as %s.");