diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index 204a749fa2..8319615ab6 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -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; } } diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp index 9a3a027e7d..82d12aa9b4 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp @@ -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); diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h index 862d6d0596..7bf85228a4 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h @@ -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. */