When the "Go" Android app is packaged, an error occurs: "XXX" is not translated in "AF" (Afrikaans), "AM" (Amharic), "Ar" (Arabic) .....

Source: Internet
Author: User

Label:man    Reason    sdk   str   detail    can    process    android application    .net   

"App_name" is not translated in "AF" (Afrikaans), "AM" (Amharic), "Ar" (Arabic), "BG" (Bulgarian), "Ca" (Catalan), "CS" (C Zech), "Da" (Danish), "de" (German), "El" (Greek), "En-rgb" (English:united Kingdom), "En-rin" (English:india), "Es" (Sp Anish), "Es-rus" (spanish:united states), "Et-ree" (Estonian:estonia), "Fa" (Persian), "fi" (Finnish), "fr" (French), "F R-rca "(French:canada)," Hi "(Hindi)," HR "(Croatian)," Hu "(Hungarian)," Hy-ram "(Armenian:armenia)," in "(Indonesian), "It" (Italian), "IW" (Hebrew), "ja" (Japanese), "Ka-rge" (Georgian:georgia), "Km-rkh" (Khmer:cambodia), "Ko" (Korean), "Lo-rla" (Lao:lao people ' s Democratic Republic), "LT" (Lithuanian), "LV" (Latvian), "Mn-rmn" (Mongolian:mongolia), "Ms-r MY "(Malay:malaysia)," NB "(Norwegian bokm?l)," NL "(Dutch)," pl "(Polish)," PT "(Portuguese)," Pt-rpt "(portuguese:port Ugal), "Ro" (Romanian), "Ru" (Russian), "SK" (Slovak), "SL" (Slovene), "SR" (Serbian), "SV" (Swedish), "SW" (Swahili), "th "(Thai)," TL "(Tagalog), "tr" (Turkish), "UK" (Ukrainian), "VI" (Vietnamese), "ZH-RCN" (Chinese:china), "Zh-rhk" (Chinese:hong Kong), "ZH-RTW" (Chinese:taiwan, Province of China), "zu" (Zulu)


Issue:checks for incomplete translations where isn't all strings is translated


Id:missingtranslation
If an application have more than one locale, then all the strings declared in one language should also is translated in all Other languages.


If The string should not is translated, you can add the attribute translatable= "false" on the <string> element, or Y ou 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 Standar D language Strings. You can require all regions to provide a full translation by setting the environment variable android_lint_complete_region S.

You can tell lint (and other tools) which language are 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.)

Based on the error log, try it yourself:

(1) Ignore: tools:ignore= "Missingtranslation" and (2) Specify the language of the file: tools:locale= "ZH-RCN"

Result: Set the tools:ignore= "Missingtranslation" property of the Res/value/string.xml file to ignore errors generated when the APK was exported.

<resources     xmlns:android= "http://schemas.android.com/apk/res/android"    xmlns:tools= "http// Schemas.android.com/tools "    tools:ignore=" missingtranslation "    >       <string name=" App_name "> Xxxx</string></resources>

—— - - - ——- - - —— - - - -- -—— —— —— - -—— - —— - -—— --—— -

The following is reproduced:

Issue: When we develop an Android application, we must package the application before publishing the application.

As for the complete process from package to release, refer to: Android App Publishing Process---bowl POD release process

The process for selecting an Eclipse ADT Package application is as follows:

At this point, however, the following prompt appears:

and the original error-free program (VALUES/STRINGS.XML) will also receive the following error message:

"App_name" is not translated in "AF" (Afrikaans), "AM" (Amharic), "Ar" (Arabic), "BG" (Bulgarian), "Ca" (Catalan), "CS" ( Czech), "Da" (Danish), "de" (German), "El" (Greek), "En-rgb" (English:united Kingdom), "En-rin" (English:india), "Es" (  Spanish), "Es-rus" (spanish:united states), "Et-ree" (Estonian:estonia), "Fa" (Persian), "fi" (Finnish), "fr" (French), "Fr-rca" (French:canada), "Hi" (Hindi), "HR" (Croatian), "Hu" (Hungarian), "Hy-ram" (Armenian:armenia), "in" (Indonesi AN), "it" (Italian), "IW" (Hebrew), "ja" (Japanese), "Ka-rge" (Georgian:georgia), "Km-rkh" (Khmer:cambodia), "Ko" (Kore  AN), "Lo-rla" (Lao:lao people ' s Democratic Republic), "LT" (Lithuanian), "LV" (Latvian), "Mn-rmn" (Mongolian:mongolia), "Ms-rmy" (Malay:malaysia), "NB" (Norwegian bokm?l), "NL" (Dutch), "pl" (Polish), "PT" (Portuguese), "Pt-rpt" (portugues E:portugal), "Ro" (Romanian), "Ru" (Russian), "SK" (Slovak), "SL" (Slovene), "SR" (Serbian), "SV" (Swedish), "SW" (Swahi LI), "th" (Thai), "TL"(Tagalog), "tr" (Turkish), "UK" (Ukrainian), "VI" (Vietnamese), "ZH-RCN" (Chinese:china), "Zh-rhk" (Chinese:hong Kong), "Zh-rtw" (Chinese:taiwan, province of China), "zu" (Zulu)

What is the reason? The reasons are as follows:

After the Android SDK Tool R19, Export encountered the issue of XXX is not translated in yyy, zzz.

For example, "Auto_name" is not translated in En, zh_cn.

This is because the ANDROID SDK Tool changes the android_lint_complete_regions to need to be checked.

How to solve it?

In fact, the above hints have given us the answer. One is "fix these before running Export" and the other is "turn off ' Run full error check when exporting app '"

Here's how:

First say the latter: "Turn off ' Run full error check when exporting app '"

(1) Open preference in Eclipse, press action:

(2) say the former: "Fix these before running Export"

The operation is as follows:

Double-click Select 4, and a description of the problem appears on the left side of 5, as follows:

Box also gives us three ways to solve the problem.
That
1 If The string should not is translated, you can add the attribute translatable= "false" on the <string> element,

This method is only suitable for a small number of cases.

2 "If the number of strings is large, it can be cumbersome, and another method may be used:

Or you can define all your non-translatable strings in a resource file called Donottranslate.xml.

That is, we can unify all the strings that do not need to be non-translatable into a file called Donottranslate.xml.

Create a new Donottranslate.xml file in values and put a string that does not need to be non-translatable.

Donottranslate.xml:

<span style= "FONT-SIZE:14PX;" ><?xml version= "1.0" encoding= "Utf-8"?><resources> <string    name= "App_name" >UMengDemo< /string>    <string name= "action_settings" >Settings</string>    <string name= "Sharepic_text" > Share local images </string></span><pre name= "code" class= "HTML" style= "TEXT-INDENT:0.10000000149011612PX;" ><span style= "FONT-SIZE:14PX;" ></resources></span>

3 "Or, you can ignore the issue with a tools:ignore=" missingtranslation "attribute.

The third method is to ignore this problem directly with the tools:ignore= "Missingtranslation" attribute

After the above operation is completed, it is best to choose "Clean" the project, the method is as follows:

This will solve the above problems.

Original link: 39120415

The

"Go" Android app is packaged with an error: "XXX" is not translated in "AF" (Afrikaans), "AM" (Amharic), "Ar" (Arabic) ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: