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/Directory.Build.props b/Directory.Build.props index 70cc83903..f9063cef7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,6 +5,12 @@ Debug <_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\ + + + cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant + true + + - + + + + + diff --git a/src/Java.Interop.Localization/Java.Interop.Localization.csproj b/src/Java.Interop.Localization/Java.Interop.Localization.csproj new file mode 100644 index 000000000..0e0466f99 --- /dev/null +++ b/src/Java.Interop.Localization/Java.Interop.Localization.csproj @@ -0,0 +1,26 @@ + + + + netstandard2.0 + + + + + + + + + True + True + Resources.resx + + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + diff --git a/src/Java.Interop.Localization/Resources.Designer.cs b/src/Java.Interop.Localization/Resources.Designer.cs new file mode 100644 index 000000000..2dbe12d3f --- /dev/null +++ b/src/Java.Interop.Localization/Resources.Designer.cs @@ -0,0 +1,387 @@ +//------------------------------------------------------------------------------ +// +// 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 Java.Interop.Localization { + 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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Java.Interop.Localization.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Failed to remove old constants: {0}.. + /// + public static string Generator_BG4000 { + get { + return ResourceManager.GetString("Generator_BG4000", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to process enum mapping. Text line: {0}.. + /// + public static string Generator_BG4100 { + get { + return ResourceManager.GetString("Generator_BG4100", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error during processing metadata fixup: {0}.. + /// + public static string Generator_BG4200 { + get { + return ResourceManager.GetString("Generator_BG4200", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid XPath specification: {0}.. + /// + public static string Generator_BG4300 { + get { + return ResourceManager.GetString("Generator_BG4300", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target attribute name is not specified for path: {0}.. + /// + public static string Generator_BG4307 { + get { + return ResourceManager.GetString("Generator_BG4307", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example.. + /// + public static string Generator_BG4400 { + get { + return ResourceManager.GetString("Generator_BG4400", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'.. + /// + public static string Generator_BG4500 { + get { + return ResourceManager.GetString("Generator_BG4500", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected class child {0}.. + /// + public static string Generator_BG8101 { + get { + return ResourceManager.GetString("Generator_BG8101", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Class '{0}' has unknown base type '{1}'.. + /// + public static string Generator_BG8102 { + get { + return ResourceManager.GetString("Generator_BG8102", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Class '{0}' has invalid base type '{1}'.. + /// + public static string Generator_BG8103 { + get { + return ResourceManager.GetString("Generator_BG8103", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to parse assembly '{0}': {1}.. + /// + public static string Generator_BG8200 { + get { + return ResourceManager.GetString("Generator_BG8200", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For constructor '{0}', could not find enclosing type '{1}'.. + /// + public static string Generator_BG8300 { + get { + return ResourceManager.GetString("Generator_BG8300", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected field type `{0}` ({1}).. + /// + public static string Generator_BG8400 { + get { + return ResourceManager.GetString("Generator_BG8400", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}'). + /// + public static string Generator_BG8401_Method { + get { + return ResourceManager.GetString("Generator_BG8401_Method", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}'). + /// + public static string Generator_BG8401_NestedType { + get { + return ResourceManager.GetString("Generator_BG8401_NestedType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}'). + /// + public static string Generator_BG8401_Property { + get { + return ResourceManager.GetString("Generator_BG8401_Property", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}'). + /// + public static string Generator_BG8402 { + get { + return ResourceManager.GetString("Generator_BG8402", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected child element of '<interface>': '{0}'.. + /// + public static string Generator_BG8500 { + get { + return ResourceManager.GetString("Generator_BG8500", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No event name provided in '{0}.{1}'.. + /// + public static string Generator_BG8501 { + get { + return ResourceManager.GetString("Generator_BG8501", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalidating '{0}' and all its nested types because some of its interfaces were invalid.. + /// + public static string Generator_BG8502 { + get { + return ResourceManager.GetString("Generator_BG8502", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalidating '{0}' and all its nested types because some of its methods were invalid.. + /// + public static string Generator_BG8503 { + get { + return ResourceManager.GetString("Generator_BG8503", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file.. + /// + public static string Generator_BG8504 { + get { + return ResourceManager.GetString("Generator_BG8504", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file.. + /// + public static string Generator_BG8506 { + get { + return ResourceManager.GetString("Generator_BG8506", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid XML file '{0}': {1}.. + /// + public static string Generator_BG8600 { + get { + return ResourceManager.GetString("Generator_BG8600", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No '<package>' elements found.. + /// + public static string Generator_BG8601 { + get { + return ResourceManager.GetString("Generator_BG8601", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected root child node: '<{0}>'.. + /// + public static string Generator_BG8602 { + get { + return ResourceManager.GetString("Generator_BG8602", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected '<package>' child node: '<{0}>'.. + /// + public static string Generator_BG8603 { + get { + return ResourceManager.GetString("Generator_BG8603", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find top ancestor type '{0}' for nested type '{1}'.. + /// + public static string Generator_BG8604 { + get { + return ResourceManager.GetString("Generator_BG8604", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown return type '{0}' for member '{1}'.. + /// + public static string Generator_BG8700 { + get { + return ResourceManager.GetString("Generator_BG8700", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid return type '{0}' for member '{1}'.. + /// + public static string Generator_BG8701 { + get { + return ResourceManager.GetString("Generator_BG8701", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown parameter type '{0}' for member '{1}'.. + /// + public static string Generator_BG8800 { + get { + return ResourceManager.GetString("Generator_BG8800", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid parameter type '{0}' for member '{1}'.. + /// + public static string Generator_BG8801 { + get { + return ResourceManager.GetString("Generator_BG8801", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Metadata.xml element '{0}' matched no nodes.. + /// + public static string Generator_BG8A00 { + get { + return ResourceManager.GetString("Generator_BG8A00", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown generic argument constraint type '{0}' for member '{1}'.. + /// + public static string Generator_BG8B00 { + get { + return ResourceManager.GetString("Generator_BG8B00", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find base interface '{1}' for type '{0}'.. + /// + public static string Generator_BG8C00 { + get { + return ResourceManager.GetString("Generator_BG8C00", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For type '{0}', base interface '{1}' is invalid.. + /// + public static string Generator_BG8C01 { + get { + return ResourceManager.GetString("Generator_BG8C01", resourceCulture); + } + } + } +} diff --git a/src/Java.Interop.Localization/Resources.resx b/src/Java.Interop.Localization/Resources.resx new file mode 100644 index 000000000..0d32774f0 --- /dev/null +++ b/src/Java.Interop.Localization/Resources.resx @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.cs.xlf b/src/Java.Interop.Localization/xlf/Resources.cs.xlf new file mode 100644 index 000000000..984185654 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.cs.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.de.xlf b/src/Java.Interop.Localization/xlf/Resources.de.xlf new file mode 100644 index 000000000..21038fd9c --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.de.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.es.xlf b/src/Java.Interop.Localization/xlf/Resources.es.xlf new file mode 100644 index 000000000..6ad566232 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.es.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.fr.xlf b/src/Java.Interop.Localization/xlf/Resources.fr.xlf new file mode 100644 index 000000000..fbb9dbc20 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.fr.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.it.xlf b/src/Java.Interop.Localization/xlf/Resources.it.xlf new file mode 100644 index 000000000..a01a280e3 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.it.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.ja.xlf b/src/Java.Interop.Localization/xlf/Resources.ja.xlf new file mode 100644 index 000000000..a0ca3cdeb --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.ja.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.ko.xlf b/src/Java.Interop.Localization/xlf/Resources.ko.xlf new file mode 100644 index 000000000..e014c022b --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.ko.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.pl.xlf b/src/Java.Interop.Localization/xlf/Resources.pl.xlf new file mode 100644 index 000000000..8c9d626a7 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.pl.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.pt-BR.xlf b/src/Java.Interop.Localization/xlf/Resources.pt-BR.xlf new file mode 100644 index 000000000..e97b8b69d --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.pt-BR.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.ru.xlf b/src/Java.Interop.Localization/xlf/Resources.ru.xlf new file mode 100644 index 000000000..a2bc5b989 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.ru.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.tr.xlf b/src/Java.Interop.Localization/xlf/Resources.tr.xlf new file mode 100644 index 000000000..57c77c0c8 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.tr.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.zh-Hans.xlf b/src/Java.Interop.Localization/xlf/Resources.zh-Hans.xlf new file mode 100644 index 000000000..023195655 --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.zh-Hans.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/src/Java.Interop.Localization/xlf/Resources.zh-Hant.xlf b/src/Java.Interop.Localization/xlf/Resources.zh-Hant.xlf new file mode 100644 index 000000000..83a94133b --- /dev/null +++ b/src/Java.Interop.Localization/xlf/Resources.zh-Hant.xlf @@ -0,0 +1,213 @@ + + + + + + Failed to remove old constants: {0}. + Failed to remove old constants: {0}. + {0} - The list of constants that could not be removed. +In this message, the term "constants" refers to class or interface members that have constant values. + + + Failed to process enum mapping. Text line: {0}. + Failed to process enum mapping. Text line: {0}. + {0} - The line that could not be processed. + + + Error during processing metadata fixup: {0}. + Error during processing metadata fixup: {0}. + {0} - The error encountered. + + + Invalid XPath specification: {0}. + Invalid XPath specification: {0}. + {0} - The invalid XPath line. + + + Target attribute name is not specified for path: {0}. + Target attribute name is not specified for path: {0}. + {0} - The invalid XPath line. + + + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example. + The following are literal names and should not be translated: global::, Metadata.xml. + + + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'. + The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'. + + + Unexpected class child {0}. + Unexpected class child {0}. + {0} - The unexpected child class. + + + Class '{0}' has unknown base type '{1}'. + Class '{0}' has unknown base type '{1}'. + {0}, {1} - .NET types. + + + Class '{0}' has invalid base type '{1}'. + Class '{0}' has invalid base type '{1}'. + {0}, {1} - .NET types. + + + Failed to parse assembly '{0}': {1}. + Failed to parse assembly '{0}': {1}. + {0} - Error .NET assembly. +{1} - The error encountered. + + + For constructor '{0}', could not find enclosing type '{1}'. + For constructor '{0}', could not find enclosing type '{1}'. + {0} - .NET constructor method. +{1} - .NET type. + + + Unexpected field type `{0}` ({1}). + Unexpected field type `{0}` ({1}). + {0} - .NET type. +{1} - .NET field signature. + + + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}') + {0} - .NET type. +{1} - .NET field name. +{2} - Java type. + + + Unexpected child element of '<interface>': '{0}'. + Unexpected child element of '<interface>': '{0}'. + {0} - XML element name. +<interface> should not be translated. + + + No event name provided in '{0}.{1}'. + No event name provided in '{0}.{1}'. + {0} - .NET type name +{1} - .NET member. + + + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + Invalidating '{0}' and all its nested types because some of its interfaces were invalid. + {0} - .NET type name. + + + Invalidating '{0}' and all its nested types because some of its methods were invalid. + Invalidating '{0}' and all its nested types because some of its methods were invalid. + {0} - .NET type name. + + + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file. + {0} - .NET type name +{1} - .NET member. +The following terms should not be translated: eventName, argsType, Metadata.xml. + + + Invalid XML file '{0}': {1}. + Invalid XML file '{0}': {1}. + {0} - File name +{1} - The error encountered. + + + No '<package>' elements found. + No '<package>' elements found. + The following terms should not be translated: <package>. + + + Unexpected root child node: '<{0}>'. + Unexpected root child node: '<{0}>'. + {0} - XML element name. + + + Unexpected '<package>' child node: '<{0}>'. + Unexpected '<package>' child node: '<{0}>'. + {0} - XML element name. +The following terms should not be translated: <package>. + + + Could not find top ancestor type '{0}' for nested type '{1}'. + Could not find top ancestor type '{0}' for nested type '{1}'. + {0}, {1} - .NET types. + + + Unknown return type '{0}' for member '{1}'. + Unknown return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid return type '{0}' for member '{1}'. + Invalid return type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Unknown parameter type '{0}' for member '{1}'. + Unknown parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Invalid parameter type '{0}' for member '{1}'. + Invalid parameter type '{0}' for member '{1}'. + {0} - Java type. +{1} - .NET member. + + + Metadata.xml element '{0}' matched no nodes. + Metadata.xml element '{0}' matched no nodes. + {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"') +The following terms should not be translated: Metadata.xml. + + + Unknown generic argument constraint type '{0}' for member '{1}'. + Unknown generic argument constraint type '{0}' for member '{1}'. + {0} - .NET type name +{1} - .NET member. + + + Could not find base interface '{1}' for type '{0}'. + Could not find base interface '{1}' for type '{0}'. + {0}, {1} - .NET types. + + + For type '{0}', base interface '{1}' is invalid. + For type '{0}', base interface '{1}' is invalid. + {0}, {1} - .NET types. + + + + \ No newline at end of file diff --git a/tools/generator/CodeGenerationOptions.cs b/tools/generator/CodeGenerationOptions.cs index 9d15cb42e..3fb2eba63 100644 --- a/tools/generator/CodeGenerationOptions.cs +++ b/tools/generator/CodeGenerationOptions.cs @@ -218,7 +218,7 @@ public string GetOutputName (string s) if (s.StartsWith ("params ")) return "params " + GetOutputName (s.Substring ("params ".Length)); if (s.StartsWith ("global::")) - Report.Error (Report.ErrorCodeGenerator + 0, null, "Unexpected \"global::\" specification. This error happens if it is specified in the Metadata API fixup for example."); + Report.LogCodedError (Report.ErrorUnexpectedGlobal); if (!UseGlobal) return s; int idx = s.IndexOf ('<'); diff --git a/tools/generator/CodeGenerator.cs b/tools/generator/CodeGenerator.cs index 54d189aeb..e492d024f 100644 --- a/tools/generator/CodeGenerator.cs +++ b/tools/generator/CodeGenerator.cs @@ -113,7 +113,7 @@ static void Run (CodeGeneratorOptions options, DirectoryAssemblyResolver resolve ProcessReferencedType (td, opt); } } catch (Exception ex) { - Report.Warning (0, Report.WarningCodeGenerator + 0, ex, "failed to parse assembly {0}: {1}", reference, ex.Message); + Report.LogCodedWarning (0, Report.WarningAssemblyParseFailure, ex, reference, ex.Message); } } diff --git a/tools/generator/CodeGeneratorOptions.cs b/tools/generator/CodeGeneratorOptions.cs index 1e2d5926d..b1bb8d283 100644 --- a/tools/generator/CodeGeneratorOptions.cs +++ b/tools/generator/CodeGeneratorOptions.cs @@ -170,7 +170,7 @@ public static CodeGeneratorOptions Parse (string[] args) opts.ApiDescriptionFile = apis [0]; if (opts.SupportDefaultInterfaceMethods && opts.CodeGenerationTarget == CodeGenerationTarget.XamarinAndroid) { - Console.Error.WriteLine (Report.Format (true, Report.ErrorInvalidArgument, "lang-features=default-interface-methods is not compatible with codegen-target=xamarinandroid.")); + Console.Error.WriteLine (Report.FormatCodedMessage (true, Report.ErrorInvalidDIMArgument)); return null; } diff --git a/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs b/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs index 4f3a50253..a1aac094f 100644 --- a/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs +++ b/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Text; +using generator.SourceWriters; using Xamarin.Android.Binder; namespace MonoDroid.Generation @@ -392,11 +393,11 @@ public bool WriteFields (List fields, string indent, GenBase gen, HashSet bool needsProperty = false; foreach (Field f in fields) { if (gen.ContainsName (f.Name)) { - Report.Warning (0, Report.WarningFieldNameCollision, "Skipping {0}.{1}, due to a duplicate field, method or nested type name. {2} (Java type: {3})", gen.FullName, f.Name, gen.HasNestedType (f.Name) ? "(Nested type)" : gen.ContainsProperty (f.Name, false) ? "(Property)" : "(Method)", gen.JavaName); + Report.LogCodedWarning (0, SourceWriterExtensions.GetFieldCollisionMessage (gen, f), gen.FullName, f.Name, gen.JavaName); continue; } if (seen != null && seen.Contains (f.Name)) { - Report.Warning (0, Report.WarningDuplicateField, "Skipping {0}.{1}, due to a duplicate field. (Field) (Java type: {2})", gen.FullName, f.Name, gen.JavaName); + Report.LogCodedWarning (0, Report.WarningDuplicateField, gen.FullName, f.Name, gen.JavaName); continue; } if (f.Validate (opt, gen.TypeParameters, Context)) { @@ -934,11 +935,11 @@ public void WriteInterfaceListenerEventsAndProperties (InterfaceGen @interface, foreach (var method in eventMethods) { string name = method.CalculateEventName (target.ContainsName); if (String.IsNullOrEmpty (name)) { - Report.Warning (0, Report.WarningInterfaceGen + 1, "empty event name in {0}.{1}.", @interface.FullName, method.Name); + Report.LogCodedWarning (0, Report.WarningEmptyEventName, @interface.FullName, method.Name); continue; } if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 4, "event name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", @interface.FullName, method.Name); + Report.LogCodedWarning (0, Report.WarningInvalidEventName, @interface.FullName, method.Name); continue; } var prop = target.Properties.FirstOrDefault (p => p.Setter == method); @@ -995,7 +996,7 @@ public void WriteInterfaceListenerEventOrProperty (InterfaceGen @interface, Meth full_delegate_name += "Handler"; if (m.RetVal.IsVoid || m.IsEventHandlerWithHandledProperty) { if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 5, "event name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", @interface.FullName, name); + Report.LogCodedWarning (0, Report.WarningInvalidEventName2, @interface.FullName, name); return; } else { var mt = target.Methods.Where (method => string.Compare (method.Name, connector_fmt, StringComparison.OrdinalIgnoreCase) == 0 && method.IsListenerConnector).FirstOrDefault (); @@ -1004,7 +1005,7 @@ public void WriteInterfaceListenerEventOrProperty (InterfaceGen @interface, Meth } } else { if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 6, "event property name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", @interface.FullName, name); + Report.LogCodedWarning (0, Report.WarningInvalidEventPropertyName, @interface.FullName, name); return; } writer.WriteLine ("{0}WeakReference{2} weak_implementor_{1};", indent, name, opt.NullableOperator); diff --git a/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs b/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs index f35afe4c5..39c6694a7 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs @@ -46,7 +46,7 @@ public static ClassGen CreateClass (XElement pkg, XElement elem, CodeGenerationO case "typeParameters": break; // handled at GenBaseSupport default: - Report.Warning (0, Report.WarningClassGen + 1, "unexpected class child {0}.", child.Name); + Report.LogCodedWarning (0, Report.WarningUnexpectedChild, child.Name.ToString ()); break; } } @@ -81,7 +81,7 @@ public static Ctor CreateCtor (GenBase declaringType, XElement elem) if (enclosingType == null) { ctor.MissingEnclosingClass = true; - Report.Warning (0, Report.WarningCtor + 0, "For {0}, could not find enclosing type '{1}'.", ctor.Name, expectedEnclosingName); + Report.LogCodedWarning (0, Report.WarningMissingClassForConstructor, ctor.Name, expectedEnclosingName); } else ctor.Parameters.AddFirst (CreateParameterFromClassElement (enclosingType)); } @@ -231,7 +231,7 @@ public static InterfaceGen CreateInterface (XElement pkg, XElement elem, CodeGen case "typeParameters": break; // handled at GenBaseSupport default: - Report.Warning (0, Report.WarningInterfaceGen + 0, "unexpected interface child {0}.", child); + Report.LogCodedWarning (0, Report.WarningUnexpectedInterfaceChild, child.ToString ()); break; } } diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs index f2ca32f6f..1d04a5f76 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs @@ -294,13 +294,13 @@ protected override bool OnValidate (CodeGenerationOptions opt, GenericParameterD base_symbol = IsAnnotation ? opt.SymbolTable.Lookup ("java.lang.Object") : BaseType != null ? opt.SymbolTable.Lookup (BaseType) : null; if (base_symbol == null && FullName != "Java.Lang.Object" && FullName != "System.Object") { - Report.Warning (0, Report.WarningClassGen + 2, "Class {0} has unknown base type {1}.", FullName, BaseType); + Report.LogCodedWarning (0, Report.WarningUnknownBaseType, FullName, BaseType); IsValid = false; return false; } if ((base_symbol != null && !base_symbol.Validate (opt, TypeParameters, context)) || !base.OnValidate (opt, type_params, context)) { - Report.Warning (0, Report.WarningClassGen + 3, "Class {0} has invalid base type {1}.", FullName, BaseType); + Report.LogCodedWarning (0, Report.WarningInvalidBaseType, FullName, BaseType); IsValid = false; return false; } diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Field.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Field.cs index 4d599f4f5..be75bbb2a 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Field.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Field.cs @@ -38,7 +38,7 @@ public bool Validate (CodeGenerationOptions opt, GenericParameterDefinitionList Symbol = opt.SymbolTable.Lookup (TypeName, type_params); if (Symbol == null || !Symbol.Validate (opt, type_params, context)) { - Report.Warning (0, Report.WarningField + 0, "unexpected field type {0} {1}.", TypeName, context.ContextString); + Report.LogCodedWarning (0, Report.WarningUnexpectedFieldType, TypeName, context.ContextString); return false; } diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenBase.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenBase.cs index c971ede66..dc098c96f 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenBase.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenBase.cs @@ -662,9 +662,9 @@ protected virtual bool OnValidate (CodeGenerationOptions opt, GenericParameterDe Interfaces.Add (isym); else { if (isym == null) - Report.Warning (0, Report.WarningGenBase + 0, "For type {0}, base interface {1} does not exist.", FullName, iface_name); + Report.LogCodedWarning (0, Report.WarningBaseInterfaceNotFound, FullName, iface_name); else - Report.Warning (0, Report.WarningGenBase + 0, "For type {0}, base interface {1} is invalid.", FullName, iface_name); + Report.LogCodedWarning (0, Report.WarningBaseInterfaceInvalid, FullName, iface_name); iface_validation_failed = true; } } diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenericParameterDefinition.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenericParameterDefinition.cs index b68aebf3f..d98f88634 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenericParameterDefinition.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenericParameterDefinition.cs @@ -38,7 +38,7 @@ public bool Validate (CodeGenerationOptions opt, GenericParameterDefinitionList foreach (var c in ConstraintExpressions) { var sym = opt.SymbolTable.Lookup (c, type_params); if (sym == null) { - Report.Warning (0, Report.WarningGenericParameterDefinition + 0, "Unknown generic argument constraint type {0} {1}.", c, context.ContextString); + Report.LogCodedWarning (0, Report.WarningUnknownGenericConstraint, c, context.ContextString); validated = true; return false; } diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/InterfaceGen.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/InterfaceGen.cs index f8545a4ce..e4154fb24 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/InterfaceGen.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/InterfaceGen.cs @@ -204,9 +204,9 @@ protected override bool OnValidate (CodeGenerationOptions opt, GenericParameterD if (!base.OnValidate (opt, type_params, context) || iface_validation_failed || MethodValidationFailed) { if (iface_validation_failed) - Report.Warning (0, Report.WarningInterfaceGen + 2, "Invalidating {0} and all nested types because some of its interfaces were invalid.", FullName); + Report.LogCodedWarning (0, Report.WarningInvalidDueToInterfaces, FullName); else if (MethodValidationFailed) - Report.Warning (0, Report.WarningInterfaceGen + 3, "Invalidating {0} and all nested types because some of its methods were invalid.", FullName); + Report.LogCodedWarning (0, Report.WarningInvalidDueToMethods, FullName); foreach (GenBase nest in NestedTypes) nest.Invalidate (); IsValid = false; diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Parameter.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Parameter.cs index dc3c11bce..c4ff3c7c2 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Parameter.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/Parameter.cs @@ -260,11 +260,11 @@ public bool Validate (CodeGenerationOptions opt, GenericParameterDefinitionList { sym = opt.SymbolTable.Lookup (type, type_params); if (sym == null) { - Report.Warning (0, Report.WarningParameter + 0, "Unknown parameter type {0} {1}.", type, context.ContextString); + Report.LogCodedWarning (0, Report.WarningUnknownParameterType, type, context.ContextString); return false; } if (!sym.Validate (opt, type_params, context)) { - Report.Warning (0, Report.WarningParameter + 1, "Invalid parameter type {0} {1}.", type, context.ContextString); + Report.LogCodedWarning (0, Report.WarningInvalidParameterType, type, context.ContextString); return false; } return true; diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ReturnValue.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ReturnValue.cs index 4ec5368a5..484e537ca 100644 --- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ReturnValue.cs +++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ReturnValue.cs @@ -121,11 +121,11 @@ public bool Validate (CodeGenerationOptions opt, GenericParameterDefinitionList { sym = (IsEnumified ? opt.SymbolTable.Lookup (managed_type, type_params) : null) ?? opt.SymbolTable.Lookup (java_type, type_params); if (sym == null) { - Report.Warning (0, Report.WarningReturnValue + 0, "Unknown return type {0} {1}.", java_type, context.ContextString); + Report.LogCodedWarning (0, Report.WarningUnknownReturnType, java_type, context.ContextString); return false; } if (!sym.Validate (opt, type_params, context)) { - Report.Warning (0, Report.WarningReturnValue + 1, "Invalid return type {0} {1}.", java_type, context.ContextString); + Report.LogCodedWarning (0, Report.WarningInvalidReturnType, java_type, context.ContextString); return false; } return true; diff --git a/tools/generator/Java.Interop.Tools.Generator.Transformation/ApiFixup.cs b/tools/generator/Java.Interop.Tools.Generator.Transformation/ApiFixup.cs index fefb3816f..7dc1f38ec 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Transformation/ApiFixup.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Transformation/ApiFixup.cs @@ -87,10 +87,10 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) node.Remove (); else // BG8A00 - Report.Warning (0, Report.WarningApiFixup + 0, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningRemoveNodeMatchedNoNodes, null, metaitem, $""); } catch (XPathException e) { - // BG4A01 - Report.Error (Report.ErrorApiFixup + 1, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4301 + Report.LogCodedError (Report.ErrorRemoveNodeInvalidXPath, e, metaitem, path); } break; case "add-node": @@ -98,16 +98,16 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) var nodes = api_doc.XPathSelectElements (path); if (!nodes.Any ()) // BG8A01 - Report.Warning (0, Report.WarningApiFixup + 1, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningAddNodeMatchedNoNodes, null, metaitem, $""); else { foreach (var node in nodes) node.Add (metaitem.Nodes ()); } } catch (XPathException e) { - // BG4A02 - Report.Error (Report.ErrorApiFixup + 2, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4302 + Report.LogCodedError (Report.ErrorAddNodeInvalidXPath, e, metaitem, path); } - break; + break; case "change-node": try { var nodes = api_doc.XPathSelectElements (path); @@ -122,18 +122,18 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) if (!matched) // BG8A03 - Report.Warning (0, Report.WarningApiFixup + 3, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningChangeNodeTypeMatchedNoNodes, null, metaitem, $""); } catch (XPathException e) { - // BG4A03 - Report.Error (Report.ErrorApiFixup + 3, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4303 + Report.LogCodedError (Report.ErrorChangeNodeInvalidXPath, e, metaitem, path); } break; case "attr": try { string attr_name = metaitem.XGetAttribute ("name"); if (string.IsNullOrEmpty (attr_name)) - // BG4A07 - Report.Error (Report.ErrorApiFixup + 7, null, metaitem, "Target attribute name is not specified for path: {0}", path); + // BG4307 + Report.LogCodedError (Report.ErrorMissingAttrName, null, metaitem, path); var nodes = attr_last_cache != null ? new XElement [] { attr_last_cache } : api_doc.XPathSelectElements (path); int attr_matched = 0; foreach (var n in nodes) { @@ -142,12 +142,12 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) } if (attr_matched == 0) // BG8A04 - Report.Warning (0, Report.WarningApiFixup + 4, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningAttrMatchedNoNodes, null, metaitem, $""); if (attr_matched != 1) attr_last_cache = null; } catch (XPathException e) { - // BG4A04 - Report.Error (Report.ErrorApiFixup + 4, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4304 + Report.LogCodedError (Report.ErrorAttrInvalidXPath, e, metaitem, path); } break; case "move-node": @@ -164,10 +164,10 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) } if (!matched) // BG8A05 - Report.Warning (0, Report.WarningApiFixup + 5, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningMoveNodeMatchedNoNodes, null, metaitem, $""); } catch (XPathException e) { - // BG4A05 - Report.Error (Report.ErrorApiFixup + 5, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4305 + Report.LogCodedError (Report.ErrorMoveNodeInvalidXPath, e, metaitem, path); } break; case "remove-attr": @@ -183,10 +183,10 @@ void Process (XDocument meta_doc, string apiLevelString, int productVersion) if (!matched) // BG8A06 - Report.Warning (0, Report.WarningApiFixup + 6, null, metaitem, " matched no nodes.", path); + Report.LogCodedWarning (0, Report.WarningRemoveAttrMatchedNoNodes, null, metaitem, $""); } catch (XPathException e) { - // BG4A06 - Report.Error (Report.ErrorApiFixup + 6, e, metaitem, "Invalid XPath specification: {0}", path); + // BG4306 + Report.LogCodedError (Report.ErrorRemoveAttrInvalidXPath, e, metaitem, path); } break; } diff --git a/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMap.cs b/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMap.cs index ee11786ff..dc6250bb7 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMap.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMap.cs @@ -65,7 +65,7 @@ void RemoveOldConstants (StreamWriter sw) sw.WriteLine (" ", package, type, member, enu.StartsWith ("I:") ? "interface" : "class"); } catch (Exception ex) { - Report.Error (Report.ErrorEnumMap + 0, "ERROR: failed to remove old comments: " + enu, ex); + Report.LogCodedError (Report.ErrorFailedToRemoveConstants, ex, enu); throw; } } @@ -91,8 +91,8 @@ void FixOldConstants (StreamWriter sw) try { sw.WriteLine (" ", package, type, member, enu.StartsWith ("I:") ? "interface" : "class"); - } catch (Exception) { - Console.Error.WriteLine ("ERROR: failed to remove old comments: " + enu); + } catch (Exception ex) { + Report.LogCodedError (Report.ErrorFailedToRemoveConstants, ex, enu); throw; } } diff --git a/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMappings.cs b/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMappings.cs index 663e46fee..677e174ba 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMappings.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMappings.cs @@ -222,7 +222,7 @@ internal List ParseMethodMappings (TextReader source, int filter_v try { list.Add (new ApiTransform (preserveTypeMode, items)); } catch (Exception ex) { - Report.Error (Report.ErrorEnumMapping + 0, "Failed to process enum mapping. Text line: " + s, ex); + Report.LogCodedError (Report.ErrorFailedToProcessEnumMap, ex, s); throw; } } diff --git a/tools/generator/Java.Interop.Tools.Generator.Transformation/Parser.cs b/tools/generator/Java.Interop.Tools.Generator.Transformation/Parser.cs index 3df44a5a3..3ca272bc3 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Transformation/Parser.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Transformation/Parser.cs @@ -27,7 +27,7 @@ public XDocument Load (string filename) doc = XDocument.Load (filename, LoadOptions.SetBaseUri | LoadOptions.SetLineInfo); } catch (XmlException e) { Report.Verbose (0, "Exception: {0}", e); - Report.Warning (0, Report.WarningParser + 0, e, "Invalid XML file '{0}': {1}", filename, e.Message); + Report.LogCodedWarning (0, Report.WarningInvalidXmlFile, e, filename, e.Message); } return doc; @@ -55,14 +55,14 @@ public List Parse (XDocument doc, IEnumerable fixups, string ap ApiSource = apiFixup.ApiSource; } catch (XmlException ex) { // BG4200 - Report.Error (Report.ErrorParser + 0, ex, "Error during processing metadata fixup: {0}", ex.Message); + Report.LogCodedError (Report.ErrorFailedToProcessMetadata, ex.Message); return null; } var root = doc.Root; if ((root == null) || !root.HasElements) { - Report.Warning (0, Report.WarningParser + 1, "No packages found."); + Report.LogCodedWarning (0, Report.WarningNoPackageElements); return null; } @@ -78,7 +78,7 @@ public List Parse (XDocument doc, IEnumerable fixups, string ap opt.SymbolTable.AddType (elem.XGetAttribute ("name"), sym); continue; default: - Report.Warning (0, Report.WarningParser + 2, "Unexpected child node: {0}.", elem.Name); + Report.LogCodedWarning (0, Report.WarningUnexpectedRootChildNode, elem.Name.ToString ()); break; } } @@ -113,7 +113,7 @@ List ParsePackage (XElement ns, Predicate p) gen = XmlApiImporter.CreateInterface (ns, elem, opt); break; default: - Report.Warning (0, Report.WarningParser + 3, "Unexpected node in package element: {0}.", elem.Name); + Report.LogCodedWarning (0, Report.WarningUnexpectedPackageChildNode, elem.Name.ToString ()); break; } @@ -134,7 +134,7 @@ List ParsePackage (XElement ns, Predicate p) if (by_name.ContainsKey (top_ancestor)) by_name [top_ancestor].AddNestedType (nested [name]); else { - Report.Warning (0, Report.WarningParser + 4, "top ancestor {0} not found for nested type {1}.", top_ancestor, nested [name].FullName); + Report.LogCodedWarning (0, Report.WarningNestedTypeAncestorNotFound, top_ancestor, nested [name].FullName); nested [name].Invalidate (); } } diff --git a/tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs b/tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs index a03f5db6f..fee55891a 100644 --- a/tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs +++ b/tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs @@ -24,12 +24,12 @@ public static bool AddFields (TypeWriter tw, GenBase gen, List fields, Ha foreach (var f in fields) { if (gen.ContainsName (f.Name)) { - Report.Warning (0, Report.WarningFieldNameCollision, "Skipping {0}.{1}, due to a duplicate field, method or nested type name. {2} (Java type: {3})", gen.FullName, f.Name, gen.HasNestedType (f.Name) ? "(Nested type)" : gen.ContainsProperty (f.Name, false) ? "(Property)" : "(Method)", gen.JavaName); + Report.LogCodedWarning (0, GetFieldCollisionMessage (gen, f), gen.FullName, f.Name, gen.JavaName); continue; } if (seen != null && seen.Contains (f.Name)) { - Report.Warning (0, Report.WarningDuplicateField, "Skipping {0}.{1}, due to a duplicate field. (Field) (Java type: {2})", gen.FullName, f.Name, gen.JavaName); + Report.LogCodedWarning (0, Report.WarningDuplicateField, gen.FullName, f.Name, gen.JavaName); continue; } @@ -45,6 +45,16 @@ public static bool AddFields (TypeWriter tw, GenBase gen, List fields, Ha return needsProperty; } + public static Report.LocalizedMessage GetFieldCollisionMessage (GenBase gen, Field f) + { + if (gen.HasNestedType (f.Name)) + return Report.WarningFieldNameCollision_NestedType; + if (gen.ContainsProperty (f.Name, false)) + return Report.WarningFieldNameCollision_Property; + + return Report.WarningFieldNameCollision_Method; + } + public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, InterfaceGen iface, ClassGen target, CodeGenerationOptions opt) { var methods = target.Methods.Concat (target.Properties.Where (p => p.Setter != null).Select (p => p.Setter)); @@ -56,12 +66,12 @@ public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, Inter var name = method.CalculateEventName (target.ContainsName); if (string.IsNullOrEmpty (name)) { - Report.Warning (0, Report.WarningInterfaceGen + 1, "empty event name in {0}.{1}.", iface.FullName, method.Name); + Report.LogCodedWarning (0, Report.WarningEmptyEventName, iface.FullName, method.Name); continue; } if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 4, "event name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", iface.FullName, method.Name); + Report.LogCodedWarning (0, Report.WarningInvalidEventName, iface.FullName, method.Name); continue; } @@ -140,7 +150,7 @@ public static void AddInterfaceListenerEventOrProperty (TypeWriter tw, Interface if (method.RetVal.IsVoid || method.IsEventHandlerWithHandledProperty) { if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 5, "event name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", iface.FullName, name); + Report.LogCodedWarning (0, Report.WarningInvalidEventName2, iface.FullName, name); return; } else { var mt = target.Methods.Where (method => string.Compare (method.Name, connector_fmt, StringComparison.OrdinalIgnoreCase) == 0 && method.IsListenerConnector).FirstOrDefault (); @@ -150,7 +160,7 @@ public static void AddInterfaceListenerEventOrProperty (TypeWriter tw, Interface } } else { if (opt.GetSafeIdentifier (name) != name) { - Report.Warning (0, Report.WarningInterfaceGen + 6, "event property name for {0}.{1} is invalid. `eventName' or `argsType` can be used to assign a valid member name.", iface.FullName, name); + Report.LogCodedWarning (0, Report.WarningInvalidEventPropertyName, iface.FullName, name); return; } diff --git a/tools/generator/SourceWriters/InterfaceMemberAlternativeClass.cs b/tools/generator/SourceWriters/InterfaceMemberAlternativeClass.cs index 9567cee9b..ac2628ead 100644 --- a/tools/generator/SourceWriters/InterfaceMemberAlternativeClass.cs +++ b/tools/generator/SourceWriters/InterfaceMemberAlternativeClass.cs @@ -101,12 +101,12 @@ bool AddInterfaceFields (InterfaceGen iface, List fields, HashSet foreach (var f in fields) { if (iface.ContainsName (f.Name)) { - Report.Warning (0, Report.WarningFieldNameCollision, "Skipping {0}.{1}, due to a duplicate field, method or nested type name. {2} (Java type: {3})", iface.FullName, f.Name, iface.HasNestedType (f.Name) ? "(Nested type)" : iface.ContainsProperty (f.Name, false) ? "(Property)" : "(Method)", iface.JavaName); + Report.LogCodedWarning (0, SourceWriterExtensions.GetFieldCollisionMessage (iface, f), iface.FullName, f.Name, iface.JavaName); continue; } if (seen.Contains (f.Name)) { - Report.Warning (0, Report.WarningDuplicateField, "Skipping {0}.{1}, due to a duplicate field. (Field) (Java type: {2})", iface.FullName, f.Name, iface.JavaName); + Report.LogCodedWarning (0, Report.WarningDuplicateField, iface.FullName, f.Name, iface.JavaName); continue; } diff --git a/tools/generator/Utilities/Report.cs b/tools/generator/Utilities/Report.cs index 4561f043c..63dd1fcfb 100644 --- a/tools/generator/Utilities/Report.cs +++ b/tools/generator/Utilities/Report.cs @@ -1,97 +1,115 @@ using System; -using System.Linq; using System.Xml; using System.Xml.Linq; -using System.Xml.XPath; namespace MonoDroid.Generation { public class Report { - public const int ErrorEnumMap = 0x4000; - public const int ErrorEnumMapping = 0x4100; - public const int ErrorParser = 0x4200; - public const int ErrorApiFixup = 0x4300; - public const int ErrorCodeGenerator = 0x4400; - public const int ErrorInvalidArgument = 0x4500; - public const int WarningClassGen = 0x8100; - public const int WarningCodeGenerator = 0x8200; - public const int WarningCtor = 0x8300; - public const int WarningField = 0x8400; - public const int WarningFieldNameCollision = 0x8401; - public const int WarningDuplicateField = 0x8402; - public const int WarningInterfaceGen = 0x8500; - public const int WarningParser = 0x8600; - public const int WarningReturnValue = 0x8700; - public const int WarningParameter = 0x8800; - public const int WarningGenBaseSupport = 0x8900; - public const int WarningApiFixup = 0x8A00; - public const int WarningGenericParameterDefinition = 0x8B00; - public const int WarningGenBase = 0x8C00; - public const int WarningMethodBase = 0x8D00; - public const int WarningAnnotationsProvider = 0x8E00; - public static int? Verbosity { get; set; } - public static void Error (int errorCode, string format, params object[] args) + public class LocalizedMessage { - Error (errorCode, null, null, -1, -1, format, args); - } + public int Code { get; set; } + public string Value { get; set; } - public static void Error (int errorCode, string sourceFile, int line, int column, string format, params object [] args) - { - Error (errorCode, null, sourceFile, line, column, format, args); + public LocalizedMessage (int code, string value) + { + Code = code; + Value = value; + } } - public static void Error (int errorCode, Exception innerException, string format, params object [] args) - { - Error (errorCode, innerException, null, -1, -1, format, args); - } + public static LocalizedMessage ErrorFailedToRemoveConstants => new LocalizedMessage (4000, Java.Interop.Localization.Resources.Generator_BG4000); + public static LocalizedMessage ErrorFailedToProcessEnumMap => new LocalizedMessage (4100, Java.Interop.Localization.Resources.Generator_BG4100); + public static LocalizedMessage ErrorFailedToProcessMetadata => new LocalizedMessage (4200, Java.Interop.Localization.Resources.Generator_BG4200); + public static LocalizedMessage ErrorRemoveNodeInvalidXPath => new LocalizedMessage (4301, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorAddNodeInvalidXPath => new LocalizedMessage (4302, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorChangeNodeInvalidXPath => new LocalizedMessage (4303, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorAttrInvalidXPath => new LocalizedMessage (4304, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorMoveNodeInvalidXPath => new LocalizedMessage (4305, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorRemoveAttrInvalidXPath => new LocalizedMessage (4306, Java.Interop.Localization.Resources.Generator_BG4300); + public static LocalizedMessage ErrorMissingAttrName => new LocalizedMessage (4307, Java.Interop.Localization.Resources.Generator_BG4307); + public static LocalizedMessage ErrorUnexpectedGlobal => new LocalizedMessage (4400, Java.Interop.Localization.Resources.Generator_BG4400); + public static LocalizedMessage ErrorInvalidDIMArgument => new LocalizedMessage (4500, Java.Interop.Localization.Resources.Generator_BG4500); - public static void Error (int errorCode, Exception innerException, XNode node, string format, params object [] args) - { - Uri uri; - string file = Uri.TryCreate (node.BaseUri, UriKind.Absolute, out uri) ? uri.LocalPath : null; - IXmlLineInfo li = node as IXmlLineInfo; - li = li != null && li.HasLineInfo () ? li : null; - Error (errorCode, innerException, file, li != null ? li.LineNumber : -1, li != null ? li.LinePosition : -1, format, args); - } + public static LocalizedMessage WarningUnexpectedChild => new LocalizedMessage (8101, Java.Interop.Localization.Resources.Generator_BG8101); + public static LocalizedMessage WarningUnknownBaseType => new LocalizedMessage (8102, Java.Interop.Localization.Resources.Generator_BG8102); + public static LocalizedMessage WarningInvalidBaseType => new LocalizedMessage (8103, Java.Interop.Localization.Resources.Generator_BG8103); + public static LocalizedMessage WarningAssemblyParseFailure => new LocalizedMessage (8200, Java.Interop.Localization.Resources.Generator_BG8200); + public static LocalizedMessage WarningMissingClassForConstructor => new LocalizedMessage (8300, Java.Interop.Localization.Resources.Generator_BG8300); + public static LocalizedMessage WarningUnexpectedFieldType => new LocalizedMessage (8400, Java.Interop.Localization.Resources.Generator_BG8400); + public static LocalizedMessage WarningFieldNameCollision_Property => new LocalizedMessage (8401, Java.Interop.Localization.Resources.Generator_BG8401_Property); + public static LocalizedMessage WarningFieldNameCollision_Method => new LocalizedMessage (8401, Java.Interop.Localization.Resources.Generator_BG8401_Method); + public static LocalizedMessage WarningFieldNameCollision_NestedType => new LocalizedMessage (8401, Java.Interop.Localization.Resources.Generator_BG8401_NestedType); + public static LocalizedMessage WarningDuplicateField => new LocalizedMessage (8402, Java.Interop.Localization.Resources.Generator_BG8402); + public static LocalizedMessage WarningUnexpectedInterfaceChild => new LocalizedMessage (8500, Java.Interop.Localization.Resources.Generator_BG8500); + public static LocalizedMessage WarningEmptyEventName => new LocalizedMessage (8501, Java.Interop.Localization.Resources.Generator_BG8501); + public static LocalizedMessage WarningInvalidDueToInterfaces => new LocalizedMessage (8502, Java.Interop.Localization.Resources.Generator_BG8502); + public static LocalizedMessage WarningInvalidDueToMethods => new LocalizedMessage (8503, Java.Interop.Localization.Resources.Generator_BG8503); + public static LocalizedMessage WarningInvalidEventName => new LocalizedMessage (8504, Java.Interop.Localization.Resources.Generator_BG8504); + public static LocalizedMessage WarningInvalidEventName2 => new LocalizedMessage (8505, Java.Interop.Localization.Resources.Generator_BG8504); + public static LocalizedMessage WarningInvalidEventPropertyName => new LocalizedMessage (8506, Java.Interop.Localization.Resources.Generator_BG8506); + public static LocalizedMessage WarningInvalidXmlFile => new LocalizedMessage (8600, Java.Interop.Localization.Resources.Generator_BG8600); + public static LocalizedMessage WarningNoPackageElements => new LocalizedMessage (8601, Java.Interop.Localization.Resources.Generator_BG8601); + public static LocalizedMessage WarningUnexpectedRootChildNode => new LocalizedMessage (8602, Java.Interop.Localization.Resources.Generator_BG8602); + public static LocalizedMessage WarningUnexpectedPackageChildNode => new LocalizedMessage (8603, Java.Interop.Localization.Resources.Generator_BG8603); + public static LocalizedMessage WarningNestedTypeAncestorNotFound => new LocalizedMessage (8604, Java.Interop.Localization.Resources.Generator_BG8604); + public static LocalizedMessage WarningUnknownReturnType => new LocalizedMessage (8700, Java.Interop.Localization.Resources.Generator_BG8700); + public static LocalizedMessage WarningInvalidReturnType => new LocalizedMessage (8701, Java.Interop.Localization.Resources.Generator_BG8701); + public static LocalizedMessage WarningUnknownParameterType => new LocalizedMessage (8800, Java.Interop.Localization.Resources.Generator_BG8800); + public static LocalizedMessage WarningInvalidParameterType => new LocalizedMessage (8801, Java.Interop.Localization.Resources.Generator_BG8801); + public static LocalizedMessage WarningRemoveNodeMatchedNoNodes => new LocalizedMessage (0x8A00, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningAddNodeMatchedNoNodes => new LocalizedMessage (0x8A01, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningChangeNodeTypeMatchedNoNodes => new LocalizedMessage (0x8A03, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningAttrMatchedNoNodes => new LocalizedMessage (0x8A04, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningMoveNodeMatchedNoNodes => new LocalizedMessage (0x8A05, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningRemoveAttrMatchedNoNodes => new LocalizedMessage (0x8A06, Java.Interop.Localization.Resources.Generator_BG8A00); + public static LocalizedMessage WarningUnknownGenericConstraint => new LocalizedMessage (0x8B00, Java.Interop.Localization.Resources.Generator_BG8B00); + public static LocalizedMessage WarningBaseInterfaceNotFound => new LocalizedMessage (0x8C00, Java.Interop.Localization.Resources.Generator_BG8C00); + public static LocalizedMessage WarningBaseInterfaceInvalid => new LocalizedMessage (0x8C01, Java.Interop.Localization.Resources.Generator_BG8C01); - public static void Error (int errorCode, Exception innerException, string sourceFile, int line, int column, string format, params object[] args) - { - throw new BindingGeneratorException (errorCode, sourceFile, line, column, string.Format (format, args), innerException); - } - - public static void Warning (int verbosity, int errorCode, string format, params object[] args) - { - Warning (verbosity, errorCode, null, format, args); - } + public static void LogCodedError (LocalizedMessage message, params string [] args) + => LogCodedError (message, null, null, -1, -1, args); - public static void Warning (int verbosity, int errorCode, Exception innerException, XNode node, string format, params object [] args) + public static void LogCodedError (LocalizedMessage message, Exception innerException, params string [] args) + => LogCodedError (message, innerException, null, -1, -1, args); + + public static void LogCodedError (LocalizedMessage message, Exception innerException, XNode node, params string [] args) { - Uri uri; - string file = Uri.TryCreate (node.BaseUri, UriKind.Absolute, out uri) ? uri.LocalPath : null; - IXmlLineInfo li = node as IXmlLineInfo; - li = li != null && li.HasLineInfo () ? li : null; - Warning (verbosity, errorCode, innerException, file, li != null ? li.LineNumber : -1, li != null ? li.LinePosition : -1, format, args); + var file = Uri.TryCreate (node.BaseUri, UriKind.Absolute, out var uri) ? uri.LocalPath : null; + var line_info = (node as IXmlLineInfo)?.HasLineInfo () == true ? node as IXmlLineInfo : null; + + LogCodedError (message, innerException, file, line_info?.LineNumber ?? -1, line_info?.LinePosition ?? -1, args); } - public static void Warning (int verbosity, int errorCode, string sourceFile, int line, int column, string format, params object[] args) + public static void LogCodedError (LocalizedMessage message, Exception innerException, string sourceFile, int line, int column, params string [] args) { - Warning (verbosity, errorCode, null, sourceFile, line, column, format, args); + throw new BindingGeneratorException (message.Code, sourceFile, line, column, string.Format (message.Value, args), innerException); } - public static void Warning (int verbosity, int errorCode, Exception innerException, string format, params object [] args) + public static void LogCodedWarning (int verbosity, LocalizedMessage message, params string [] args) + => LogCodedWarning (verbosity, message, null, null, -1, -1, args); + + public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception innerException, params string [] args) + => LogCodedWarning (verbosity, message, innerException, null, -1, -1, args); + + public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception innerException, XNode node, params string [] args) { - Warning (verbosity, errorCode, innerException, null, -1, -1, format, args); + var file = Uri.TryCreate (node.BaseUri, UriKind.Absolute, out var uri) ? uri.LocalPath : null; + var line_info = (node as IXmlLineInfo)?.HasLineInfo () == true ? node as IXmlLineInfo : null; + + LogCodedWarning (verbosity, message, innerException, file, line_info?.LineNumber ?? -1, line_info?.LinePosition ?? -1, args); } - - public static void Warning (int verbosity, int errorCode, Exception innerException, string sourceFile, int line, int column, string format, params object[] args) + + public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception innerException, string sourceFile, int line, int column, params string [] args) { if (verbosity > (Verbosity ?? 0)) return; - string supp = innerException != null ? " For details, see verbose output." : null; - Console.Error.WriteLine (Format (false, errorCode, sourceFile, line, column, format, args) + supp); + + var supp = innerException != null ? " For details, see verbose output." : null; + Console.Error.WriteLine (Format (false, message.Code, sourceFile, line, column, message.Value, args) + supp); + if (innerException != null) Console.Error.WriteLine (innerException); } @@ -103,10 +121,8 @@ public static void Verbose (int verbosity, string format, params object[] args) Console.Error.WriteLine (format, args); } - public static string Format (bool error, int errorCode, string format, params object [] args) - { - return Format (error, errorCode, null, -1, -1, format, args); - } + public static string FormatCodedMessage (bool error, LocalizedMessage message, params object [] args) + => Format (error, message.Code, null, -1, -1, message.Value, args); public static string Format (bool error, int errorCode, string sourceFile, int line, int column, string format, params object[] args) { diff --git a/tools/generator/generator.csproj b/tools/generator/generator.csproj index 9a7fa7cb3..88489255d 100644 --- a/tools/generator/generator.csproj +++ b/tools/generator/generator.csproj @@ -41,6 +41,7 @@ + diff --git a/tools/generator/generator.slnf b/tools/generator/generator.slnf index 2c3036c98..f222103bf 100644 --- a/tools/generator/generator.slnf +++ b/tools/generator/generator.slnf @@ -2,6 +2,7 @@ "solution": { "path": "..\\..\\Java.Interop.sln", "projects": [ + "src\\Java.Interop.Localization\\Java.Interop.Localization.csproj", "src\\Java.Interop.NamingCustomAttributes\\Java.Interop.NamingCustomAttributes.shproj", "src\\Java.Interop.Tools.Cecil\\Java.Interop.Tools.Cecil.csproj", "src\\Java.Interop.Tools.JavaCallableWrappers\\Java.Interop.Tools.JavaCallableWrappers.csproj",