2013-03-26 14 views
10

Kiedy próbuję wyeksportować podpisany pakiet aplikacji dla google mao, pojawia się ten błąd w moim pliku res/value/string.xml. Co powinienem zrobić?Błąd podpisanego pakietu aplikacji Android do wywołania

app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es-rUS, et, fa, fi, fr, hi, hr, hu, in, it, iw, ja, ko, lt, lv, ms, nb, nl, pl, pt, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rTW, zu 
Issue: Checks for incomplete translations where not all strings are translated 
Id: MissingTranslation 
If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages. 
If the string should not be translated, you can add the attribute translatable="false" on the <string> element, or you can define all your non-translatable strings in a resource file called donottranslate.xml. Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute. 
By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variable ANDROID_LINT_COMPLETE_REGIONS. 
You can tell lint (and other tools) which language is the default language in your res/values/ folder by specifying tools:locale="languageCode" for the root <resources> element in your resource file. (The tools prefix refers to the namespace declaration http://schemas.android.com/tools.) 
+0

Czy utworzyłeś foldery w postaci 'value-af',' value-am', etc.? – Tushar

+0

możliwy duplikat [Lint: Jak zignorować " nie jest przetłumaczony na" "błędy?" (Http://stackoverflow.com/questions/11443996/lint-how-to-ignore-key-is-not-translated- in-language-errors) – DroidDev

Odpowiedz

13

Spróbuj

Przejdź do Eclipse -> zakładka Window -> Preferences -> Android - sprawdzanie> Błąd Lint -> odznacz przebieg wyboru pełen błędów

może być to mogło pomocny

5

W pliku ciąg.xml po prostu dodaj translatable="false" do ciągu znaków. tak jak ten

0

Wystarczy zmienić nazwę pliku string.xml na donottranslate.xml. Może to ci pomoże.

39

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

idź do MissingTranslation linia, i ustawić ją na ostrzeżenie:

enter image description here

+0

thnx ... zadziałało !!! –

+0

to nie zadziałało dla mnie. Mam problem z uzyskaniem błędu – Ali

1

Chociaż wszystkie inne odpowiedzi są poprawne, innym rozwiązaniem jest dodanie atrybutu tools:ignore="MissingTranslation" do xml file:

<?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> 

Preferuję to, ponieważ a) nie wymaga nging co ciąg znaków i b) nie jest to ustawienie aplikacji, więc można je sprawdzić w git. Z drugiej strony nie pomoże, jeśli błędy dotyczą projektów, do których nie masz prawa zapisu.

Powiązane problemy