Skip to content

Commit b86bdbb

Browse files
authored
Fix grammar, style and punctuation issues in exception messages (#36597)
Fixes #7201
1 parent a1e1d46 commit b86bdbb

File tree

25 files changed

+258
-247
lines changed

25 files changed

+258
-247
lines changed

src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EFCore.Abstractions/Properties/AbstractionsStrings.resx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3-
<!--
4-
Microsoft ResX Schema
5-
3+
<!--
4+
Microsoft ResX Schema
5+
66
Version 2.0
7-
8-
The primary goals of this format is to allow a simple XML format
9-
that is mostly human readable. The generation and parsing of the
10-
various data types are done through the TypeConverter classes
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
1111
associated with the data types.
12-
12+
1313
Example:
14-
14+
1515
... ado.net/XML headers & schema ...
1616
<resheader name="resmimetype">text/microsoft-resx</resheader>
1717
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
2626
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
2727
<comment>This is a comment</comment>
2828
</data>
29-
30-
There are any number of "resheader" rows that contain simple
29+
30+
There are any number of "resheader" rows that contain simple
3131
name/value pairs.
32-
33-
Each data row contains a name, and value. The row also contains a
34-
type or mimetype. Type corresponds to a .NET class that support
35-
text/value conversion through the TypeConverter architecture.
36-
Classes that don't support this are serialized and stored with the
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
3737
mimetype set.
38-
39-
The mimetype is used for serialized objects, and tells the
40-
ResXResourceReader how to depersist the object. This is currently not
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
4141
extensible. For a given mimetype the value must be set accordingly:
42-
43-
Note - application/x-microsoft.net.object.binary.base64 is the format
44-
that the ResXResourceWriter will generate, however the reader can
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
4545
read any of the formats listed below.
46-
46+
4747
mimetype: application/x-microsoft.net.object.binary.base64
48-
value : The object must be serialized with
48+
value : The object must be serialized with
4949
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
5050
: and then encoded with base64 encoding.
51-
51+
5252
mimetype: application/x-microsoft.net.object.soap.base64
53-
value : The object must be serialized with
53+
value : The object must be serialized with
5454
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
5555
: and then encoded with base64 encoding.
5656
5757
mimetype: application/x-microsoft.net.object.bytearray.base64
58-
value : The object must be serialized into a byte array
58+
value : The object must be serialized into a byte array
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
@@ -121,7 +121,7 @@
121121
<value>The string argument cannot be empty.</value>
122122
</data>
123123
<data name="ArgumentIsNegativeNumber" xml:space="preserve">
124-
<value>The number argument cannot be negative number.</value>
124+
<value>The number argument cannot be a negative number.</value>
125125
</data>
126126
<data name="CannotSpecifyBothIsDescendingAndAllDescending" xml:space="preserve">
127127
<value>IsDescending and AllDescending cannot both be specified on the [Index] attribute.</value>

src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs

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

src/EFCore.Cosmos/Properties/CosmosStrings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@
199199
<value>A FromSqlExpression has an invalid arguments expression type '{expressionType}' or value type '{valueType}'.</value>
200200
</data>
201201
<data name="InvalidResourceId" xml:space="preserve">
202-
<value>Unable to generate a valid 'id' value to execute a 'ReadItem' query. This usually happens when the value provided for one of the properties is 'null' or an empty string. Please supply a value that's not 'null' or an empty string.</value>
202+
<value>Unable to generate a valid 'id' value to execute a 'ReadItem' query. This usually happens when the value provided for one of the properties is 'null' or an empty string. Provide a value that's not 'null' or an empty string.</value>
203203
</data>
204204
<data name="IsDiscriminatorMappingCompleteMismatch" xml:space="preserve">
205-
<value>The IsDiscriminatorMappingComplete setting was configured to '{isDiscriminatorMappingComplete1}' on '{entityType1}', but on '{entityType2}' it was configured to '{isDiscriminatorMappingComplete2}'. All entity types mapped to the same container '{container}' must be configured with the same IsDiscriminatorMappingComplete value.</value>
205+
<value>The IsDiscriminatorMappingComplete setting was configured to '{isDiscriminatorMappingComplete1}' on '{entityType1}', but on '{entityType2}' it was configured to '{isDiscriminatorMappingComplete2}'. All entity types mapped to the same container '{container}' must be configured with the same 'IsDiscriminatorMappingComplete' value.</value>
206206
</data>
207207
<data name="JsonPropertyCollision" xml:space="preserve">
208208
<value>Both properties '{property1}' and '{property2}' on entity type '{entityType}' are mapped to '{storeName}'. Map one of the properties to a different JSON property.</value>

src/EFCore.Design/Properties/DesignStrings.Designer.cs

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

src/EFCore.Design/Properties/DesignStrings.resx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<value>The migration name '{name}' is not valid. Migration names cannot contain any of the following characters: '{characters}'.</value>
125125
</data>
126126
<data name="BadSequenceType" xml:space="preserve">
127-
<value>Cannot scaffold sequence '{sequenceName}' because it uses type '{typeName}' which is unsupported.</value>
127+
<value>Sequence '{sequenceName}' cannot be scaffolded because it uses type '{typeName}' which is unsupported.</value>
128128
</data>
129129
<data name="BundleFullName" xml:space="preserve">
130130
<value>Entity Framework Core Migrations Bundle</value>
@@ -337,7 +337,7 @@ Change your target project to the migrations project by using the Package Manage
337337
<value>No file named '{file}' was found.</value>
338338
</data>
339339
<data name="NonNullableBoooleanColumnHasDefaultConstraint" xml:space="preserve">
340-
<value>The column '{columnName}' would normally be mapped to a non-nullable bool property, but it has a default constraint. Such a column is mapped to a nullable bool property to allow a difference between setting the property to false and invoking the default constraint. See https://go.microsoft.com/fwlink/?linkid=851278 for details.</value>
340+
<value>The column '{columnName}' would normally be mapped to a non-nullable bool property, but it has a default constraint. Such a column is mapped to a nullable bool property to allow a difference between setting the property to 'false' and invoking the default constraint. See https://go.microsoft.com/fwlink/?linkid=851278 for details.</value>
341341
</data>
342342
<data name="NonRelationalProvider" xml:space="preserve">
343343
<value>The provider '{provider}' is not a Relational provider and therefore cannot be used with Migrations.</value>
@@ -376,7 +376,7 @@ Change your target project to the migrations project by using the Package Manage
376376
<value>Could not scaffold the primary key for '{tableName}'. The following columns in the primary key could not be scaffolded: {columnNames}.</value>
377377
</data>
378378
<data name="ProviderReturnedNullModel" xml:space="preserve">
379-
<value>Metadata model returned should not be null. Provider: {providerTypeName}.</value>
379+
<value>Metadata model returned should not be 'null'. Provider: {providerTypeName}.</value>
380380
</data>
381381
<data name="QueryComprehensionSyntaxNotSupportedInPrecompiledQueries" xml:space="preserve">
382382
<value>LINQ query comprehension syntax is currently not supported in precompiled queries.</value>
@@ -413,7 +413,7 @@ Change your target project to the migrations project by using the Package Manage
413413
<comment>Localize the URL if we have localized docs.</comment>
414414
</data>
415415
<data name="SequencesRequireName" xml:space="preserve">
416-
<value>Sequence name cannot be null or empty. Entity Framework cannot model a sequence that does not have a name.</value>
416+
<value>Sequence name cannot be 'null' or empty. Entity Framework cannot model a sequence that does not have a name.</value>
417417
</data>
418418
<data name="UnableToGenerateEntityType" xml:space="preserve">
419419
<value>Unable to generate entity type for table '{tableName}' since its primary key could not be scaffolded.</value>
@@ -422,7 +422,7 @@ Change your target project to the migrations project by using the Package Manage
422422
<value>Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}.</value>
423423
</data>
424424
<data name="UnableToTranslateType" xml:space="preserve">
425-
<value>Unable to translate type '{type}'</value>
425+
<value>Unable to translate type '{type}'.</value>
426426
</data>
427427
<data name="UncompilableProject" xml:space="preserve">
428428
<value>The project '{project}' does not support compilation.</value>

