ReSharper的是提示字符串文字本地化 [英] Resharper is suggesting that string literals are localizable
问题描述
一个ReSharper的6.0的建议是本地化的字符串,如果我不想一个字符串进行本地化,我可以将其转换为一个逐字字符串中加入相应的警告一 @
。
升级到ReSharper的6.1之后,这不工作了。甚至逐字字符串中显示警告。
禁用本地化或抑制警告不是一个理想的选择。我不使用本地化所以警告是有帮助的,我不希望有散落的到处都是禁用的意见。
是否有一个选项,以获取ReSharper的6.1逐字忽略?字符串
在ReSharper的/选项,请访问:
<预类=郎无prettyprint-覆盖>
代码编辑 - > C# - >本地化
和检查不要逐字分析字符串
One of the suggestions of Resharper 6.0 was to localize strings, and if I didn't want a string to be localized, I could suppress the warning by converting it to a verbatim string literal by adding a @
.
After upgrading to Resharper 6.1, this doesn't work anymore. Even verbatim string literals are showing the warning.
Disabling localization or suppressing the warnings isn't an ideal option. I do use localization so the warnings are helpful, and I don't want to have the disable comments littered everywhere.
Is there an option to get Resharper 6.1 to ignore verbatim string literals?
Under ReSharper / Options, go to:
Code Editing -> C# -> Localization
And check "Don't analyse verbatim strings"
这篇关于ReSharper的是提示字符串文字本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!