score:348

Accepted answer

android studio:

  • "file" > "settings" and type "missingtranslation" into the search box

eclipse:

  • windows/linux: in "window" > "preferences" > "android" > "lint error checking"
  • mac: "eclipse" > "preferences" > "android" > "lint error checking"

find the missingtranslation line, and set it to warning as seen below:

missing translations, is not translated in

score:1

you can also put resources which you do not want to translate to file called donottranslate.xml.

example and explanation: http://tools.android.com/recent/non-translatablestrings

score:1

many of them has a given a different working answers, and i too got the same lint errors i make it ignore by doing the following with eclipse.

  1. click on windows
  2. click on preferences
  3. select android > lint error checking.
  4. click on ignore all > apply > ok.

thats it.

score:1

the following worked for me.

  • click on windows
  • click on preferences
  • select android > lint error checking.
  • find and select the relevant lint checking and
  • set the severity to 'ignore' (on bottom right)

score:4

another approach is to indicate the languages you intend to support and filter out the rest using the 'resconfigs' option with gradle.

check out this other answer for details

this is better, i think, because you don't have to completely ignore legitimate translation mistakes for languages you actually want to support

score:5

in addition,

not project dependent properities, eclipse preferences.
in mac, eclipse > preferences

enter image description here

score:6

add following to your gradle file in android section

    lintoptions {
       disable 'missingtranslation'
    }

score:9

insert in the lint.xml file this:

<?xml version="1.0" encoding="utf-8"?>
<lint>
    ...

    <issue
        id="missingtranslation"
        severity="ignore" />
</lint>

for more details: suppressing lint warnings.

score:9

add the lines in your /res/values.xml file in resource root tab like this:

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

tools:locale set the local language to english, no need of language translation later on that for all resource strings and tools:ignore let lint to isnore the missing translations of the resource string values.

score:11

if you want to turn off the warnings about the specific strings, you can use the following:

strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>    

    <!--suppress missingtranslation -->
    <string name="some_string">ignore my translation</string>
    ...

</resources>

if you want to warn on specific strings instead of an error, you will need to build a custom lint rule to adjust the severity status for a specific thing.

http://tools.android.com/tips/lint-custom-rules

score:23

this will cause lint to ignore the missing translation error for all strings in the file, yet other string resource files can be verified if needed.

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" 
    tools:ignore="missingtranslation">

score:83

to ignore this in a gradle build add this to the android section of your build file:

lintoptions {
   disable 'missingtranslation'
}

score:86

you can set the attribute translatable="false" on the definition like this:

<string name="account_setup_imap" translatable="false">imap</string>

for more information: http://tools.android.com/recent/non-translatablestrings


Related Query

More Query from same tag