Skip to content

Commit d1dd186

Browse files
[Xamarin.Android.Build.Tasks] ValidateJavaVersion l10n support (#4340)
Context: 0342fe5 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/ Move the message strings for XA0030, XA0031, XA0032, XA0033, & XA0034 into the `.resx` file so that they are localizable. Other changes: Use the literal name `$(TargetFrameworkVersion)` so that it doesn't need to be localized. Standardize the name "Android SDK Build-Tools" to match XA5205. Replace a usage of "it" in the message for XA0033 to reduce potential ambiguity for the l10n team.
1 parent 7d12570 commit d1dd186

File tree

18 files changed

+485
-11
lines changed

18 files changed

+485
-11
lines changed

Documentation/guides/messages/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ ms.date: 01/24/2020
4141
+ [XA0002](xa0002.md): Could not find mono.android.jar
4242
+ [XA0003](xa0003.md): Invalid `android:versionCode` value. It must be an integer value.
4343
+ [XA0004](xa0004.md): VersionCode {code} is outside 0, {maxVersionCode} interval.
44-
+ [XA0030](xa0030.md): Building with JDK Version `{versionNumber}` is not supported.
45-
+ [XA0031](xa0031.md): Java SDK {requiredJavaForFrameworkVersion} or above is required when targeting FrameworkVersion {targetFrameworkVersion}.
46-
+ [XA0032](xa0032.md): Java SDK {requiredJavaForBuildTools} or above is required when using build-tools {buildToolsVersion}.
47-
+ [XA0033](xa0033.md): Failed to get the Java SDK version as it does not appear to contain a valid version number.
44+
+ [XA0030](xa0030.md): Building with JDK version `{versionNumber}` is not supported.
45+
+ [XA0031](xa0031.md): Java SDK {requiredJavaForFrameworkVersion} or above is required when when using $(TargetFrameworkVersion) {targetFrameworkVersion}.
46+
+ [XA0032](xa0032.md): Java SDK {requiredJavaForBuildTools} or above is required when using Android SDK Build-Tools {buildToolsVersion}.
47+
+ [XA0033](xa0033.md): Failed to get the Java SDK version because the returned value does not appear to contain a valid version number.
4848
+ [XA0034](xa0034.md): Failed to get the Java SDK version.
4949
+ XA0100: EmbeddedNativeLibrary is invalid in Android Application projects. Please use AndroidNativeLibrary instead.
5050
+ [XA0101](xa0101.md): warning XA0101: @(Content) build action is not supported.

src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs

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

src/Xamarin.Android.Build.Tasks/Properties/Resources.resx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,32 @@ In this message, the phrase "should not be reached" means that this error messag
148148
<value>Unsupported or invalid $(TargetFrameworkVersion) value of '{0}'. Please update your Project Options.</value>
149149
<comment>The following are literal names and should not be translated: $(TargetFrameworkVersion)</comment>
150150
</data>
151+
<data name="XA0030" xml:space="preserve">
152+
<value>Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</value>
153+
<comment>The abbreviation "JDK" should not be translated.</comment>
154+
</data>
155+
<data name="XA0031" xml:space="preserve">
156+
<value>Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</value>
157+
<comment>The following are literal names and should not be translated: $(TargetFrameworkVersion)
158+
{0} - The Java SDK version number
159+
{1} - The target framework version number</comment>
160+
</data>
161+
<data name="XA0032" xml:space="preserve">
162+
<value>Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</value>
163+
<comment>The following are literal names and should not be translated: Android SDK Build-Tools
164+
{0} - The Java SDK version number
165+
{1} - The Android SDK Build-Tools version number</comment>
166+
</data>
167+
<data name="XA0033" xml:space="preserve">
168+
<value>Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</value>
169+
<comment>The following are literal names and should not be translated: `{0} -version`, ```{1}```
170+
{0} - The name of the Java command
171+
{1} - The output of the command</comment>
172+
</data>
173+
<data name="XA0034" xml:space="preserve">
174+
<value>Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</value>
175+
<comment>{0} - The Java version number</comment>
176+
</data>
151177
<data name="XA0100" xml:space="preserve">
152178
<value>EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</value>
153179
<comment>The following are literal names and should not be translated: EmbeddedNativeLibrary, AndroidNativeLibrary

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ In this message, the phrase "should not be reached" means that this error messag
4040
<target state="new">Unsupported or invalid $(TargetFrameworkVersion) value of '{0}'. Please update your Project Options.</target>
4141
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)</note>
4242
</trans-unit>
43+
<trans-unit id="XA0030">
44+
<source>Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</source>
45+
<target state="new">Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</target>
46+
<note>The abbreviation "JDK" should not be translated.</note>
47+
</trans-unit>
48+
<trans-unit id="XA0031">
49+
<source>Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</source>
50+
<target state="new">Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</target>
51+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
52+
{0} - The Java SDK version number
53+
{1} - The target framework version number</note>
54+
</trans-unit>
55+
<trans-unit id="XA0032">
56+
<source>Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</source>
57+
<target state="new">Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</target>
58+
<note>The following are literal names and should not be translated: Android SDK Build-Tools
59+
{0} - The Java SDK version number
60+
{1} - The Android SDK Build-Tools version number</note>
61+
</trans-unit>
62+
<trans-unit id="XA0033">
63+
<source>Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</source>
64+
<target state="new">Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</target>
65+
<note>The following are literal names and should not be translated: `{0} -version`, ```{1}```
66+
{0} - The name of the Java command
67+
{1} - The output of the command</note>
68+
</trans-unit>
69+
<trans-unit id="XA0034">
70+
<source>Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</source>
71+
<target state="new">Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</target>
72+
<note>{0} - The Java version number</note>
73+
</trans-unit>
4374
<trans-unit id="XA0100">
4475
<source>EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</source>
4576
<target state="new">EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</target>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ In this message, the phrase "should not be reached" means that this error messag
4040
<target state="new">Unsupported or invalid $(TargetFrameworkVersion) value of '{0}'. Please update your Project Options.</target>
4141
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)</note>
4242
</trans-unit>
43+
<trans-unit id="XA0030">
44+
<source>Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</source>
45+
<target state="new">Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</target>
46+
<note>The abbreviation "JDK" should not be translated.</note>
47+
</trans-unit>
48+
<trans-unit id="XA0031">
49+
<source>Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</source>
50+
<target state="new">Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</target>
51+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
52+
{0} - The Java SDK version number
53+
{1} - The target framework version number</note>
54+
</trans-unit>
55+
<trans-unit id="XA0032">
56+
<source>Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</source>
57+
<target state="new">Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</target>
58+
<note>The following are literal names and should not be translated: Android SDK Build-Tools
59+
{0} - The Java SDK version number
60+
{1} - The Android SDK Build-Tools version number</note>
61+
</trans-unit>
62+
<trans-unit id="XA0033">
63+
<source>Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</source>
64+
<target state="new">Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</target>
65+
<note>The following are literal names and should not be translated: `{0} -version`, ```{1}```
66+
{0} - The name of the Java command
67+
{1} - The output of the command</note>
68+
</trans-unit>
69+
<trans-unit id="XA0034">
70+
<source>Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</source>
71+
<target state="new">Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</target>
72+
<note>{0} - The Java version number</note>
73+
</trans-unit>
4374
<trans-unit id="XA0100">
4475
<source>EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</source>
4576
<target state="new">EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</target>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ In this message, the phrase "should not be reached" means that this error messag
4040
<target state="new">Unsupported or invalid $(TargetFrameworkVersion) value of '{0}'. Please update your Project Options.</target>
4141
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)</note>
4242
</trans-unit>
43+
<trans-unit id="XA0030">
44+
<source>Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</source>
45+
<target state="new">Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</target>
46+
<note>The abbreviation "JDK" should not be translated.</note>
47+
</trans-unit>
48+
<trans-unit id="XA0031">
49+
<source>Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</source>
50+
<target state="new">Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</target>
51+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
52+
{0} - The Java SDK version number
53+
{1} - The target framework version number</note>
54+
</trans-unit>
55+
<trans-unit id="XA0032">
56+
<source>Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</source>
57+
<target state="new">Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</target>
58+
<note>The following are literal names and should not be translated: Android SDK Build-Tools
59+
{0} - The Java SDK version number
60+
{1} - The Android SDK Build-Tools version number</note>
61+
</trans-unit>
62+
<trans-unit id="XA0033">
63+
<source>Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</source>
64+
<target state="new">Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</target>
65+
<note>The following are literal names and should not be translated: `{0} -version`, ```{1}```
66+
{0} - The name of the Java command
67+
{1} - The output of the command</note>
68+
</trans-unit>
69+
<trans-unit id="XA0034">
70+
<source>Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</source>
71+
<target state="new">Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</target>
72+
<note>{0} - The Java version number</note>
73+
</trans-unit>
4374
<trans-unit id="XA0100">
4475
<source>EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</source>
4576
<target state="new">EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</target>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ In this message, the phrase "should not be reached" means that this error messag
4040
<target state="new">Unsupported or invalid $(TargetFrameworkVersion) value of '{0}'. Please update your Project Options.</target>
4141
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)</note>
4242
</trans-unit>
43+
<trans-unit id="XA0030">
44+
<source>Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</source>
45+
<target state="new">Building with JDK version `{0}` is not supported. Please install JDK version `{1}`. See https://aka.ms/xamarin/jdk9-errors</target>
46+
<note>The abbreviation "JDK" should not be translated.</note>
47+
</trans-unit>
48+
<trans-unit id="XA0031">
49+
<source>Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</source>
50+
<target state="new">Java SDK {0} or above is required when using $(TargetFrameworkVersion) {1}.</target>
51+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
52+
{0} - The Java SDK version number
53+
{1} - The target framework version number</note>
54+
</trans-unit>
55+
<trans-unit id="XA0032">
56+
<source>Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</source>
57+
<target state="new">Java SDK {0} or above is required when using Android SDK Build-Tools {1}.</target>
58+
<note>The following are literal names and should not be translated: Android SDK Build-Tools
59+
{0} - The Java SDK version number
60+
{1} - The Android SDK Build-Tools version number</note>
61+
</trans-unit>
62+
<trans-unit id="XA0033">
63+
<source>Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</source>
64+
<target state="new">Failed to get the Java SDK version because the returned value does not appear to contain a valid version number. `{0} -version` returned: ```{1}```</target>
65+
<note>The following are literal names and should not be translated: `{0} -version`, ```{1}```
66+
{0} - The name of the Java command
67+
{1} - The output of the command</note>
68+
</trans-unit>
69+
<trans-unit id="XA0034">
70+
<source>Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</source>
71+
<target state="new">Failed to get the Java SDK version. Please ensure you have Java {0} or above installed.</target>
72+
<note>{0} - The Java version number</note>
73+
</trans-unit>
4374
<trans-unit id="XA0100">
4475
<source>EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</source>
4576
<target state="new">EmbeddedNativeLibrary '{0}' is invalid in Android Application projects. Please use AndroidNativeLibrary instead.</target>

0 commit comments

Comments
 (0)