dotnet / dotnet/winforms

Write analyzer to identify component properties not annotated with `[SRCategory]` or `[SRDescription]`

Open
#10,936 11 comments 0 reactions 0 assignees View on GitHub
area-Analyzers/CodeFixes tenet-localization
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

We should create an analyzer to help identify the missing attributes and then fix them. Its primarily an Internationalization (i18n) issue.

The main issue is that the `CategoryAttribute` isn't translated. So winforms needs to use `SRCategoryAttribute`, which is translated. The issue is most prevalent on properties missing any attribute, because it uses the default value `Misc` from the `CategoryAttribute` which is not translated.

By annotating all the public properties we can improve i18n.

Helps with issue: https://github.com/dotnet/runtime/issues/94365

Raised in: https://github.com/dotnet/winforms/pull/10728#issuecomment-1960601810

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.