Skip to content

Commit 24f7bbf

Browse files
[Xamarin.Android.Build.Tasks] Add XA1018 & XA4228 for l10n (#4572)
Context: 0342fe5 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/ Add XA1018 and XA4228 codes for existing build messages, and move the message strings into the `.resx` file so that they are localizable. Other changes: Use the XPath selector `//activity-alias/@android:targetActivity` in the message for XA4228 to minimize ambiguity and make the message easier to translate.
1 parent dd930c0 commit 24f7bbf

20 files changed

+208
-3
lines changed

Documentation/guides/messages/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ ms.date: 01/24/2020
8686
+ XA1015: More than one Android Wear project is specified as the paired project. It can be at most one.
8787
+ XA1016: Target Wear application's project '{project}' does not specify required 'AndroidManifest' project property.
8888
+ XA1017: Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.
89+
+ XA1018: Specified AndroidManifest file does not exist: {file}.
8990

9091
## XA2xxx: Linker
9192

@@ -125,6 +126,7 @@ ms.date: 01/24/2020
125126
+ XA4224: Malformed full class name '{name}'. Missing class name.
126127
+ XA4225: Widget '{widget}' in layout '{layout}' has multiple instances with different types. The property type will be set to: {type}
127128
+ XA4226: Resource item '{file}' does not have the required metadata item '{metadataName}'.
129+
+ XA4228: Unable to find specified //activity-alias/@android:targetActivity: '{targetActivity}'
128130
+ XA4300: Native library '{library}' will not be bundled because it has an unsupported ABI.
129131
+ [XA4301](xa4301.md): Apk already contains the item `xxx`.
130132
+ [XA4302](xa4302.md): Unhandled exception merging \`AndroidManifest.xml\`: {ex}

src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Xamarin.Android.Build.Tasks/Properties/Resources.resx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,11 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
344344
<value>Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</value>
345345
<comment>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
346346
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</comment>
347+
</data>
348+
<data name="XA1018" xml:space="preserve">
349+
<value>Specified AndroidManifest file does not exist: {0}.</value>
350+
<comment>The following are literal names and should not be translated: AndroidManifest
351+
{0} - The path of the specified AndroidManifest file</comment>
347352
</data>
348353
<data name="XA2000" xml:space="preserve">
349354
<value>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</value>
@@ -510,6 +515,11 @@ In this mesage, the term "layout" means an Android UI layout.
510515
<value>Resource item '{0}' does not have the required metadata item '{1}'.</value>
511516
<comment>{0} - The name of the Android layout resource file
512517
{1} - The name of the metadata item</comment>
518+
</data>
519+
<data name="XA4228" xml:space="preserve">
520+
<value>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</value>
521+
<comment>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
522+
{0} - The specified targetActivity name</comment>
513523
</data>
514524
<data name="XA4300" xml:space="preserve">
515525
<value>Native library '{0}' will not be bundled because it has an unsupported ABI.</value>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
277277
<target state="new">Target Wear application's AndroidManifest.xml does not specify required 'package' attribute.</target>
278278
<note>The following are literal names and should not be translated: Wear, AndroidManifest.xml, 'package'
279279
"Wear" is a short version of the full product name "Wear OS" and so should not be translated.</note>
280+
</trans-unit>
281+
<trans-unit id="XA1018">
282+
<source>Specified AndroidManifest file does not exist: {0}.</source>
283+
<target state="new">Specified AndroidManifest file does not exist: {0}.</target>
284+
<note>The following are literal names and should not be translated: AndroidManifest
285+
{0} - The path of the specified AndroidManifest file</note>
280286
</trans-unit>
281287
<trans-unit id="XA2000">
282288
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.</source>
@@ -479,6 +485,12 @@ In this mesage, the term "layout" means an Android UI layout.
479485
<target state="new">Resource item '{0}' does not have the required metadata item '{1}'.</target>
480486
<note>{0} - The name of the Android layout resource file
481487
{1} - The name of the metadata item</note>
488+
</trans-unit>
489+
<trans-unit id="XA4228">
490+
<source>Unable to find specified //activity-alias/@android:targetActivity: '{0}'</source>
491+
<target state="new">Unable to find specified //activity-alias/@android:targetActivity: '{0}'</target>
492+
<note>The following are literal names and should not be translated: //activity-alias/@android:targetActivity
493+
{0} - The specified targetActivity name</note>
482494
</trans-unit>
483495
<trans-unit id="XA4300">
484496
<source>Native library '{0}' will not be bundled because it has an unsupported ABI.</source>

0 commit comments

Comments
 (0)