diff --git a/src/preferences/network/EthernetSettingsView.cpp b/src/preferences/network/EthernetSettingsView.cpp index c1b173e920..95e193eb60 100644 --- a/src/preferences/network/EthernetSettingsView.cpp +++ b/src/preferences/network/EthernetSettingsView.cpp @@ -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;