src/EFCore.InMemory/Properties/InMemoryStrings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EFCore.InMemory/Properties/InMemoryStrings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<value>The entity type '{entityType}' has a defining query configured. Compiled model can't be generated, because defining queries are not supported.</value>
122122
</data>
123123
<data name="DefaultIfEmptyAppliedAfterProjection" xml:space="preserve">
124-
<value>Cannot apply 'DefaultIfEmpty' after a client-evaluated projection. Consider applying 'DefaultIfEmpty' before last 'Select' or use 'AsEnumerable' before 'DefaultIfEmpty' to apply it on client-side.</value>
124+
<value>'DefaultIfEmpty' cannot be applied after a client-evaluated projection. Consider applying 'DefaultIfEmpty' before last 'Select' or use 'AsEnumerable' before 'DefaultIfEmpty' to apply it on client-side.</value>
125125
</data>
126126
<data name="DistinctOnSubqueryNotSupported" xml:space="preserve">
127127
<value>Using 'Distinct' operation on a projection containing a subquery is not supported.</value>

src/EFCore.Proxies/Properties/ProxiesStrings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EFCore.Proxies/Properties/ProxiesStrings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@
139139
<value>Unable to create proxy for '{entityType}' because proxies are not enabled. Call 'DbContextOptionsBuilder.UseChangeTrackingProxies' or 'DbContextOptionsBuilder.UseLazyLoadingProxies' to enable proxies.</value>
140140
</data>
141141
<data name="ProxyServicesMissing" xml:space="preserve">
142-
<value>'UseChangeTrackingProxies' and 'UseLazyLoadingProxies' each require AddEntityFrameworkProxies to be called on the internal service provider used.</value>
142+
<value>'UseChangeTrackingProxies' and 'UseLazyLoadingProxies' each require 'AddEntityFrameworkProxies' to be called on the internal service provider used.</value>
143143
</data>
144144
</root>

0 commit comments

Comments
 (0)