Are there any other suggestions for this?  I am not able to get the <ignore 
path="res/values-*/strings.xml" /> feature to work at all.  I have about a 
dozen languages, but I only care about 2 of them to be "fatal" during the 
lintVitalRelease step.  The rest should be ignored (or maybe generate 
warnings when I run the "lint" step -- I just don't want them to be "fatal" 
during a release task).  I thought the <ignore/> feature was exactly what I 
was looking for, but it still doesn't work.

lint.xml:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="MissingTranslation">
        <ignore path="res/values-de/strings.xml" />
    </issue>
</lint>

This still fails to build due to MissingTranslation in the values-de file. 
 The only way I can get it to truly ignore the errors is by overriding the 
severity of the entire issue:

<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="MissingTranslation" severity="ignore" />
</lint>

That works, but then it won't catch the missing translations in the 
languages that I *do* want to be warned about.  Why does <ignore/> not work 
correctly then?

My project structure is set up using the old Eclipse/Ant style structure:

./ - root
./res/
./src/
  ... etc

My lint.xml file is in the project root.  I also tried using:  <ignore 
regex=".*/values-.*/.*\.xml" /> to no avail...

I want missing translations in the values-es/ directory to trigger the 
fatal MissingTranslation error, but I want to ignore all the other 
languages.  What needs to happen for this to work?

Both the CLI tool and the Gradle task are showing the same problem.

On Thursday, January 16, 2014 4:12:31 PM UTC-5, Michael Barany wrote:
>
> thanks! that worked.
>
> On Thursday, January 16, 2014 4:54:33 AM UTC-5, Dal wrote:
>>
>> I had this same issue - try app/src/main/res/values/qa-strings.xml
>>
>> On Wednesday, 15 January 2014 08:31:01 UTC, Michael Barany wrote:
>>>
>>> Anyone know what I'm doing wrong?
>>>
>>>
>>> *My project structure is pretty straight forward.*
>>> /build.gradle
>>> /app/build.gradle
>>> /app/lint.xml
>>>
>>> *lint options in /app/build.gradle:*
>>>     lintOptions {
>>>         abortOnError false
>>>         absolutePaths false
>>>         lintConfig file("lint.xml")
>>>     }
>>>
>>> *lint.xml file contents:*
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <lint>
>>>     <issue id="MissingTranslation">
>>>         <ignore path="res/values/qa-strings.xml" />
>>>     </issue>
>>> </lint>
>>>
>>> I also tried the path src/main/res/values/qa-strings.xml
>>>
>>> The Lint Report still tells me "MissingTranslation: Incomplete 
>>> translation" in that file I'm trying to ignore.
>>>
>>> thanks!
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to