rishuk51 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Using Android Analytics in multi-language app causes MissingTranslation Lint errors #733

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Name of affected component: Mobile Tracking

Name of related library and version, if applicable (e.g. Android, iOS,
Snippets, etc.): Android , app dependency: 
'com.google.android.gms:play-services-analytics:7.3.0', buildscript dependency: 
'com.google.gms:google-services:1.3.1'

Issue summary: Using Android Analytics in a multi-language app causes 
MissingTranslation Lint errors during build because the keys 'ga_trackingId' 
and 'gcm_defaultSenderId' are not translated to other languages AND not marked 
as untranslatable. 

Steps to reproduce issue:
1. Create app with multiple languages
2. Add Google Android Analytics
3. Compile

Expected output: Clean build.

Actual results:
**app build path 
removed**/build/generated/res/google-services/clientServerdemo03/release/values/
values.xml:3: Error: "ga_trackingId" is not translated in "nl" (Dutch) 
[MissingTranslation]
    <string name="ga_trackingId"> ** REMOVED ** </string>
            ~~~~~~~~~~~~~~~~~~~~
**app build path 
removed**/build/generated/res/google-services/clientServerdemo03/release/values/
values.xml:4: Error: "gcm_defaultSenderId" is not translated in "nl" (Dutch) 
[MissingTranslation]
    <string name="gcm_defaultSenderId"> ** REMOVED ** </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.)

Original issue reported on code.google.com by aaa...@gmail.com on 11 Sep 2015 at 7:57