Adds a localization to Network preference.

Fixes #9089.

Signed-off-by: Matt Madia <[email protected]>
This commit is contained in:
Murai Takashi
2013-02-17 16:40:24 -05:00
committed by Matt Madia
parent a6b0b081cc
commit 9010edd275
@@ -629,9 +629,19 @@ EthernetSettingsView::_ValidateControl(BTextControl* control)
if (control->IsEnabled() && !MatchPattern(control->Text(), pattern)) {
control->MakeFocus();
BString errorMessage;
errorMessage << control->Label();
errorMessage.RemoveLast(":");
errorMessage << " is invalid";
if (control == fIPTextControl) {
errorMessage << B_TRANSLATE("IP address is invalid");
} else if (control == fNetMaskTextControl) {
errorMessage << B_TRANSLATE("Netmask is invalid");
} else if (control == fGatewayTextControl) {
errorMessage << B_TRANSLATE("Gateway is invalid");
} else if (control == fPrimaryDNSTextControl) {
errorMessage << B_TRANSLATE("DNS #1 is invalid");
} else if (control == fSecondaryDNSTextControl) {
errorMessage << B_TRANSLATE("DNS #2 is invalid");
}
fErrorMessage->SetText(errorMessage.String());
beep();
return false;