-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
怎么写出完美的错误消息 #2080
怎么写出完美的错误消息 #2080
Conversation
@sqrthree 校对认领 |
@lampui 好的呢 🍺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunshine940326 @sqrthree 校对完毕
|
||
### **Clear text** message | ||
### **明确地文字**信息 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『明确地文字信息』 =>
『明确的文字信息』
|
||
Very often websites use only one error message for all validation states. You left this email field blank — “Enter a valid email address”, you missed the “@” character — “Enter a valid email address”. The MailChimp does it in another way — they have 3 error messages for each state of email validation. The first one checks if the input field isn’t blank when submitting the form. The other two check if there is “@” and “.” characters. (However “Please enter a value” isn’t a great example of the error writing, it is unclear what kind of value you need to enter.) Show your users actual messages instead of general ones. | ||
#### 3. 错误消息应该针对具体情况 | ||
很多时候,网站对于所有的验证状态只使用一条错误消息。你没有填写邮箱提示“Enter a valid email address”,你没有使用“@”符号也是提示“Enter a valid email address”。MailChimp 处理这种情况有另一种方式:他们有 3 个错误消息对应不同的邮箱验证状态。第一种情况是检查是否有“@”符号和“.”符号(“Please enter a value”并不是一个很好的例子,因为还并不清楚你需要输入什么样的值。) 向用户显示实际的错误消息,而不是通用的错误消息。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『你没有填写邮箱提示“Enter a valid email address”,你没有使用“@”符号也是提示“Enter a valid email address”。』 =>
『你没有填写邮箱 — 网站提示“请输入有效的邮箱地址”,你漏了“@”符号 — 网站也是提示“请输入有效的邮箱地址”』
|
||
Very often websites use only one error message for all validation states. You left this email field blank — “Enter a valid email address”, you missed the “@” character — “Enter a valid email address”. The MailChimp does it in another way — they have 3 error messages for each state of email validation. The first one checks if the input field isn’t blank when submitting the form. The other two check if there is “@” and “.” characters. (However “Please enter a value” isn’t a great example of the error writing, it is unclear what kind of value you need to enter.) Show your users actual messages instead of general ones. | ||
#### 3. 错误消息应该针对具体情况 | ||
很多时候,网站对于所有的验证状态只使用一条错误消息。你没有填写邮箱提示“Enter a valid email address”,你没有使用“@”符号也是提示“Enter a valid email address”。MailChimp 处理这种情况有另一种方式:他们有 3 个错误消息对应不同的邮箱验证状态。第一种情况是检查是否有“@”符号和“.”符号(“Please enter a value”并不是一个很好的例子,因为还并不清楚你需要输入什么样的值。) 向用户显示实际的错误消息,而不是通用的错误消息。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
漏掉了这一句:The first one checks if the .... form.所以后面的也错了
|
||
As usual, the red color is used for error message text. In some cases, yellow or orange colors are used as some resources state that red color is too stressful for users. In both cases, be sure that the error text is legible, with noticeable contrast against its background color. Don’t forget to provide a related icon alongside the color to improve the accessibility for people with color-blindness. | ||
通常情况下,红色用于错误消息文本。在某些情况下,使用黄色或橙色作为某些资源状态因为红色对用户来说过于紧张。在这两种情况下,请确保错误文本是易读的,与背景颜色有明显的对比。别忘了在颜色旁边提供一个相关的图标,帮助盲人阅读。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color-blindness 应译为色盲人士,而不是盲人。
@sqrthree 校对认领 |
@shawnchenxmu 妥妥哒 🍻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
校对完毕 @sqrthree @sunshine940326
2. Right placement. | ||
3. Good visual design. | ||
1. 明确的文字信息。 | ||
2. 显示在合适的位置。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『显示在合适的位置』=>『合适的显示位置』
和1、3两点统一句式
|
||
![](https://cdn-images-1.medium.com/max/1600/1*2RdNRoDJmqfArWaViXal-g.png) | ||
|
||
#### 2. Error message should be helpful | ||
#### 2. 错误信息应该是有用的 | ||
只告诉用户一些地方出错了是不够的。你要告诉读者怎样才能又快又方便的解决问题。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『告诉用户一些地方出错』=>『告诉用户哪些地方出错』
|
||
Don’t blame your users that they did something wrong even if they did. Be polite to your user, make them feel comfortable and convenient. It’s a great opportunity to use your brand voice and add personality into the errors. | ||
#### 4. 错误信息应该是礼貌的 | ||
如果你的用户犯了错误请不要粗鲁的对待他们。对你的用户客气一点,让他们感觉舒适和方便。使用你品牌的声音和个性化的错误消息是一个好的选择。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『粗鲁的对待他们』=>『粗鲁地对待他们』
|
||
Error messages are a great opportunity to improve user experience, share your brand voice and personality. Pay attention to all aspects of a good error message — the language, placement, and visual design to make it a really perfect. | ||
### 结语 | ||
错误消息是改善用户体验、分享您的品牌声音和个性的绝佳机会。注重良好的错误消息,在语言、布局和视觉设计等各个方面。使它成为一个真正的完美的产品。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『在语言、布局和视觉设计等各个方面』=>『要综合考虑语言、布局和视觉设计等各个方面』
|
||
Every system can’t work without errors. It can be user’s errors or system’s fails. In both cases, it’s very important to handle errors in a right way as they are crucial for a good user experience. | ||
**下面是每个好的错误消息的 3 个重要部分:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『下面是每个好的错误消息的 3 个重要部分』=>『一个好的错误消息应该包括下面这 3 个重要部分』
@lampui @shawnchenxmu 感觉两位的耐心校对~ |
@sunshine940326 已经 merge 啦~ 快快麻溜发布到掘金专栏然后给我发下链接,方便及时添加积分哟。 |
…slate * 'master' of https://github.com/xitu/gold-miner: (178 commits) 🚀 添加文章『关于 React Router 4 的一切』到文章列表 🚀 添加文章『为什么我们渴求女性来设计 AI 』到文章列表 🚀 添加文章『如何在 Webpack 2 中使用 tree-shaking』到文章列表 🚀 添加文章『Redux 有多棒?』到文章列表 🚀 添加文章『别再使用图片轮播了』到文章列表 🚀 添加文章『将 Android 项目迁移到 Kotlin 语言』到文章列表 🚀 添加文章『巧用 ARKit 和 SpriteKit 从零开始做 AR 游戏』到文章列表 别再使用图片轮播了 (xitu#2073) Update how-to-do-proper-tree-shaking-in-webpack-2.md (xitu#2100) 为什么我们渴求女性来设计 AI (xitu#2074) 如何在 webpack2 中使用 tree-shaking (xitu#2076) 怎么写出完美的错误消息 (xitu#2080) 巧用 ARKit 和 SpriteKit 从零开始做 AR 游戏 (xitu#2043) 将 Android 程序移植为 Kotlin 程序 (xitu#2039) Redux 有多棒? (xitu#2003) 🚀 添加文章『函数式响应编程入门指南』到文章列表 🚀 添加文章『虚拟现实是如何改变用户体验的:从原型到设备的设计』到文章列表 ✨ Create angular-vs-react-which-is-better-for-web-development.md ✨ Create evolving-the-facebook-news-feed-to-serve-you-better.md ✨ Create why-context-value-matters-and-how-to-improve-it.md ...
resolve #2065