Skip to content

Strong api string localizers generator using incremental generator#994

Merged
hakenr merged 10 commits intomasterfrom
feature/StrongApiStringLocalizersGenerator
Feb 11, 2025
Merged

Strong api string localizers generator using incremental generator#994
hakenr merged 10 commits intomasterfrom
feature/StrongApiStringLocalizersGenerator

Conversation

@jirikanda
Copy link
Contributor

@jirikanda jirikanda commented Jan 24, 2025

  • No longer generates marker classes (no garbage in IntelliSense 💪).
  • No longer uses DelegatingStringLocalizer (Havit.Extensions.Localization now has no purpose).
  • Generates neutral value comments in the code.
  • No longer searches for or uses the ResourceServiceCollectionInstaller partial class (the generator now produces its own static class).
  • Includes a unit test.
  • Localizers no longer implement IStringLocalizer<>, they implement only IStringLocalizer (therefore, no marker class is needed).
  • Generators cannot detect RESX files unless explicitly mentioned in the .csproj file.
  • Generates a warning when no RESX file is found, including a hint on how to modify the .csproj file (can check if this can be implemented using a code fix).
  • Uses a clone of HttpUtilityExt for human-readable, culture-specific character HTML encoding (e.g., "á" remains "á" and is not converted to an HTML entity).

Copy link
Member

@hakenr hakenr left a comment

Choose a reason for hiding this comment

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

lgtm, waiting for the <AdditionalFiles Include="**\*.resx" /> investigation

Copy link
Member

@hakenr hakenr left a comment

Choose a reason for hiding this comment

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

lgtm

@hakenr hakenr merged commit 9911fdd into master Feb 11, 2025
1 check passed
@hakenr hakenr deleted the feature/StrongApiStringLocalizersGenerator branch February 11, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants