Skip to content

Commit 8acd915

Browse files
[Xamarin.Android.Build.Tasks] Make XA5101 errors localizable (dotnet#4228)
Context: 0342fe5 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/ Give the XA5101 errors in `NdkUtil` their own new error codes so they can be distinguished from the `NdkUtilOld` errors in telemetry. Move the message strings for XA5101 and the other new error codes to the `.resx` file so that they are localizable.
1 parent 6255e7f commit 8acd915

19 files changed

+456
-16
lines changed

Documentation/guides/messages/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ ms.date: 01/24/2020
107107

108108
## XA5xxx: GCC and toolchain
109109

110+
+ XA5101: Missing Android NDK toolchains directory '{path}'. Please install the Android NDK.
111+
+ XA5102: Could not locate the Android NDK.
112+
+ XA5103: Toolchain utility '{utility}' for target {arch} was not found. Tried in path: "{path}"
110113
+ [XA5205](xa5205.md): Cannot find `{ToolName}` in the Android SDK.
111114
+ [XA5207](xa5207.md): Could not find android.jar for API Level `{compileSdk}`.
112115
+ [XA5300](xa5300.md): The Android/Java SDK Directory could not be found.

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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,30 @@
238238
<value>MultiDex is enabled, but main dex list file '{0}' does not exist.</value>
239239
<comment>The following are literal names and should not be translated: MultiDex</comment>
240240
</data>
241+
<data name="XA5101" xml:space="preserve">
242+
<value>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</value>
243+
<comment>{0} - The path of the missing directory</comment>
244+
</data>
245+
<data name="XA5101_C_Compiler" xml:space="preserve">
246+
<value>C compiler for target {0} was not found. Tried paths: "{1}"</value>
247+
<comment>The following are literal names and should not be translated: C
248+
{0} - The target architecture, such as Arm, Arm64, or X86_64
249+
{1} - Semicolon-separated list of the paths searched</comment>
250+
</data>
251+
<data name="XA5101_Toolchain" xml:space="preserve">
252+
<value>Toolchain directory for target {0} was not found.</value>
253+
<comment>{0} - The target architecture, such as Arm, Arm64, or X86_64</comment>
254+
</data>
255+
<data name="XA5102" xml:space="preserve">
256+
<value>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</value>
257+
<comment>The following are literal names and should not be translated: $(AndroidNdkDirectory)</comment>
258+
</data>
259+
<data name="XA5103" xml:space="preserve">
260+
<value>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</value>
261+
<comment>{0} - The missing utility name, such as gcc or clang
262+
{1} - The target architecture, such as Arm, Arm64, or X86_64
263+
{2} - The path of the directory that was searched</comment>
264+
</data>
241265
<data name="XA5301" xml:space="preserve">
242266
<value>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</value>
243267
<comment>The following are literal names and should not be translated: MAX_PATH.

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@
154154
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
155155
<note>The following are literal names and should not be translated: MultiDex</note>
156156
</trans-unit>
157+
<trans-unit id="XA5101">
158+
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
159+
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
160+
<note>{0} - The path of the missing directory</note>
161+
</trans-unit>
162+
<trans-unit id="XA5101_C_Compiler">
163+
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
164+
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
165+
<note>The following are literal names and should not be translated: C
166+
{0} - The target architecture, such as Arm, Arm64, or X86_64
167+
{1} - Semicolon-separated list of the paths searched</note>
168+
</trans-unit>
169+
<trans-unit id="XA5101_Toolchain">
170+
<source>Toolchain directory for target {0} was not found.</source>
171+
<target state="new">Toolchain directory for target {0} was not found.</target>
172+
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
173+
</trans-unit>
174+
<trans-unit id="XA5102">
175+
<source>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</source>
176+
<target state="new">Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</target>
177+
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
178+
</trans-unit>
179+
<trans-unit id="XA5103">
180+
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
181+
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
182+
<note>{0} - The missing utility name, such as gcc or clang
183+
{1} - The target architecture, such as Arm, Arm64, or X86_64
184+
{2} - The path of the directory that was searched</note>
185+
</trans-unit>
157186
<trans-unit id="XA5301">
158187
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
159188
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@
154154
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
155155
<note>The following are literal names and should not be translated: MultiDex</note>
156156
</trans-unit>
157+
<trans-unit id="XA5101">
158+
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
159+
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
160+
<note>{0} - The path of the missing directory</note>
161+
</trans-unit>
162+
<trans-unit id="XA5101_C_Compiler">
163+
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
164+
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
165+
<note>The following are literal names and should not be translated: C
166+
{0} - The target architecture, such as Arm, Arm64, or X86_64
167+
{1} - Semicolon-separated list of the paths searched</note>
168+
</trans-unit>
169+
<trans-unit id="XA5101_Toolchain">
170+
<source>Toolchain directory for target {0} was not found.</source>
171+
<target state="new">Toolchain directory for target {0} was not found.</target>
172+
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
173+
</trans-unit>
174+
<trans-unit id="XA5102">
175+
<source>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</source>
176+
<target state="new">Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</target>
177+
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
178+
</trans-unit>
179+
<trans-unit id="XA5103">
180+
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
181+
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
182+
<note>{0} - The missing utility name, such as gcc or clang
183+
{1} - The target architecture, such as Arm, Arm64, or X86_64
184+
{2} - The path of the directory that was searched</note>
185+
</trans-unit>
157186
<trans-unit id="XA5301">
158187
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
159188
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@
154154
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
155155
<note>The following are literal names and should not be translated: MultiDex</note>
156156
</trans-unit>
157+
<trans-unit id="XA5101">
158+
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
159+
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
160+
<note>{0} - The path of the missing directory</note>
161+
</trans-unit>
162+
<trans-unit id="XA5101_C_Compiler">
163+
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
164+
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
165+
<note>The following are literal names and should not be translated: C
166+
{0} - The target architecture, such as Arm, Arm64, or X86_64
167+
{1} - Semicolon-separated list of the paths searched</note>
168+
</trans-unit>
169+
<trans-unit id="XA5101_Toolchain">
170+
<source>Toolchain directory for target {0} was not found.</source>
171+
<target state="new">Toolchain directory for target {0} was not found.</target>
172+
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
173+
</trans-unit>
174+
<trans-unit id="XA5102">
175+
<source>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</source>
176+
<target state="new">Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</target>
177+
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
178+
</trans-unit>
179+
<trans-unit id="XA5103">
180+
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
181+
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
182+
<note>{0} - The missing utility name, such as gcc or clang
183+
{1} - The target architecture, such as Arm, Arm64, or X86_64
184+
{2} - The path of the directory that was searched</note>
185+
</trans-unit>
157186
<trans-unit id="XA5301">
158187
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
159188
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@
154154
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
155155
<note>The following are literal names and should not be translated: MultiDex</note>
156156
</trans-unit>
157+
<trans-unit id="XA5101">
158+
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
159+
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
160+
<note>{0} - The path of the missing directory</note>
161+
</trans-unit>
162+
<trans-unit id="XA5101_C_Compiler">
163+
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
164+
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
165+
<note>The following are literal names and should not be translated: C
166+
{0} - The target architecture, such as Arm, Arm64, or X86_64
167+
{1} - Semicolon-separated list of the paths searched</note>
168+
</trans-unit>
169+
<trans-unit id="XA5101_Toolchain">
170+
<source>Toolchain directory for target {0} was not found.</source>
171+
<target state="new">Toolchain directory for target {0} was not found.</target>
172+
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
173+
</trans-unit>
174+
<trans-unit id="XA5102">
175+
<source>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</source>
176+
<target state="new">Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</target>
177+
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
178+
</trans-unit>
179+
<trans-unit id="XA5103">
180+
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
181+
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
182+
<note>{0} - The missing utility name, such as gcc or clang
183+
{1} - The target architecture, such as Arm, Arm64, or X86_64
184+
{2} - The path of the directory that was searched</note>
185+
</trans-unit>
157186
<trans-unit id="XA5301">
158187
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
159188
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@
154154
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
155155
<note>The following are literal names and should not be translated: MultiDex</note>
156156
</trans-unit>
157+
<trans-unit id="XA5101">
158+
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
159+
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
160+
<note>{0} - The path of the missing directory</note>
161+
</trans-unit>
162+
<trans-unit id="XA5101_C_Compiler">
163+
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
164+
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
165+
<note>The following are literal names and should not be translated: C
166+
{0} - The target architecture, such as Arm, Arm64, or X86_64
167+
{1} - Semicolon-separated list of the paths searched</note>
168+
</trans-unit>
169+
<trans-unit id="XA5101_Toolchain">
170+
<source>Toolchain directory for target {0} was not found.</source>
171+
<target state="new">Toolchain directory for target {0} was not found.</target>
172+
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
173+
</trans-unit>
174+
<trans-unit id="XA5102">
175+
<source>Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</source>
176+
<target state="new">Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.</target>
177+
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
178+
</trans-unit>
179+
<trans-unit id="XA5103">
180+
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
181+
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
182+
<note>{0} - The missing utility name, such as gcc or clang
183+
{1} - The target architecture, such as Arm, Arm64, or X86_64
184+
{2} - The path of the directory that was searched</note>
185+
</trans-unit>
157186
<trans-unit id="XA5301">
158187
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
159188
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>

0 commit comments

Comments
 (0)