Skip to content

Commit 0103d4f

Browse files
[Xamarin.Android.Build.Tasks] ResolveAssemblies l10n support (#4339)
Context: 0342fe5 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/ Move the message strings for XA0105, XA0118, & XA2002 into the `.resx` file so that they are localizable. Other changes: Reword the XA0105 message to avoid "you" and "your". Replace "target" with "`target` in lock file" so that "`target`" can be left unlocalized.
1 parent f548637 commit 0103d4f

File tree

17 files changed

+493
-9
lines changed

17 files changed

+493
-9
lines changed

Documentation/guides/messages/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ms.date: 01/24/2020
5151
+ [XA0102](xa0102.md): Generic `lint` Warning.
5252
+ [XA0103](xa0103.md): Generic `lint` Error.
5353
+ XA0104: Invalid value for \`$(AndroidSequencePointsMode)\`
54-
+ [XA0105](xa0105.md): The $(TargetFrameworkVersion) for a dll is greater than the $(TargetFrameworkVersion) for your project.
54+
+ [XA0105](xa0105.md): The $(TargetFrameworkVersion) for a library is greater than the $(TargetFrameworkVersion) for the application project.
5555
+ [XA0107](xa0107.md): `{Assmebly}` is a Reference Assembly.
5656
+ [XA0108](xa0108.md): Could not get version from `lint`.
5757
+ [XA0109](xa0109.md): Unsupported or invalid `$(TargetFrameworkVersion)` value of 'v4.5'.

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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ In this message, the phrase "should not be reached" means that this error messag
157157
<value>Invalid value for `$(AndroidSequencePointsMode)`: {0}</value>
158158
<comment>The following are literal names and should not be translated: `$(AndroidSequencePointsMode)`</comment>
159159
</data>
160+
<data name="XA0105" xml:space="preserve">
161+
<value>The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</value>
162+
<comment>The following are literal names and should not be translated: $(TargetFrameworkVersion)
163+
{0} - The file name of the library referenced by the application
164+
{1} - The target framework version number for the library
165+
{2} - The target framework version number for the application project</comment>
166+
</data>
160167
<data name="XA0107" xml:space="preserve">
161168
<value>{0} is a Reference Assembly.</value>
162169
</data>
@@ -191,6 +198,18 @@ In this message, the phrase "should not be reached" means that this error messag
191198
<value>The TargetFrameworkVersion {0} is deprecated. Please update it to be v4.4 or higher.</value>
192199
<comment>The following are literal names and should not be translated: TargetFrameworkVersion, v4.4
193200
{0} - The current value of TargetFrameworkVersion</comment>
201+
</data>
202+
<data name="XA0118_Parse" xml:space="preserve">
203+
<value>Could not parse '{0}'</value>
204+
<comment>{0} - A NuGet target framework moniker string</comment>
205+
</data>
206+
<data name="XA0118_Target" xml:space="preserve">
207+
<value>Could not resolve `target` in lock file for '{0}'</value>
208+
<comment>The following are literal names and should not be translated: `target`
209+
210+
The term "lock file" comes from NuGet. For example, search for "UnauthorizedLockFail" in https://github.com/NuGet/NuGet.Build.Localization to see some example localizations of "lock file."
211+
212+
{0} - A NuGet target framework moniker string</comment>
194213
</data>
195214
<data name="XA0121" xml:space="preserve">
196215
<value>Assembly '{0}' is using '[assembly: {1}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.</value>
@@ -242,6 +261,12 @@ In this message, the phrase "should not be reached" means that this error messag
242261
<data name="XA2001" xml:space="preserve">
243262
<value>Source file '{0}' could not be found.</value>
244263
</data>
264+
<data name="XA2002_Framework" xml:space="preserve">
265+
<value>Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</value>
266+
</data>
267+
<data name="XA2002_NuGet" xml:space="preserve">
268+
<value>Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</value>
269+
</data>
245270
<data name="XA2006" xml:space="preserve">
246271
<value>Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</value>
247272
<comment>{0} - The member name, such as a class name

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ In this message, the phrase "should not be reached" means that this error messag
5151
<target state="new">Invalid value for `$(AndroidSequencePointsMode)`: {0}</target>
5252
<note>The following are literal names and should not be translated: `$(AndroidSequencePointsMode)`</note>
5353
</trans-unit>
54+
<trans-unit id="XA0105">
55+
<source>The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</source>
56+
<target state="new">The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</target>
57+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
58+
{0} - The file name of the library referenced by the application
59+
{1} - The target framework version number for the library
60+
{2} - The target framework version number for the application project</note>
61+
</trans-unit>
5462
<trans-unit id="XA0107">
5563
<source>{0} is a Reference Assembly.</source>
5664
<target state="new">{0} is a Reference Assembly.</target>
@@ -94,6 +102,20 @@ In this message, the phrase "should not be reached" means that this error messag
94102
<target state="new">The TargetFrameworkVersion {0} is deprecated. Please update it to be v4.4 or higher.</target>
95103
<note>The following are literal names and should not be translated: TargetFrameworkVersion, v4.4
96104
{0} - The current value of TargetFrameworkVersion</note>
105+
</trans-unit>
106+
<trans-unit id="XA0118_Parse">
107+
<source>Could not parse '{0}'</source>
108+
<target state="new">Could not parse '{0}'</target>
109+
<note>{0} - A NuGet target framework moniker string</note>
110+
</trans-unit>
111+
<trans-unit id="XA0118_Target">
112+
<source>Could not resolve `target` in lock file for '{0}'</source>
113+
<target state="new">Could not resolve `target` in lock file for '{0}'</target>
114+
<note>The following are literal names and should not be translated: `target`
115+
116+
The term "lock file" comes from NuGet. For example, search for "UnauthorizedLockFail" in https://github.com/NuGet/NuGet.Build.Localization to see some example localizations of "lock file."
117+
118+
{0} - A NuGet target framework moniker string</note>
97119
</trans-unit>
98120
<trans-unit id="XA0121">
99121
<source>Assembly '{0}' is using '[assembly: {1}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.</source>
@@ -156,6 +178,16 @@ In this message, the phrase "should not be reached" means that this error messag
156178
<target state="new">Source file '{0}' could not be found.</target>
157179
<note />
158180
</trans-unit>
181+
<trans-unit id="XA2002_Framework">
182+
<source>Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</source>
183+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</target>
184+
<note />
185+
</trans-unit>
186+
<trans-unit id="XA2002_NuGet">
187+
<source>Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</source>
188+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</target>
189+
<note />
190+
</trans-unit>
159191
<trans-unit id="XA2006">
160192
<source>Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</source>
161193
<target state="new">Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</target>

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ In this message, the phrase "should not be reached" means that this error messag
5151
<target state="new">Invalid value for `$(AndroidSequencePointsMode)`: {0}</target>
5252
<note>The following are literal names and should not be translated: `$(AndroidSequencePointsMode)`</note>
5353
</trans-unit>
54+
<trans-unit id="XA0105">
55+
<source>The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</source>
56+
<target state="new">The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</target>
57+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
58+
{0} - The file name of the library referenced by the application
59+
{1} - The target framework version number for the library
60+
{2} - The target framework version number for the application project</note>
61+
</trans-unit>
5462
<trans-unit id="XA0107">
5563
<source>{0} is a Reference Assembly.</source>
5664
<target state="new">{0} is a Reference Assembly.</target>
@@ -94,6 +102,20 @@ In this message, the phrase "should not be reached" means that this error messag
94102
<target state="new">The TargetFrameworkVersion {0} is deprecated. Please update it to be v4.4 or higher.</target>
95103
<note>The following are literal names and should not be translated: TargetFrameworkVersion, v4.4
96104
{0} - The current value of TargetFrameworkVersion</note>
105+
</trans-unit>
106+
<trans-unit id="XA0118_Parse">
107+
<source>Could not parse '{0}'</source>
108+
<target state="new">Could not parse '{0}'</target>
109+
<note>{0} - A NuGet target framework moniker string</note>
110+
</trans-unit>
111+
<trans-unit id="XA0118_Target">
112+
<source>Could not resolve `target` in lock file for '{0}'</source>
113+
<target state="new">Could not resolve `target` in lock file for '{0}'</target>
114+
<note>The following are literal names and should not be translated: `target`
115+
116+
The term "lock file" comes from NuGet. For example, search for "UnauthorizedLockFail" in https://github.com/NuGet/NuGet.Build.Localization to see some example localizations of "lock file."
117+
118+
{0} - A NuGet target framework moniker string</note>
97119
</trans-unit>
98120
<trans-unit id="XA0121">
99121
<source>Assembly '{0}' is using '[assembly: {1}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.</source>
@@ -156,6 +178,16 @@ In this message, the phrase "should not be reached" means that this error messag
156178
<target state="new">Source file '{0}' could not be found.</target>
157179
<note />
158180
</trans-unit>
181+
<trans-unit id="XA2002_Framework">
182+
<source>Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</source>
183+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</target>
184+
<note />
185+
</trans-unit>
186+
<trans-unit id="XA2002_NuGet">
187+
<source>Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</source>
188+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</target>
189+
<note />
190+
</trans-unit>
159191
<trans-unit id="XA2006">
160192
<source>Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</source>
161193
<target state="new">Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</target>

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ In this message, the phrase "should not be reached" means that this error messag
5151
<target state="new">Invalid value for `$(AndroidSequencePointsMode)`: {0}</target>
5252
<note>The following are literal names and should not be translated: `$(AndroidSequencePointsMode)`</note>
5353
</trans-unit>
54+
<trans-unit id="XA0105">
55+
<source>The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</source>
56+
<target state="new">The $(TargetFrameworkVersion) for {0} ({1}) is greater than the $(TargetFrameworkVersion) for the application project ({2}). Please increase the $(TargetFrameworkVersion) for the application project.</target>
57+
<note>The following are literal names and should not be translated: $(TargetFrameworkVersion)
58+
{0} - The file name of the library referenced by the application
59+
{1} - The target framework version number for the library
60+
{2} - The target framework version number for the application project</note>
61+
</trans-unit>
5462
<trans-unit id="XA0107">
5563
<source>{0} is a Reference Assembly.</source>
5664
<target state="new">{0} is a Reference Assembly.</target>
@@ -94,6 +102,20 @@ In this message, the phrase "should not be reached" means that this error messag
94102
<target state="new">The TargetFrameworkVersion {0} is deprecated. Please update it to be v4.4 or higher.</target>
95103
<note>The following are literal names and should not be translated: TargetFrameworkVersion, v4.4
96104
{0} - The current value of TargetFrameworkVersion</note>
105+
</trans-unit>
106+
<trans-unit id="XA0118_Parse">
107+
<source>Could not parse '{0}'</source>
108+
<target state="new">Could not parse '{0}'</target>
109+
<note>{0} - A NuGet target framework moniker string</note>
110+
</trans-unit>
111+
<trans-unit id="XA0118_Target">
112+
<source>Could not resolve `target` in lock file for '{0}'</source>
113+
<target state="new">Could not resolve `target` in lock file for '{0}'</target>
114+
<note>The following are literal names and should not be translated: `target`
115+
116+
The term "lock file" comes from NuGet. For example, search for "UnauthorizedLockFail" in https://github.com/NuGet/NuGet.Build.Localization to see some example localizations of "lock file."
117+
118+
{0} - A NuGet target framework moniker string</note>
97119
</trans-unit>
98120
<trans-unit id="XA0121">
99121
<source>Assembly '{0}' is using '[assembly: {1}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.</source>
@@ -156,6 +178,16 @@ In this message, the phrase "should not be reached" means that this error messag
156178
<target state="new">Source file '{0}' could not be found.</target>
157179
<note />
158180
</trans-unit>
181+
<trans-unit id="XA2002_Framework">
182+
<source>Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</source>
183+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Perhaps it doesn't exist in the Mono for Android profile?</target>
184+
<note />
185+
</trans-unit>
186+
<trans-unit id="XA2002_NuGet">
187+
<source>Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</source>
188+
<target state="new">Can not resolve reference: `{0}`, referenced by {1}. Please add a NuGet package or assembly reference for `{0}`, or remove the reference to `{2}`.</target>
189+
<note />
190+
</trans-unit>
159191
<trans-unit id="XA2006">
160192
<source>Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</source>
161193
<target state="new">Could not resolve reference to '{0}' (defined in assembly '{1}') with scope '{2}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.</target>

0 commit comments

Comments
 (0)