Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] Make XA5101 errors localizable (#4228)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brendanzagaeski authored Feb 9, 2020
1 parent 6255e7f commit 8acd915
Show file tree
Hide file tree
Showing 19 changed files with 456 additions and 16 deletions.
3 changes: 3 additions & 0 deletions Documentation/guides/messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ ms.date: 01/24/2020

## XA5xxx: GCC and toolchain

+ XA5101: Missing Android NDK toolchains directory '{path}'. Please install the Android NDK.
+ XA5102: Could not locate the Android NDK.
+ XA5103: Toolchain utility '{utility}' for target {arch} was not found. Tried in path: "{path}"
+ [XA5205](xa5205.md): Cannot find `{ToolName}` in the Android SDK.
+ [XA5207](xa5207.md): Could not find android.jar for API Level `{compileSdk}`.
+ [XA5300](xa5300.md): The Android/Java SDK Directory could not be found.
Expand Down
45 changes: 45 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,30 @@
<value>MultiDex is enabled, but main dex list file '{0}' does not exist.</value>
<comment>The following are literal names and should not be translated: MultiDex</comment>
</data>
<data name="XA5101" xml:space="preserve">
<value>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</value>
<comment>{0} - The path of the missing directory</comment>
</data>
<data name="XA5101_C_Compiler" xml:space="preserve">
<value>C compiler for target {0} was not found. Tried paths: "{1}"</value>
<comment>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</comment>
</data>
<data name="XA5101_Toolchain" xml:space="preserve">
<value>Toolchain directory for target {0} was not found.</value>
<comment>{0} - The target architecture, such as Arm, Arm64, or X86_64</comment>
</data>
<data name="XA5102" xml:space="preserve">
<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>
<comment>The following are literal names and should not be translated: $(AndroidNdkDirectory)</comment>
</data>
<data name="XA5103" xml:space="preserve">
<value>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</value>
<comment>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</comment>
</data>
<data name="XA5301" xml:space="preserve">
<value>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</value>
<comment>The following are literal names and should not be translated: MAX_PATH.
Expand Down
29 changes: 29 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
<note>The following are literal names and should not be translated: MultiDex</note>
</trans-unit>
<trans-unit id="XA5101">
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
<note>{0} - The path of the missing directory</note>
</trans-unit>
<trans-unit id="XA5101_C_Compiler">
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
<note>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</note>
</trans-unit>
<trans-unit id="XA5101_Toolchain">
<source>Toolchain directory for target {0} was not found.</source>
<target state="new">Toolchain directory for target {0} was not found.</target>
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
</trans-unit>
<trans-unit id="XA5102">
<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>
<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>
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
</trans-unit>
<trans-unit id="XA5103">
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
<note>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</note>
</trans-unit>
<trans-unit id="XA5301">
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>
Expand Down
29 changes: 29 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
<note>The following are literal names and should not be translated: MultiDex</note>
</trans-unit>
<trans-unit id="XA5101">
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
<note>{0} - The path of the missing directory</note>
</trans-unit>
<trans-unit id="XA5101_C_Compiler">
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
<note>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</note>
</trans-unit>
<trans-unit id="XA5101_Toolchain">
<source>Toolchain directory for target {0} was not found.</source>
<target state="new">Toolchain directory for target {0} was not found.</target>
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
</trans-unit>
<trans-unit id="XA5102">
<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>
<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>
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
</trans-unit>
<trans-unit id="XA5103">
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
<note>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</note>
</trans-unit>
<trans-unit id="XA5301">
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>
Expand Down
29 changes: 29 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
<note>The following are literal names and should not be translated: MultiDex</note>
</trans-unit>
<trans-unit id="XA5101">
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
<note>{0} - The path of the missing directory</note>
</trans-unit>
<trans-unit id="XA5101_C_Compiler">
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
<note>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</note>
</trans-unit>
<trans-unit id="XA5101_Toolchain">
<source>Toolchain directory for target {0} was not found.</source>
<target state="new">Toolchain directory for target {0} was not found.</target>
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
</trans-unit>
<trans-unit id="XA5102">
<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>
<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>
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
</trans-unit>
<trans-unit id="XA5103">
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
<note>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</note>
</trans-unit>
<trans-unit id="XA5301">
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>
Expand Down
29 changes: 29 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
<note>The following are literal names and should not be translated: MultiDex</note>
</trans-unit>
<trans-unit id="XA5101">
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
<note>{0} - The path of the missing directory</note>
</trans-unit>
<trans-unit id="XA5101_C_Compiler">
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
<note>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</note>
</trans-unit>
<trans-unit id="XA5101_Toolchain">
<source>Toolchain directory for target {0} was not found.</source>
<target state="new">Toolchain directory for target {0} was not found.</target>
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
</trans-unit>
<trans-unit id="XA5102">
<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>
<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>
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
</trans-unit>
<trans-unit id="XA5103">
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
<note>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</note>
</trans-unit>
<trans-unit id="XA5301">
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>
Expand Down
29 changes: 29 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
<target state="new">MultiDex is enabled, but main dex list file '{0}' does not exist.</target>
<note>The following are literal names and should not be translated: MultiDex</note>
</trans-unit>
<trans-unit id="XA5101">
<source>Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</source>
<target state="new">Missing Android NDK toolchains directory '{0}'. Please install the Android NDK.</target>
<note>{0} - The path of the missing directory</note>
</trans-unit>
<trans-unit id="XA5101_C_Compiler">
<source>C compiler for target {0} was not found. Tried paths: "{1}"</source>
<target state="new">C compiler for target {0} was not found. Tried paths: "{1}"</target>
<note>The following are literal names and should not be translated: C
{0} - The target architecture, such as Arm, Arm64, or X86_64
{1} - Semicolon-separated list of the paths searched</note>
</trans-unit>
<trans-unit id="XA5101_Toolchain">
<source>Toolchain directory for target {0} was not found.</source>
<target state="new">Toolchain directory for target {0} was not found.</target>
<note>{0} - The target architecture, such as Arm, Arm64, or X86_64</note>
</trans-unit>
<trans-unit id="XA5102">
<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>
<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>
<note>The following are literal names and should not be translated: $(AndroidNdkDirectory)</note>
</trans-unit>
<trans-unit id="XA5103">
<source>Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</source>
<target state="new">Toolchain utility '{0}' for target {1} was not found. Tried in path: "{2}"</target>
<note>{0} - The missing utility name, such as gcc or clang
{1} - The target architecture, such as Arm, Arm64, or X86_64
{2} - The path of the directory that was searched</note>
</trans-unit>
<trans-unit id="XA5301">
<source>Failed to generate Java type for class: {0} due to MAX_PATH: {1}</source>
<target state="new">Failed to generate Java type for class: {0} due to MAX_PATH: {1}</target>
Expand Down
Loading

0 comments on commit 8acd915

Please sign in to comment.