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

Make NullStringLocalizer & HtmlLocalizer Public #10939

Merged
merged 15 commits into from
Feb 5, 2024
Merged

Conversation

hishamco
Copy link
Member

This PR solved two issue:

  • Make it easier to create NullStringLocalizer and NullHtmlLocalizer without need to use localizer factory, which quite useful in unit testing
  • Adds a generic version of the null localizer, to make the controllers and other types that are using IStringLocalizer<T> and/or IHtmlLocalizer<T> testable without using mocks

OrchardCore.Localization.Abstractions is a suitable place for such types, something similiar to NullLogger

No breaking-changes here, NullStringLocalizerFactory and NullHtmlLocalizerFactory are still using the above types without any issues

@hishamco
Copy link
Member Author

hishamco commented Feb 1, 2022

@Skrypt could you please have a look if you have a time, seems Seb is quite busy ;)

@Skrypt
Copy link
Contributor

Skrypt commented Feb 1, 2022

Ok looks good to me. The only thing I've not looked at is the generic classes utility. Else, this is just some moving around of classes for cleaner overall usage.

@hishamco
Copy link
Member Author

@sebastienros could we merge this?

@hishamco
Copy link
Member Author

hishamco commented Jan 7, 2023

Can we merge this?

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

Copy link
Contributor

github-actions bot commented Feb 3, 2024

This pull request has merge conflicts. Please resolve those before requesting a review.

@hishamco
Copy link
Member Author

hishamco commented Feb 3, 2024

@Skrypt any other thing to add here or shall I merge?

@hishamco hishamco requested a review from Skrypt February 4, 2024 12:18
@hishamco hishamco merged commit 3f8e04e into main Feb 5, 2024
5 checks passed
@hishamco hishamco deleted the hishamco/null-localizer branch February 5, 2024 16:56
urbanit pushed a commit to urbanit/OrchardCore that referenced this pull request Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants