dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.22k stars 1.35k forks source link

Improve pluralization of terms for summaries in the product #9921

Open AR-May opened 6 months ago

AR-May commented 6 months ago

In every case when we say warning(s) or error(s) we know if the quantity is plural or not, so we should just pluralize the noun correctly - both on this final-build summary and on the per-project summaries.

See discussion in the PR.

In short, the current RESX-based localization method makes it very hard to report pluralized and singular terms for values without a large amount of developer overhead. This desired error report summary is one example, and in https://github.com/dotnet/msbuild/pull/9929 @nohwnd and I were discussing the same problem - reporting singular and plural forms of successes, failures, and skipped tests leads to an explosion of terms in order to support different language grammars and layout.

We need a system that doesn't impose so much burden on developers.

nohwnd commented 5 months ago

As an example a simple summary of a test run:

In english we need 2 variations:

Ran 0 tests Ran 1 test

In czech we need 3 variations.

Spuštěno 0 testů Spuštěn 1 test Spuštěny 2 testy