A few flavors of this question have been asked before, but I don\'t understand how the answers to them are satisfactory for large projects.
My goal here is to find a
Just add //NON-NLS after your log line to suppress the warning.
NGMCLogger.i(TAG, "This log does not need translation"); //NON-NLS
With version 1.3 of Android Studio, after running "Hardcoded text" inspection by name, it does indeed catch lots of non-issues, such as parameters to Log methods.
However, the right panel of the inspection result window contains information about the rule, along with some "problem resolution" options. One of those options will be "Annotate parameter..." or "Annotate class...". These options create entries in an annotations.xml file that tells the inspection rule to ignore those parameters or classes.
With this, subsequent runs of the inspection won't flag those calls. So after you do it for a couple of code files, you will probably hit most of the exceptions and it will cut down the number of results for the whole project.
Here is an example of the XML that is generated in the annotations.xml file:
<root>
<item name='android.content.Intent Intent(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NonNls'/>
</item>
<item name='android.content.Intent android.content.Intent putExtra(java.lang.String, boolean) 0'>
<annotation name='org.jetbrains.annotations.NonNls'/>
</item>
<item name='android.content.Intent android.content.Intent putExtra(java.lang.String, int) 0'>
<annotation name='org.jetbrains.annotations.NonNls'/>
</item>
<item name='android.content.Intent android.content.Intent setAction(java.lang.String) 0'>
<annotation name='org.jetbrains.annotations.NonNls'/>
</item>
</root>