Skip to content

Commit

Permalink
Correct "can not" to "cannot" in messages, comments, etc. (#24124)
Browse files Browse the repository at this point in the history
Both are correct, but "cannot" is preferred and far more common.
  • Loading branch information
Eilon committed Aug 12, 2024
1 parent 49b8ee3 commit 11a6d6f
Show file tree
Hide file tree
Showing 45 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion loc/cs/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/de/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/es/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/fr/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/it/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/ja/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/ko/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/pl/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/ru/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
2 changes: 1 addition & 1 deletion loc/tr/src/Controls/src/Build.Tasks/ErrorMessages.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
</Item>
<Item ItemId=";StyleSheetSourceOrContent" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[StyleSheet can not have both a Source and a content.]]></Val>
<Val><![CDATA[StyleSheet cannot have both a Source and a content.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void Init()
var stack = new StackLayout
{
Padding = 100,
Children = { new Label { Text = "Turn on the Screen Reader. Click the button. Another label should appear. If you can not swipe to access and hear the text of the new label, this test has failed." }, label2, button },
Children = { new Label { Text = "Turn on the Screen Reader. Click the button. Another label should appear. If you cannot swipe to access and hear the text of the new label, this test has failed." }, label2, button },
};

Content = stack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ protected virtual void Dispose(bool disposing)
{
// This is the reason why I call SendDisappearing() here.
// When OnChildRemove is called first like how it is called in Navigation.PopToRootAsync(),
// you can not controll using SendDisappearing() on the lower class.
// you cannot control using SendDisappearing() on the lower class.
(Element as IPageController)?.SendDisappearing();

if (Element != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void IsNeitherNullNorEmpty(string value, string name)
Assert.IsNeitherNullNorEmpty(name);

// Notice that ArgumentNullException and ArgumentException take the parameters in opposite order :P
const string errorMessage = "The parameter can not be either null or empty.";
const string errorMessage = "The parameter cannot be either null or empty.";
if (null == value)
{
Assert.Fail();
Expand All @@ -82,7 +82,7 @@ public static void IsNeitherNullNorWhitespace(string value, string name)
Assert.IsNeitherNullNorEmpty(name);

// Notice that ArgumentNullException and ArgumentException take the parameters in opposite order :P
const string errorMessage = "The parameter can not be either null or empty or consist only of white space characters.";
const string errorMessage = "The parameter cannot be either null or empty or consist only of white space characters.";
if (null == value)
{
Assert.Fail();
Expand Down
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Windows/NativeEventWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public NativeEventWrapper(object target, string targetProperty, string updateSou
}
catch (Exception)
{
Application.Current?.FindMauiContext()?.CreateLogger<NativeEventWrapper>()?.LogWarning("Can not attach NativeEventWrapper.");
Application.Current?.FindMauiContext()?.CreateLogger<NativeEventWrapper>()?.LogWarning("Cannot attach NativeEventWrapper.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ async void UpdateSwipeItemIconImage(UIButton swipeButton, SwipeItem swipeItem)
catch (Exception)
{
// UIImage ctor throws on file not found if MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure is true;
Forms.MauiContext?.CreateLogger<SwipeViewRenderer>()?.LogWarning("Can not load SwipeItem Icon");
Forms.MauiContext?.CreateLogger<SwipeViewRenderer>()?.LogWarning("Cannot load SwipeItem Icon");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/docs/Microsoft.Maui.Controls/BindingBase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ label.AddBinding (new Binding (Label.TextProperty, "Price") {
<Docs>
<summary>Throws an <see cref="T:System.InvalidOperationException" /> if the binding has been applied.</summary>
<remarks>
<para>Use this method in property setters as bindings can not be changed once applied.</para>
<para>Use this method in property setters as bindings cannot be changed once applied.</para>
</remarks>
</Docs>
</Member>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/ErrorMessages.Designer.cs

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

2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/ErrorMessages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<value>Source property is not a string literal.</value>
</data>
<data name="StyleSheetSourceOrContent" xml:space="preserve">
<value>StyleSheet can not have both a Source and a content.</value>
<value>StyleSheet cannot have both a Source and a content.</value>
</data>
<data name="StyleSheetStyleNotALiteral" xml:space="preserve">
<value>Style property or Content is not a string literal.</value>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">Šablona stylů nemůže obsahovat jak zdroj, tak obsah.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">Das StyleSheet kann nicht gleichzeitig eine Source-Eigenschaft und einen Inhalt aufweisen.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">StyleSheet no puede tener un origen y un contenido.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">StyleSheet ne peut pas avoir à la fois Source et un contenu.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">Un elemento StyleSheet non può includere sia un elemento Source che contenuto.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">スタイルシートにソースとコンテンツの両方を含めることはできません。</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">스타일 시트는 소스와 콘텐츠 중 하나만 포함할 수 있습니다.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">Arkusz stylów nie może mieć zarówno źródła, jak i zawartości.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">A StyleSheet não pode ter uma Origem e também um conteúdo.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">Таблица стилей (StyleSheet) не может одновременно содержать источник (Source) и содержимое.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">StyleSheet, hem Source hem de içerik bulunduramaz.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">样式表不能同时具有源和内容。</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Build.Tasks/xlf/ErrorMessages.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<note />
</trans-unit>
<trans-unit id="StyleSheetSourceOrContent">
<source>StyleSheet can not have both a Source and a content.</source>
<source>StyleSheet cannot have both a Source and a content.</source>
<target state="translated">樣式表不能同時有來源和內容。</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Xaml/ApplyPropertiesVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void Visit(ElementNode node, INode parentNode)
return;
}

xpe = xpe ?? new XamlParseException($"Can not set the content of {((IElementNode)parentNode).XmlType.Name} as it doesn't have a ContentPropertyAttribute", node);
xpe = xpe ?? new XamlParseException($"Cannot set the content of {((IElementNode)parentNode).XmlType.Name} as it doesn't have a ContentPropertyAttribute", node);
if (Context.ExceptionHandler != null)
Context.ExceptionHandler(xpe);
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public object ProvideValue(IServiceProvider serviceProvider)
return value;
}

throw new XamlParseException($"Can not find the object referenced by `{Name}`", serviceProvider);
throw new XamlParseException($"Cannot find the object referenced by `{Name}`", serviceProvider);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
IXmlLineInfo lineInfo;

if (!string.IsNullOrEmpty(Style) && Source != null)
throw new XamlParseException($"StyleSheet can not have both a Source and a content", serviceProvider);
throw new XamlParseException($"StyleSheet cannot have both a Source and a content", serviceProvider);

if (Source != null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/tests/Core.UnitTests/BindingUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ public void MultiplePropertyUpdates()
}

[Fact, Category("[Binding] Complex paths")]
[Description("When part of a complex path can not be evaluated during an update, bindables should return to their default value.")]
[Description("When part of a complex path cannot be evaluated during an update, bindables should return to their default value.")]
public void NullInPathUsesDefaultValue()
{
var vm = new ComplexMockViewModel
Expand All @@ -1554,7 +1554,7 @@ public void NullInPathUsesDefaultValue()
}

[Fact, Category("[Binding] Complex paths")]
[Description("When part of a complex path can not be evaluated during an update, bindables should return to their default value.")]
[Description("When part of a complex path cannot be evaluated during an update, bindables should return to their default value.")]
public void NullContextUsesDefaultValue()
{
var vm = new ComplexMockViewModel
Expand Down
6 changes: 3 additions & 3 deletions src/Controls/tests/Core.UnitTests/TypedBindingUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ public void MultiplePropertyUpdates()
}

[Fact, Category("[Binding] Complex paths")]
[Description("When part of a complex path can not be evaluated during an update, bindables should return to their default value.")]
[Description("When part of a complex path cannot be evaluated during an update, bindables should return to their default value.")]
public void NullInPathUsesDefaultValue()
{
var vm = new ComplexMockViewModel
Expand All @@ -1028,7 +1028,7 @@ public void NullInPathUsesDefaultValue()
}

[Fact, Category("[Binding] Complex paths")]
[Description("When part of a complex path can not be evaluated during an update, bindables should return to their default value.")]
[Description("When part of a complex path cannot be evaluated during an update, bindables should return to their default value.")]
public void NullContextUsesDefaultValue()
{
var vm = new ComplexMockViewModel
Expand Down Expand Up @@ -1059,7 +1059,7 @@ public void NullContextUsesDefaultValue()
}

[Fact, Category("[Binding] Complex paths")]
[Description("When part of a complex path can not be evaluated during an update, bindables should return to their default value, or TargetNullValue")]
[Description("When part of a complex path cannot be evaluated during an update, bindables should return to their default value, or TargetNullValue")]
public void NullContextUsesFallbackValue()
{
var vm = new ComplexMockViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public override void SetImageSource(UIImage? platformImage)
catch (Exception)
{
// UIImage ctor throws on file not found if MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure is true;
Handler.MauiContext?.CreateLogger<SwipeItemMenuItemHandler>()?.LogWarning("Can not load SwipeItem Icon");
Handler.MauiContext?.CreateLogger<SwipeItemMenuItemHandler>()?.LogWarning("Cannot load SwipeItem Icon");
}
}
}
Expand Down
Loading

0 comments on commit 11a6d6f

Please sign in to comment.