Skip to content

Commit 25053e1

Browse files
authored
Fix interop source generator error message to match the approved API surface (#68635)
* Fix interop source generator error message to match the approved API surface * Auto-update of localization files
1 parent 11bff1a commit 25053e1

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/Strings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
<value>Marshalling char with 'CharSet.{0}' is not supported. Instead, manually convert the char type to the desired byte representation and pass to the source-generated P/Invoke.</value>
158158
</data>
159159
<data name="MarshallingStringOrCharAsUndefinedNotSupported" xml:space="preserve">
160-
<value>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</value>
160+
<value>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</value>
161161
</data>
162162
<data name="OutByValueNotSupportedDescription" xml:space="preserve">
163163
<value>The '[Out]' attribute is only supported on array parameters.</value>
@@ -201,4 +201,4 @@
201201
<data name="ValueInCallerAllocatedBufferRequiresSpanConstructorMessage" xml:space="preserve">
202202
<value>The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a one-parameter constructor that takes a '{1}' and 'Span' of an 'unmanaged' type as parameters</value>
203203
</data>
204-
</root>
204+
</root>

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.cs.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Zařazování řetězce nebo char bez výslovných informací zařazování se nepodporuje. Určete buď LibraryImportAttribute.CharSet nebo MarshalAsAttribute.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Zařazování řetězce nebo char bez výslovných informací zařazování se nepodporuje. Určete buď LibraryImportAttribute.CharSet nebo MarshalAsAttribute.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.de.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Marshalling von Zeichenfolgen oder Zeichen ohne explizite Marshallinginformationen wird nicht unterstützt. Geben Sie entweder \"LibraryImportAttribute.CharSet\" oder \"MarshalAsAttribute\" an.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Marshalling von Zeichenfolgen oder Zeichen ohne explizite Marshallinginformationen wird nicht unterstützt. Geben Sie entweder \"LibraryImportAttribute.CharSet\" oder \"MarshalAsAttribute\" an.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.es.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">No se admite la serialización de cadenas o caracteres sin información de serialización explícita. Especifique “LibraryImportAttribute.CharSet” o “MarshalAsAttribute”.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">No se admite la serialización de cadenas o caracteres sin información de serialización explícita. Especifique “LibraryImportAttribute.CharSet” o “MarshalAsAttribute”.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.fr.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Le marshaling d’une chaîne ou d’un caractère sans information de marshaling explicite n’est pas pris en charge. Spécifiez « LibraryImportAttribute.CharSet » ou « MarshalAsAttribute ».</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Le marshaling d’une chaîne ou d’un caractère sans information de marshaling explicite n’est pas pris en charge. Spécifiez « LibraryImportAttribute.CharSet » ou « MarshalAsAttribute ».</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.it.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Il marshalling del tipo di dati string o char senza informazioni di marshalling esplicite non è supportato. Specificare 'LibraryImportAttribute.CharSet' o 'MarshalAsAttribute'.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Il marshalling del tipo di dati string o char senza informazioni di marshalling esplicite non è supportato. Specificare 'LibraryImportAttribute.CharSet' o 'MarshalAsAttribute'.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.ja.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">明示的なマーシャリング情報を含まない文字列または文字のマーシャリングはサポートされていません。'LibraryImportAttribute.CharSet' または 'MarshalAsAttribute' のいずれかを指定してください。</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">明示的なマーシャリング情報を含まない文字列または文字のマーシャリングはサポートされていません。'LibraryImportAttribute.CharSet' または 'MarshalAsAttribute' のいずれかを指定してください。</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.ko.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">명시적 마샬링 정보가 없는 문자열 또는 문자 마샬링은 지원되지 않습니다. 'LibraryImportAttribute.CharSet' 또는 'MarshalAsAttribute'를 지정하세요.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">명시적 마샬링 정보가 없는 문자열 또는 문자 마샬링은 지원되지 않습니다. 'LibraryImportAttribute.CharSet' 또는 'MarshalAsAttribute'를 지정하세요.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.pl.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Skierowanie ciągu lub znaku bez wyraźnych informacji o skierowaniu nie jest obsługiwane. Określ atrybut „LibraryImportAttribute.CharSet” lub atrybut „MarshalAsAttribute”.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Skierowanie ciągu lub znaku bez wyraźnych informacji o skierowaniu nie jest obsługiwane. Określ atrybut „LibraryImportAttribute.CharSet” lub atrybut „MarshalAsAttribute”.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/xlf/Strings.pt-BR.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
<note />
104104
</trans-unit>
105105
<trans-unit id="MarshallingStringOrCharAsUndefinedNotSupported">
106-
<source>Marshalling string or char without explicit marshalling information is not supported. Specify either 'LibraryImportAttribute.CharSet' or 'MarshalAsAttribute'.</source>
107-
<target state="translated">Não há suporte para marshalling de cadeia de caracteres ou caractere sem informações de marshalling explícitas. Especifique 'LibraryImportAttribute.CharSet' ou 'MarshalAsAttribute'.</target>
106+
<source>Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.</source>
107+
<target state="needs-review-translation">Não há suporte para marshalling de cadeia de caracteres ou caractere sem informações de marshalling explícitas. Especifique 'LibraryImportAttribute.CharSet' ou 'MarshalAsAttribute'.</target>
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="NativeGenericTypeMustBeClosedOrMatchArityMessage">

0 commit comments

Comments
 (0)