diff --git a/cmd/frpmgr/main.go b/cmd/frpmgr/main.go index f2732044..2235a85a 100644 --- a/cmd/frpmgr/main.go +++ b/cmd/frpmgr/main.go @@ -23,7 +23,7 @@ func fatal(v ...interface{}) { } func info(title string, format string, v ...interface{}) { - windows.MessageBox(0, windows.StringToUTF16Ptr(fmt.Sprintf(format, v...)), windows.StringToUTF16Ptr(title), windows.MB_ICONINFORMATION) + windows.MessageBox(0, windows.StringToUTF16Ptr(i18n.Sprintf(format, v...)), windows.StringToUTF16Ptr(title), windows.MB_ICONINFORMATION) } var ( diff --git a/ui/proxyview.go b/ui/proxyview.go index 52e2b7b5..fc6f1385 100644 --- a/ui/proxyview.go +++ b/ui/proxyview.go @@ -420,7 +420,8 @@ func (pv *ProxyView) onClipboardImport() { } else if strings.HasPrefix(text, "[") { proxy, err = config.UnmarshalProxyFromIni([]byte(text)) } else { - err = fmt.Errorf(i18n.Sprintf("This feature only supports text in INI or TOML format.")) + showErrorMessage(pv.Form(), "", i18n.Sprintf("This feature only supports text in INI or TOML format.")) + return } if err != nil { showError(err, pv.Form())