针对开发人员的异常消息是否应本地化? [英] Should exception messages that are targeted to the developer be localized?

查看:129
本文介绍了针对开发人员的异常消息是否应本地化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我指的是异常消息,显示开发人员使用API​​不正确。例如不正确地将null传递给方法。因此,开发人员第一次运行错误代码时会发生异常的类型。这种异常消息的类型永远不应该被显示给系统的用户。

I am referring to exception messages that show the developer is incorrectly using an API. For example incorrectly passing a null to method. So the type of exception that the developer will get the first time they have run their incorrect code. The type of exception message that should never get to be displayed to the user of a system.

这与理论有关,因为编程语言是英文那么程序员已经对英语有了解。或者至少足以解密异常消息。

This is kind of related to the theory that since the programming language is in English then the programmer already has an understanding of English. Or at least enough to decipher an exception message.

http://www.codinghorror.com/blog/archives/001248.html (请不要在这里讨论这个理论)

http://www.codinghorror.com/blog/archives/001248.html (please no discussion of this theory here)

是的,我知道.net框架遵循本地化所有的方法。

And yes I know that the .net framework follows the "localize everything" approach.

推荐答案

你的问题可以改写为应该所有开发者都收到相同的错误消息,以便Google可以使用它? ;)

Your question can be rephrased as "should all developers get the same error message so that they can Google it?" ;)

答案是肯定的。

翻译意味着


  • 该消息与谁写的不一样API旨在。它可能具有相同的含义,或者它可能在翻译中失去了某些东西。这可能会被严重翻译,在某些情况下可能是完全无法读取的。

  • 读取错误的人不能简单地将错误输入Google,看看有哪些其他人收到错误。因为其他人都用不同的语言出现相同的错误。

关于.NET的本地化所有方法,这是可怕的。我已经被无数次绊倒了,特别是因为如果找不到本地化的资源,那么它不会给你简单的英文版本。它给你一个无法找到资源错误,而是有效地抛出实际的错误信息。

About .NET's "localize everything" approach, it is horrible. I've been tripped up by it countless times, especially because if it is unable to find the localized resource, it does not give you the plain English version. It gives you a "Could not locate resource" error instead, effectively throwing away the actual error information.

这篇关于针对开发人员的异常消息是否应本地化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