Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing grammer of & improving CA1836 messages. #4210

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@
<value>For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1.</value>
</data>
<data name="PreferIsEmptyOverCountMessage" xml:space="preserve">
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</value>
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</value>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to mention two alternatives to properly use "whether".

Suggested change
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</value>
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty or not</value>
Suggested change
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</value>
<value>Prefer 'IsEmpty' over 'Count' to determine whether or not the object is empty</value>

We could even rephrase to not use the word

Suggested change
<value>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</value>
<value>Prefer 'IsEmpty' over 'Count' to determine if the object is empty</value>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jozkee
I'm not a native speaker so I looked it up.,The first two resources I found don't back that up
( https://english.stackexchange.com/a/48773/398754, http://www.youtube.com/watch?v=Klnroe1UBRs&t=1m23s <-- here making a specific example with whether and stating that "or not" is not necessary).
So I think it's rather a stylistic choice. Personally I would go for the shorter version unless there's ambiguity.
That would make me lean toward the if version (probably also most commonly understood by non native speakers; every programmer will know if introduces a condition). Though the guy in the youtube video said that whether specifies a binary condition and if goes well with multiple options.

Maybe we could have an odd number of native speakers vote on a version? :D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets go with the changes and if required/based on feedback, we can change them in future.

</data>
<data name="PreferIsEmptyOverCountTitle" xml:space="preserve">
<value>Prefer IsEmpty over Count</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Při zjišťování, jestli objekt obsahuje nějaké položky, používejte spíše než Count vlastnost IsEmpty.</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Při zjišťování, jestli objekt obsahuje nějaké položky, používejte spíše než Count vlastnost IsEmpty.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Verwenden Sie anstelle von "Count" die Eigenschaft "IsEmpty", um festzulegen, ob das Objekt Elemente enthält oder nicht.</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Verwenden Sie anstelle von "Count" die Eigenschaft "IsEmpty", um festzulegen, ob das Objekt Elemente enthält oder nicht.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Elija "IsEmpty" en vez de "Count" para determinar si el objeto contiene o no elementos.</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Elija "IsEmpty" en vez de "Count" para determinar si el objeto contiene o no elementos.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Préférez 'IsEmpty' à 'Count' pour déterminer si l'objet contient ou non des éléments</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Préférez 'IsEmpty' à 'Count' pour déterminer si l'objet contient ou non des éléments</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Preferire 'IsEmpty' a 'Count' per determinare se l'oggetto contiene o meno elementi</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Preferire 'IsEmpty' a 'Count' per determinare se l'oggetto contiene o meno elementi</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">オブジェクトに項目が含まれているかどうかを判断するには、'Count' より 'IsEmpty' を優先してください</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">オブジェクトに項目が含まれているかどうかを判断するには、'Count' より 'IsEmpty' を優先してください</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">개체에 항목이 포함되어 있는지 확인하려면 'Count' 대신 'IsEmpty'를 사용하세요.</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">개체에 항목이 포함되어 있는지 확인하려면 'Count' 대신 'IsEmpty'를 사용하세요.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Preferuj właściwość „IsEmpty” przed właściwością „Count” do określania, czy obiekt zawiera elementy</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Preferuj właściwość „IsEmpty” przed właściwością „Count” do określania, czy obiekt zawiera elementy</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Preferir 'IsEmpty' em vez de 'Count' para determinar se o objeto contém ou não contém itens</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Preferir 'IsEmpty' em vez de 'Count' para determinar se o objeto contém ou não contém itens</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Старайтесь использовать "IsEmpty" вместо "Count", чтобы определить, содержит ли объект другие элементы</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Старайтесь использовать "IsEmpty" вместо "Count", чтобы определить, содержит ли объект другие элементы</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">Nesnenin öğe içerip içermediğini belirlemek için 'Count' yerine 'IsEmpty' tercih edin</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">Nesnenin öğe içerip içermediğini belirlemek için 'Count' yerine 'IsEmpty' tercih edin</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">最好使用 "IsEmpty" (而不是 "Count")来确定对象是否包含项</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">最好使用 "IsEmpty" (而不是 "Count")来确定对象是否包含项</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountMessage">
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items</source>
<target state="translated">若要判斷物件是否包含項目,建議使用 'IsEmpty',而不要使用 'Count'</target>
<source>Prefer 'IsEmpty' over 'Count' to determine whether the object is empty</source>
<target state="needs-review-translation">若要判斷物件是否包含項目,建議使用 'IsEmpty',而不要使用 'Count'</target>
<note />
</trans-unit>
<trans-unit id="PreferIsEmptyOverCountTitle">
Expand Down