diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..22983d6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.Designer.cs eol=crlf +*.resx text +*.xlf text \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6b2a147..7a55b27 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,6 +31,8 @@ jobs: displayName: 'NuGet Restore' inputs: restoreSolution: Xamarin.Android.Tools.sln + feedsToUse: config + nugetConfigPath: NuGet.config - task: MSBuild@1 displayName: 'Build solution Xamarin.Android.Tools.sln' inputs: diff --git a/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs b/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs index 9a72a79..52437ad 100644 --- a/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs +++ b/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs @@ -11,6 +11,8 @@ using System.Xml; using System.Xml.Linq; +using Xamarin.Android.Tools.AndroidSdk.Properties; + namespace Xamarin.Android.Tools { public class JdkInfo { @@ -341,7 +343,7 @@ static IEnumerable GetMacOSMicrosoftJdkPaths () jdk = new JdkInfo (path, locator); } catch (Exception e) { - logger (TraceLevel.Warning, $"The directory `{path}`, via locator `{locator}`, is not a valid JDK directory: {e.Message}"); + logger (TraceLevel.Warning, string.Format (Resources.InvalidJdkDirectory_path_locator_message, path, locator, e.Message)); logger (TraceLevel.Verbose, e.ToString ()); } return jdk; diff --git a/src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs b/src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs index 19965e2..d002730 100644 --- a/src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs +++ b/src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs @@ -123,8 +123,11 @@ public static Task ExecuteToolAsync (string exe, Func +// 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.Tools.AndroidSdk.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.Tools.AndroidSdk.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 An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2}. + /// + internal static string InvalidJdkDirectory_path_locator_message { + get { + return ResourceManager.GetString("InvalidJdkDirectory_path_locator_message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception occurred while reading configuration file '{0}'. Exception: {1}. + /// + internal static string InvalidMonodroidConfigFile_path_message { + get { + return ResourceManager.GetString("InvalidMonodroidConfigFile_path_message", resourceCulture); + } + } + } +} diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx b/src/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx new file mode 100644 index 0000000..4e90d1a --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.cs.xlf new file mode 100644 index 0000000..4ee39f8 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.cs.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.de.xlf new file mode 100644 index 0000000..0ef03af --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.de.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.es.xlf new file mode 100644 index 0000000..745a7b1 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.es.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.fr.xlf new file mode 100644 index 0000000..88ef6bd --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.fr.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.it.xlf new file mode 100644 index 0000000..e450f94 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.it.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ja.xlf new file mode 100644 index 0000000..964e5f8 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ja.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ko.xlf new file mode 100644 index 0000000..f9c441f --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ko.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pl.xlf new file mode 100644 index 0000000..124fad0 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pl.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pt-BR.xlf new file mode 100644 index 0000000..948c0ba --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.pt-BR.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ru.xlf new file mode 100644 index 0000000..0b14aed --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.ru.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.tr.xlf new file mode 100644 index 0000000..3406e2d --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.tr.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hans.xlf new file mode 100644 index 0000000..1414a0f --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hans.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hant.xlf new file mode 100644 index 0000000..c4db954 --- /dev/null +++ b/src/Xamarin.Android.Tools.AndroidSdk/Properties/xlf/Resources.zh-Hant.xlf @@ -0,0 +1,22 @@ + + + + + + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + An exception occurred while validating the Java SDK installation in '{0}' that was found while searching the paths from '{1}'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: {2} + +{0} - The path of the invalid installation +{1} - a "contextual" name for where {0} came from: `Preferred Registry` (Windows Registry), `OpenJDK`, `$JAVA_HOME` (environment variable), etc. +{2} - The exception message of the associated exception. + + + An exception occurred while reading configuration file '{0}'. Exception: {1} + An exception occurred while reading configuration file '{0}'. Exception: {1} + +{0} - The path of the file being read. +{1} - The exception message of the associated exception. + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs b/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs index 34836f3..b0bf622 100644 --- a/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs +++ b/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs @@ -8,6 +8,8 @@ using System.Xml; using System.Xml.Linq; +using Xamarin.Android.Tools.AndroidSdk.Properties; + namespace Xamarin.Android.Tools { class AndroidSdkUnix : AndroidSdkBase @@ -232,7 +234,7 @@ internal static XDocument GetUnixConfigFile (Action logger) try { doc = XDocument.Load (file); } catch (Exception ex) { - logger (TraceLevel.Error, "Could not load monodroid configuration file"); + logger (TraceLevel.Error, string.Format (Resources.InvalidMonodroidConfigFile_path_message, file, ex.Message)); logger (TraceLevel.Verbose, ex.ToString ()); // move out of the way and create a new one diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs b/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs index 59b2082..2c826b8 100644 --- a/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs +++ b/src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs @@ -4,6 +4,8 @@ using System.IO; using System.Linq; +using Xamarin.Android.Tools.AndroidSdk.Properties; + namespace Xamarin.Android.Tools { class AndroidSdkWindows : AndroidSdkBase @@ -114,7 +116,7 @@ internal static IEnumerable GetJdkInfos (Action log jdk = new JdkInfo (path, locator); } catch (Exception e) { - logger (TraceLevel.Warning, $"The directory `{path}`, via locator `{locator}`, is not a valid JDK directory: {e.Message}"); + logger (TraceLevel.Warning, string.Format (Resources.InvalidJdkDirectory_path_locator_message, path, locator, e.Message)); logger (TraceLevel.Verbose, e.ToString ()); } return jdk; diff --git a/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj b/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj index bae6585..3d1fee5 100644 --- a/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj +++ b/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj @@ -16,6 +16,11 @@ Xamarin;Xamarin.Android + + cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant + true + + @@ -29,6 +34,7 @@ all runtime; build; native; contentfiles; analyzers + @@ -37,6 +43,21 @@ + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + PreserveNewest