Skip to content

Commit

Permalink
wpa_gui-haiku: Make error messages translateable.
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlesplash committed Mar 17, 2019
1 parent 2a17268 commit e40f903
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions wpa_supplicant/wpa_gui-haiku/main_haiku.cpp
Expand Up @@ -13,6 +13,7 @@
*/

#include <Application.h>
#include <Catalog.h>
#include <KeyStore.h>
#include <Locker.h>
#include <MessageQueue.h>
Expand Down Expand Up @@ -48,6 +49,10 @@ extern "C" {
}


#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "wpa_supplicant"


static const uint32 kMsgJoinTimeout = 'jnto';
static const char *kWPASupplicantKeyring = "wpa_supplicant";

Expand Down Expand Up @@ -527,7 +532,8 @@ WPASupplicantApp::_JoinNetwork(BMessage *message)
// The key format is invalid, we need to ask for another password.
BMessage newJoinRequest = *message;
newJoinRequest.RemoveName("password");
newJoinRequest.AddString("error", "Password format invalid");
newJoinRequest.AddString("error",
B_TRANSLATE("Password format invalid!"));
newJoinRequest.AddBool("forceDialog", true);
PostMessage(&newJoinRequest);
}
Expand Down Expand Up @@ -727,7 +733,8 @@ WPASupplicantApp::_FailedToJoin(const wpa_supplicant *interface,
be_app->PostMessage(&leaveRequest);

BMessage newJoinRequest = joinRequest;
newJoinRequest.AddString("error", "Failed to join network");
newJoinRequest.AddString("error",
B_TRANSLATE("Failed to join network. (Incorrect password?)"));
newJoinRequest.AddBool("forceDialog", true);
be_app->PostMessage(&newJoinRequest);
}
Expand Down

0 comments on commit e40f903

Please sign in to comment.