diff --git a/.gitattributes b/.gitattributes index 4831d8be1..fa7720b69 100644 --- a/.gitattributes +++ b/.gitattributes @@ -19,6 +19,8 @@ *.Designer.cs eol=crlf *.cs text +*.resx text +*.xlf text *.xml text *.md text Makefile eol=lf diff --git a/Configuration.props b/Configuration.props index 7eaf8110c..2895a5bc4 100644 --- a/Configuration.props +++ b/Configuration.props @@ -175,6 +175,11 @@ $(ManagedRuntime) $(ManagedRuntimeArgs) "$(RemapAssemblyRefToolExecutable)" + + cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant + true + + <_Runtime Condition=" '$(HostOS)' != 'Windows' ">$(ManagedRuntime) $(ManagedRuntimeArgs) diff --git a/Documentation/README.md b/Documentation/README.md index 23fa32810..cb1d20c0a 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -39,6 +39,7 @@ * [Using Your Build](workflow/UsingYourBuild.md) * [Jenkins Build Artifacts](workflow/JenkinsBuildArtifacts.md) * [Development tips and native debugging](workflow/DevelopmentTips.md) + * [Localization](workflow/Localization.md) # Coding Guidelines diff --git a/Documentation/images/resources-editor-xa0000.png b/Documentation/images/resources-editor-xa0000.png new file mode 100644 index 000000000..1ebb22762 Binary files /dev/null and b/Documentation/images/resources-editor-xa0000.png differ diff --git a/Documentation/workflow/Localization.md b/Documentation/workflow/Localization.md new file mode 100644 index 000000000..003fc31ce --- /dev/null +++ b/Documentation/workflow/Localization.md @@ -0,0 +1,73 @@ +# Localization + +All new Xamarin.Android MSBuild error or warning messages should be localizable, +so when adding a new message, follow these steps: + + 1. Add the new message to + `src/Xamarin.Android.Build.Tasks/Properties/Resources.resx`. Use the error + or warning code as the resource name. For example, for `XA0000`, use + `XA0000` as the name: + + ![Managed Resources Editor with XA0000 as the name for a + resource][resources-editor] + + Be sure to use Visual Studio or Visual Studio for Mac to edit the `.resx` + file so that the `ResXFileCodeGenerator` tool will run and update the + corresponding `Resources.Designer.cs` file. + + 2. Use the generated property from `Resources.Designer.cs` in the + `LogCodedError()` and `LogCodedWarning()` calls: + + ```csharp + Log.LogCodedError ("XA0000", Properties.Resources.XA0000); + ``` + + 3. After adding the new message, build `Xamarin.Android.Build.Tasks.csproj` + locally. This will run the targets from [dotnet/xliff-tasks][xliff-tasks] + to update the `.xlf` [XLIFF][xliff] localization files with the latest + changes from the `.resx` file. + + 4. Include the changes to the`.resx` file as well as the generated changes to + the `Resources.Designer.cs` file and the `.xlf` files in the commit. + +## Guidelines + + * When an error or warning code is used with more than one output string, use + semantically meaningful suffixes to distinguish the resource names. As a + made-up example: + + ```xml + + Invalid files. + + + Invalid directories. + + ``` + + * To include values of variables in the message, use numbered format items + like `{0}` and `{1}` rather than string interpolation or string + concatenation. + + The `.resx` infrastructure does not interoperate with C# 6 string + interpolation. + + String concatenation should also be avoided because it means splitting up + the message across multiple string resources, which makes it more + complicated to provide appropriate context to the translators. + + * Use the comments field in the `.resx` file to provide additional context to + the translators. For example, if a format item like `{0}` needs additional + explanation, add a comment: + + ``` + {0} - The managed type name + ``` + + For a few more examples, see the dotnet/sdk repo: + + https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/Resources/Strings.resx + +[resources-editor]: ../images/resources-editor-xa0000.png +[xliff-tasks]: https://github.com/dotnet/xliff-tasks +[xliff]: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html diff --git a/NuGet.config b/NuGet.config index 33345bcfe..bf21c4d2f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,6 +3,7 @@ + \ No newline at end of file diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 46cac142d..cb40baedc 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -37,6 +37,8 @@ steps: displayName: nuget restore Xamarin.Android solutions inputs: restoreSolution: '**/Xamarin.Android*.sln' + feedsToUse: config + nugetConfigPath: NuGet.config - task: MSBuild@1 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index 9cdfc0c9a..969ed663e 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -1,6 +1,7 @@ + @@ -195,6 +196,7 @@ <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Bindings.targets" /> <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Build.Tasks.dll" /> <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Build.Tasks.pdb" /> + <_MSBuildFiles Include="@(_LocalizationLanguages->'$(MSBuildSrcDir)\%(Identity)\Xamarin.Android.Build.Tasks.resources.dll')" /> <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.BuildInfo.txt" /> <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Cecil.dll" /> <_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Cecil.pdb" /> diff --git a/build-tools/scripts/LocalizationLanguages.projitems b/build-tools/scripts/LocalizationLanguages.projitems new file mode 100644 index 000000000..c59c0cd78 --- /dev/null +++ b/build-tools/scripts/LocalizationLanguages.projitems @@ -0,0 +1,5 @@ + + + <_LocalizationLanguages Include="$(XlfLanguages)" /> + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs new file mode 100644 index 000000000..a623fc4c1 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Xamarin.Android.Tasks.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Xamarin.Android.Tasks.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.. + /// + internal static string XA4214 { + get { + return ResourceManager.GetString("XA4214", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to References to the type `{0}` will refer to `{0}, {1}`.. + /// + internal static string XA4214_Result { + get { + return ResourceManager.GetString("XA4214_Result", resourceCulture); + } + } + } +} diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx new file mode 100644 index 000000000..96ba05576 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf new file mode 100644 index 000000000..5b70d8b48 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf new file mode 100644 index 000000000..9f9427fec --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf new file mode 100644 index 000000000..37b2fd567 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf new file mode 100644 index 000000000..82c7982d5 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf new file mode 100644 index 000000000..bb86d18d3 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf new file mode 100644 index 000000000..9069103c3 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf new file mode 100644 index 000000000..63fa0be61 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf new file mode 100644 index 000000000..0a4ffa75b --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf new file mode 100644 index 000000000..e27d677f0 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf new file mode 100644 index 000000000..b4a7a4602 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf new file mode 100644 index 000000000..65781e402 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf new file mode 100644 index 000000000..558f25dc6 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf new file mode 100644 index 000000000..2618f7ced --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf @@ -0,0 +1,20 @@ + + + + + + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical. + {0} - The managed type name +{1} - Comma-separated list of all the assemblies where the managed type exists + + + References to the type `{0}` will refer to `{0}, {1}`. + References to the type `{0}` will refer to `{0}, {1}`. + The phrase "`{0}, {1}`" does not need to be translated. +{0} - The managed type name +{1} - The the name of the library that contains the type + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs index a482b0c55..35453d5eb 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs @@ -220,13 +220,8 @@ namespace Xamarin.Android.Tasks } foreach (var kvp in managedConflicts) { - Log.LogCodedWarning ( - "XA4214", - "The managed type `{0}` exists in multiple assemblies: {1}. " + - "Please refactor the managed type names in these assemblies so that they are not identical.", - kvp.Key, - string.Join (", ", kvp.Value)); - Log.LogCodedWarning ("XA4214", "References to the type `{0}` will refer to `{0}, {1}`.", kvp.Key, kvp.Value [0]); + Log.LogCodedWarning ("XA4214", Properties.Resources.XA4214, kvp.Key, string.Join (", ", kvp.Value)); + Log.LogCodedWarning ("XA4214", Properties.Resources.XA4214_Result, kvp.Key, kvp.Value [0]); } foreach (var kvp in javaConflicts) { diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj index bbd668e46..f0c6bec6b 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj @@ -1,6 +1,7 @@ + Debug AnyCPU @@ -16,6 +17,7 @@ True + @@ -186,6 +188,11 @@ + + True + True + Resources.resx + @@ -592,6 +599,14 @@ + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + <_MonoAndroidEnum Include="$(AndroidGeneratedClassDirectory)\Android.Content.PM.LaunchMode.cs" /> <_MonoAndroidEnum Include="$(AndroidGeneratedClassDirectory)\Android.Content.PM.ScreenOrientation.cs" /> @@ -761,4 +776,5 @@ + diff --git a/src/Xamarin.Android.Build.Tasks/packages.config b/src/Xamarin.Android.Build.Tasks/packages.config index 50cc584ff..7e11ec8cf 100644 --- a/src/Xamarin.Android.Build.Tasks/packages.config +++ b/src/Xamarin.Android.Build.Tasks/packages.config @@ -26,4 +26,5 @@ + \ No newline at end of file