Enable Android Studio spell checking on language specific strings.xml files

*爱你&永不变心* 提交于 2020-04-13 06:18:09

问题


In Android Studio, spellchecking seems to be disabled for language specific strings.xml files (and I understand why it would be disabled by default).

But is it possible to enable it, to check values, for a couple of those files? ("fr/strings.xml" for example), or at least run it on demand.


回答1:


To avoid or to enforce spellchecking you could add tools:locale to the <resources> tag in your string xml.

<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">

This tells Lint your resources' locale.

Source: http://alexsimo.com/mastering-tools-namespace-android/




回答2:


Yes, go to Android Studio Preferences > Editor > Inspections > Spelling > Typo (check the box). Also make sure all scopes have been selected.

Incorrect spellings in the strings file show up with a light green line, clicking on which would show a message that it may be a typo.



来源:https://stackoverflow.com/questions/42251944/enable-android-studio-spell-checking-on-language-specific-strings-xml-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!