2013-03-26 10 views
10

जब मैं Google माओ के लिए हस्ताक्षरित एप्लिकेशन पैकेज निर्यात करने का प्रयास करता हूं, तो मुझे यह त्रुटि मेरे res/value/string.xml फ़ाइल पर मिलती है। मुझे क्या करना चाहिए?एंड्रॉइड एक्सपोर्ट हस्ताक्षरित एप्लिकेशन पैकेज त्रुटि

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

क्या आपने 'value-af',' value-am', आदि 'के फ़ोल्डर्स बनाए थे? – Tushar

+0

संभवतः डुप्लिकेट [लिंट: अनदेखा कैसे करें " का अनुवाद " त्रुटियों में नहीं किया गया है?] (Http://stackoverflow.com/questions/11443996/lint-how-to-ignore-key-is-not-translated- भाषा में त्रुटियों) – DroidDev

उत्तर

13

ग्रहण करने के लिए इस

जाओ प्रयास करें -> खिड़की टैब -> वरीयताएँ -> Android -> एक प्रकार का वृक्ष त्रुटि जाँच -> सही का निशान हटाएँ पूर्ण त्रुटि की जांच रन

हो सकता है यह हो सकता उपयोगी

5

स्ट्रिंग.एक्सएमएल फ़ाइल में स्ट्रिंग में बस translatable="false" जोड़ें। सिर्फ इस

<string name="app_name" translatable="false">Example App</string> 
0

की तरह बस donottranslate.xml को string.xml फ़ाइल का नाम बदलें। शायद यह आपकी मदद करेगा।

39

"Window" > "Preferences" > "Android" > "Lint Error Checking" में:

जाओ MissingTranslation लाइन के लिए, और चेतावनी के लिए सेट:

enter image description here

+0

thnx ... यह काम किया !!! –

+0

यह मेरे लिए काम नहीं किया था। मैं त्रुटि प्राप्त कर रहा हूँ – Ali

1

हालांकि अन्य उत्तर के सभी सही हैं, एक और विकल्प है tools:ignore="MissingTranslation" विशेषता जोड़ने के लिए एक्सएमएल फ़ाइल:

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

मुझे यह पसंद है क्योंकि ए) इसे चा की आवश्यकता नहीं है प्रत्येक स्ट्रिंग मान, और बी) यह एक अनुप्रयोग सेटिंग नहीं है, इसलिए इसे गिट में चेक किया जा सकता है। दूसरी तरफ, अगर त्रुटियों को संदर्भित परियोजनाओं में संदर्भित किया गया है, तो इससे आपकी सहायता नहीं होगी, जिनके पास आपके पास लेखन पहुंच नहीं है।

संबंधित मुद्दे