Adds a localization to Network preference.
Fixes #9089. Signed-off-by: Matt Madia <[email protected]>
This commit is contained in:
committed by
Matt Madia
parent
a6b0b081cc
commit
9010edd275
@@ -629,9 +629,19 @@ EthernetSettingsView::_ValidateControl(BTextControl* control)
|
|||||||
if (control->IsEnabled() && !MatchPattern(control->Text(), pattern)) {
|
if (control->IsEnabled() && !MatchPattern(control->Text(), pattern)) {
|
||||||
control->MakeFocus();
|
control->MakeFocus();
|
||||||
BString errorMessage;
|
BString errorMessage;
|
||||||
errorMessage << control->Label();
|
|
||||||
errorMessage.RemoveLast(":");
|
if (control == fIPTextControl) {
|
||||||
errorMessage << " is invalid";
|
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());
|
fErrorMessage->SetText(errorMessage.String());
|
||||||
beep();
|
beep();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user