Skip to content

Commit c0fcc43

Browse files
authored
[jcw-gen] Make MSBuild warning/error strings localizable. (#695)
Update MSBuild warnings and errors within the assemblies `Java.Interop.Tools.JavaCallableWrappers.dll` and `Java.Interop.Tools.Cecil` to be localizable, building on d664e90.
1 parent dcaf794 commit c0fcc43

File tree

19 files changed

+863
-11
lines changed

19 files changed

+863
-11
lines changed

src/Java.Interop.Localization/Resources.Designer.cs

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

src/Java.Interop.Localization/Resources.resx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120+
<data name="CecilResolver_XA0009" xml:space="preserve">
121+
<value>Error while loading assembly: '{0}'.</value>
122+
<comment>{0} - File name</comment>
123+
</data>
120124
<data name="Generator_BG4000" xml:space="preserve">
121125
<value>Failed to remove old constants: {0}.</value>
122126
<comment>{0} - The list of constants that could not be removed.
@@ -287,4 +291,45 @@ The following terms should not be translated: Metadata.xml.</comment>
287291
<value>For type '{0}', base interface '{1}' is invalid.</value>
288292
<comment>{0}, {1} - .NET types.</comment>
289293
</data>
294+
<data name="JavaCallableWrappers_XA4200" xml:space="preserve">
295+
<value>Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.</value>
296+
<comment>{0} - Java type.
297+
The following terms should not be translated:
298+
class.</comment>
299+
</data>
300+
<data name="JavaCallableWrappers_XA4201" xml:space="preserve">
301+
<value>Cannot determine JNI name for type '{0}'.</value>
302+
<comment>{0} - Java type.
303+
The following terms should not be translated: JNI.</comment>
304+
</data>
305+
<data name="JavaCallableWrappers_XA4203" xml:space="preserve">
306+
<value>The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.</value>
307+
<comment>{0} - Java type.
308+
The following terms should not be translated:
309+
Name, com.example.MyClass.</comment>
310+
</data>
311+
<data name="JavaCallableWrappers_XA4204" xml:space="preserve">
312+
<value>Unable to resolve interface type '{0}'. Are you missing an assembly reference?</value>
313+
<comment>{0} - Java interface.</comment>
314+
</data>
315+
<data name="JavaCallableWrappers_XA4205" xml:space="preserve">
316+
<value>[ExportField] can only be used on methods with 0 parameters.</value>
317+
<comment>The following terms should not be translated: [ExportField].</comment>
318+
</data>
319+
<data name="JavaCallableWrappers_XA4206" xml:space="preserve">
320+
<value>[Export] cannot be used on a generic type.</value>
321+
<comment>The following terms should not be translated: [Export].</comment>
322+
</data>
323+
<data name="JavaCallableWrappers_XA4207" xml:space="preserve">
324+
<value>[ExportField] cannot be used on a generic type.</value>
325+
<comment>The following terms should not be translated: [ExportField].</comment>
326+
</data>
327+
<data name="JavaCallableWrappers_XA4208" xml:space="preserve">
328+
<value>[ExportField] cannot be used on a method returning 'void'.</value>
329+
<comment>The following terms should not be translated: [ExportField], void.</comment>
330+
</data>
331+
<data name="JavaCallableWrappers_XA4217" xml:space="preserve">
332+
<value>Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.</value>
333+
<comment>{0} - Kotlin method name.</comment>
334+
</data>
290335
</root>

src/Java.Interop.Localization/xlf/Resources.cs.xlf

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="cs" original="../Resources.resx">
44
<body>
5+
<trans-unit id="CecilResolver_XA0009">
6+
<source>Error while loading assembly: '{0}'.</source>
7+
<target state="new">Error while loading assembly: '{0}'.</target>
8+
<note>{0} - File name</note>
9+
</trans-unit>
510
<trans-unit id="Generator_BG4000">
611
<source>Failed to remove old constants: {0}.</source>
712
<target state="new">Failed to remove old constants: {0}.</target>
@@ -208,6 +213,56 @@ The following terms should not be translated: Metadata.xml.</note>
208213
<target state="new">For type '{0}', base interface '{1}' is invalid.</target>
209214
<note>{0}, {1} - .NET types.</note>
210215
</trans-unit>
216+
<trans-unit id="JavaCallableWrappers_XA4200">
217+
<source>Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.</source>
218+
<target state="new">Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.</target>
219+
<note>{0} - Java type.
220+
The following terms should not be translated:
221+
class.</note>
222+
</trans-unit>
223+
<trans-unit id="JavaCallableWrappers_XA4201">
224+
<source>Cannot determine JNI name for type '{0}'.</source>
225+
<target state="new">Cannot determine JNI name for type '{0}'.</target>
226+
<note>{0} - Java type.
227+
The following terms should not be translated: JNI.</note>
228+
</trans-unit>
229+
<trans-unit id="JavaCallableWrappers_XA4203">
230+
<source>The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.</source>
231+
<target state="new">The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.</target>
232+
<note>{0} - Java type.
233+
The following terms should not be translated:
234+
Name, com.example.MyClass.</note>
235+
</trans-unit>
236+
<trans-unit id="JavaCallableWrappers_XA4204">
237+
<source>Unable to resolve interface type '{0}'. Are you missing an assembly reference?</source>
238+
<target state="new">Unable to resolve interface type '{0}'. Are you missing an assembly reference?</target>
239+
<note>{0} - Java interface.</note>
240+
</trans-unit>
241+
<trans-unit id="JavaCallableWrappers_XA4205">
242+
<source>[ExportField] can only be used on methods with 0 parameters.</source>
243+
<target state="new">[ExportField] can only be used on methods with 0 parameters.</target>
244+
<note>The following terms should not be translated: [ExportField].</note>
245+
</trans-unit>
246+
<trans-unit id="JavaCallableWrappers_XA4206">
247+
<source>[Export] cannot be used on a generic type.</source>
248+
<target state="new">[Export] cannot be used on a generic type.</target>
249+
<note>The following terms should not be translated: [Export].</note>
250+
</trans-unit>
251+
<trans-unit id="JavaCallableWrappers_XA4207">
252+
<source>[ExportField] cannot be used on a generic type.</source>
253+
<target state="new">[ExportField] cannot be used on a generic type.</target>
254+
<note>The following terms should not be translated: [ExportField].</note>
255+
</trans-unit>
256+
<trans-unit id="JavaCallableWrappers_XA4208">
257+
<source>[ExportField] cannot be used on a method returning 'void'.</source>
258+
<target state="new">[ExportField] cannot be used on a method returning 'void'.</target>
259+
<note>The following terms should not be translated: [ExportField], void.</note>
260+
</trans-unit>
261+
<trans-unit id="JavaCallableWrappers_XA4217">
262+
<source>Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.</source>
263+
<target state="new">Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.</target>
264+
<note>{0} - Kotlin method name.</note>
265+
</trans-unit>
211266
</body>
212267
</file>
213268
</xliff>

src/Java.Interop.Localization/xlf/Resources.de.xlf

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="de" original="../Resources.resx">
44
<body>
5+
<trans-unit id="CecilResolver_XA0009">
6+
<source>Error while loading assembly: '{0}'.</source>
7+
<target state="new">Error while loading assembly: '{0}'.</target>
8+
<note>{0} - File name</note>
9+
</trans-unit>
510
<trans-unit id="Generator_BG4000">
611
<source>Failed to remove old constants: {0}.</source>
712
<target state="new">Failed to remove old constants: {0}.</target>
@@ -208,6 +213,56 @@ The following terms should not be translated: Metadata.xml.</note>
208213
<target state="new">For type '{0}', base interface '{1}' is invalid.</target>
209214
<note>{0}, {1} - .NET types.</note>
210215
</trans-unit>
216+
<trans-unit id="JavaCallableWrappers_XA4200">
217+
<source>Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.</source>
218+
<target state="new">Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.</target>
219+
<note>{0} - Java type.
220+
The following terms should not be translated:
221+
class.</note>
222+
</trans-unit>
223+
<trans-unit id="JavaCallableWrappers_XA4201">
224+
<source>Cannot determine JNI name for type '{0}'.</source>
225+
<target state="new">Cannot determine JNI name for type '{0}'.</target>
226+
<note>{0} - Java type.
227+
The following terms should not be translated: JNI.</note>
228+
</trans-unit>
229+
<trans-unit id="JavaCallableWrappers_XA4203">
230+
<source>The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.</source>
231+
<target state="new">The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.</target>
232+
<note>{0} - Java type.
233+
The following terms should not be translated:
234+
Name, com.example.MyClass.</note>
235+
</trans-unit>
236+
<trans-unit id="JavaCallableWrappers_XA4204">
237+
<source>Unable to resolve interface type '{0}'. Are you missing an assembly reference?</source>
238+
<target state="new">Unable to resolve interface type '{0}'. Are you missing an assembly reference?</target>
239+
<note>{0} - Java interface.</note>
240+
</trans-unit>
241+
<trans-unit id="JavaCallableWrappers_XA4205">
242+
<source>[ExportField] can only be used on methods with 0 parameters.</source>
243+
<target state="new">[ExportField] can only be used on methods with 0 parameters.</target>
244+
<note>The following terms should not be translated: [ExportField].</note>
245+
</trans-unit>
246+
<trans-unit id="JavaCallableWrappers_XA4206">
247+
<source>[Export] cannot be used on a generic type.</source>
248+
<target state="new">[Export] cannot be used on a generic type.</target>
249+
<note>The following terms should not be translated: [Export].</note>
250+
</trans-unit>
251+
<trans-unit id="JavaCallableWrappers_XA4207">
252+
<source>[ExportField] cannot be used on a generic type.</source>
253+
<target state="new">[ExportField] cannot be used on a generic type.</target>
254+
<note>The following terms should not be translated: [ExportField].</note>
255+
</trans-unit>
256+
<trans-unit id="JavaCallableWrappers_XA4208">
257+
<source>[ExportField] cannot be used on a method returning 'void'.</source>
258+
<target state="new">[ExportField] cannot be used on a method returning 'void'.</target>
259+
<note>The following terms should not be translated: [ExportField], void.</note>
260+
</trans-unit>
261+
<trans-unit id="JavaCallableWrappers_XA4217">
262+
<source>Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.</source>
263+
<target state="new">Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.</target>
264+
<note>{0} - Kotlin method name.</note>
265+
</trans-unit>
211266
</body>
212267
</file>
213268
</xliff>

0 commit comments

Comments
 (0)