56

I am new at Android coding and this forum. When I am trying to run the project to test it I am getting the following error:-

"app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, en-rIN, es, es-rUS, et, et-rEE, fa, fi, fr, fr-rCA, hi, hr, hu, hy-rAM, in, it, iw, ja, ka-rGE, km-rKH, ko, lo-rLA, lt, lv, mn-rMN, ms, ms-rMY, nb, nl, pl, pt, pt-rBR, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rHK, zh-rTW, zu

in values/strings.xml

strings.xml:-

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

<string name="app_name">ThessMuseams</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>

Amit Anand
  • 1,225
  • 1
  • 16
  • 40
alexcha
  • 561
  • 1
  • 4
  • 3
  • 1
    Do you have anything like `values-af/strings.xml`? – zapl Jan 14 '14 at 16:37
  • No. I have nothing like this. – alexcha Jan 15 '14 at 23:41
  • 1
    It should be just a warning and your app should work fine. You can translate every string including the app name into all those languages but it makes usually no sense to do that for every language. Although I'm wondering why you see it.. take it as a friendly reminder that you could translate it :) – zapl Jan 15 '14 at 23:45
  • Thanks very much!! I hope it work becaouse is for a course I have. Tanks again for your help – alexcha Jan 21 '14 at 16:34
  • For **Android Studio** refer to [this answer](https://stackoverflow.com/a/45585534/6521116) – LF00 Aug 09 '17 at 08:34
  • [Avoid Android Lint complains about not-translated string](https://stackoverflow.com/q/12590739/6521116) – LF00 Aug 09 '17 at 08:36
  • But, signed apk is not getting generated due to this error. – ZaptechDev Kumar Apr 04 '18 at 05:21

11 Answers11

82

In your ADT go to window->Preferences->Android->Lint Error Checking

Find there MissingTranslation and change its Severity to Warning.

Amit Anand
  • 1,225
  • 1
  • 16
  • 40
46

With Android Studio, you can prevent lint from checking the MissingTranslation warning. Add the following to your app/build.gradle:

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

android {
    ...
    lintOptions {
       disable 'MissingTranslation'
    }
    ...
}
grebulon
  • 7,697
  • 5
  • 42
  • 66
19

For Android Studio you can use either of the below ways to solve this issue

Method 1. Disable MissingTranslation check in build.gradle with

android {
     lintOptions {
        disable 'MissingTranslation'
    }
}

Method 2. Ignore the MissingTranslation in you resource strings file with

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

  <!-- your strings here; no need now for the translatable attribute -->

</resources>

Method 3. Set translatable to false on specific string with

<string name="hello" translatable="false">hello</string>

You also can refer to Avoid Android Lint complains about not-translated string

LF00
  • 27,015
  • 29
  • 156
  • 295
8

You should disable the : "Run full error check when exporting app and abort if fatal errors are found".

you can disable it from option in :

"Window" > "Preferences" > "Android" > "Lint Error Checking"

You should be able to disable

"Run full error check when exporting app and abort if fatal errors are found".

Oubaida AlQuraan
  • 1,706
  • 1
  • 18
  • 19
8

Try adding translatable="[true/false]".

<string name="app_name" translatable="false">ThessMuseams</string>
sfledthered
  • 89
  • 1
  • 1
3

The error is thrown by a check called lint which checks every dependency and guesses you want your app to be translated into all language the libraries you use are translated, in case of maps basically everyone. There is some setting for lint in the Eclipse preferences(Missing Translation). You could completely turn lint off or configure it so it ignores the translation warnings.

Riadhovic
  • 226
  • 1
  • 5
3

Just click the Checkbox dropdown icon near AVD Manager . Then Select Clear Lint Warnings. That will fix it.

ralphgabb
  • 10,298
  • 3
  • 47
  • 56
3

How to disable Translations error messages

If you want to suppress the error message then go to,

On Mac OS X,

Eclipse -> Preferences -> Android -> Lint Error Checking

Solving Eclipse Android Lint Translation error messages

On Windows,

Window -> Preferences -> Android -> Lint Error Checking

enter image description here

0

On Windows,

Window -> Preferences -> Android -> Lint Error Checking Preferences Window

Run full error check must be unchecked

Unknown.geeko
  • 73
  • 1
  • 2
  • 7
0

You can write translation of the text to "Translations editor".

Fuat
  • 789
  • 9
  • 14
-3

I use android studio(v1.2), add the following build script then solved the issue:

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}
Allen
  • 6,745
  • 5
  • 41
  • 59