1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a few TRANS wrappers around error messages.

This commit is contained in:
jules 2013-12-05 11:32:38 +00:00
parent 33b1e7bd16
commit 3f9a4834a6
3 changed files with 11 additions and 9 deletions

View file

@ -928,7 +928,7 @@ public:
if (sampleRates.size() == 0 && inputDevice != nullptr && outputDevice != nullptr)
{
lastError = "The input and output devices don't share a common sample rate!";
lastError = TRANS("The input and output devices don't share a common sample rate!");
return lastError;
}
@ -939,14 +939,14 @@ public:
if (inputDevice != nullptr && ! inputDevice->open (currentSampleRate, inputChannels))
{
lastError = "Couldn't open the input device!";
lastError = TRANS("Couldn't open the input device!");
return lastError;
}
if (outputDevice != nullptr && ! outputDevice->open (currentSampleRate, outputChannels))
{
close();
lastError = "Couldn't open the output device!";
lastError = TRANS("Couldn't open the output device!");
return lastError;
}
@ -963,7 +963,7 @@ public:
if (! check (inputDevice->client->Start()))
{
close();
lastError = "Couldn't start the input device!";
lastError = TRANS("Couldn't start the input device!");
return lastError;
}
}
@ -975,7 +975,7 @@ public:
if (! check (outputDevice->client->Start()))
{
close();
lastError = "Couldn't start the output device!";
lastError = TRANS("Couldn't start the output device!");
return lastError;
}
}

View file

@ -33,8 +33,10 @@ ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title,
timeOutMsWhenCancelling (timeOutMsWhenCancelling_)
{
alertWindow = LookAndFeel::getDefaultLookAndFeel()
.createAlertWindow (title, String::empty, cancelButtonText,
String::empty, String::empty,
.createAlertWindow (title, String(),
cancelButtonText.isEmpty() ? TRANS("Cancel")
: cancelButtonText,
String(), String(),
AlertWindow::NoIcon, hasCancelButton ? 1 : 0,
componentToCentreAround);

View file

@ -96,7 +96,7 @@ public:
the thread to stop before killing it forcibly (see
Thread::stopThread() )
@param cancelButtonText the text that should be shown in the cancel button
(if it has one)
(if it has one). Leave this empty for the default "Cancel"
@param componentToCentreAround if this is non-null, the window will be positioned
so that it's centred around this component.
*/
@ -104,7 +104,7 @@ public:
bool hasProgressBar,
bool hasCancelButton,
int timeOutMsWhenCancelling = 10000,
const String& cancelButtonText = "Cancel",
const String& cancelButtonText = String(),
Component* componentToCentreAround = nullptr);
/** Destructor. */