Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
MissingTranslation and ExtraTranslation error on Android build
-
Hi,
I get this error when trying to build for release (debug builds work fine). I am using the Camera, BarcodeScanner and File Transfer plugins. Can someone point me in the right direction to fix this? I’m using the Monaca online IDE. I searched and there were suggestions to add strings.xml with the following, but I don’t know where to put it. :
<?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> Build Error: Error: Sandbox Exec Error: [ 注意:一部の入力ファイルは非推奨のAPIを使用またはオーバーライドしています。 注意:詳細は、-Xlint:deprecationオプションを指定して再コンパイルしてください。 注意:一部の入力ファイルは非推奨のAPIを使用またはオーバーライドしています。 注意:詳細は、-Xlint:deprecationオプションを指定して再コンパイルしてください。 注意:入力ファイルの操作のうち、未チェックまたは安全ではないものがあります。 注意:詳細は、-Xlint:uncheckedオプションを指定して再コンパイルしてください。 /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values/arrays.xml:3: Error: "country_codes" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation] <string-array name="country_codes"> ~~~~~~~~~~~~~~~~~~~~ /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values/strings.xml:3: Error: "app_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation] <string name="app_name">Macoocoo Match Card Upload</string> ~~~~~~~~~~~~~~~ /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values/strings.xml:4: Error: "launcher_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation] <string name="launcher_name">@string/app_name</string> ~~~~~~~~~~~~~~~~~~~~ /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values/strings.xml:5: Error: "activity_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation] <string name="activity_name">@string/launcher_name</string> ~~~~~~~~~~~~~~~~~~~~ Explanation for issues of type "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.) /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-ar/strings.xml:64: Error: "menu_settings" is translated here but not found in default locale [ExtraTranslation] <string name="menu_settings">إعدادات</string> ~~~~~~~~~~~~~~~~~~~~ /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-bg/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-ca/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-cs/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-da/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-de/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-el/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-es/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-eu/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-fi/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-fr/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-he/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-hi/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-hu/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-id/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-it/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-iw/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-ja/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-ko/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-nl/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-pl/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-pt/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-ru/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-sk/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-sl/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-sv/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-tr/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-zh-rCN/strings.xml:64: Also translated here /private/tmp/monaca/590541e6803451170c641489/project/platforms/android/res/values-zh-rTW/strings.xml:64: Also translated here Explanation for issues of type "ExtraTranslation": If a string appears in a specific language translation file, but there is no corresponding string in the default locale, then this string is probably unused. (It's technically possible that your application is only intended to run in a specific locale, but it's still a good idea to provide a fallback.). Note that these strings can lead to crashes if the string is looked up on any locale not providing a translation, so it's important to clean them up. 5 errors, 0 warnings
Best regards
Hebbs
-
I resolved the issue. There was an additional error lower with a problem with access to the keystore. Nothing I could do to fix this until I exported the project, deleted the project, then imported the zip file as a new project. Then all the errors went away.