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

Update Logger-methods with JetBrains StructuredMessageTemplateAttribute (missing V1 legacy) #4787

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Jan 30, 2022

Followup to #4757. Looks like Resharper recognize NLog-Logger-methods without help from these attributes, but like consistency.

@snakefoot snakefoot added this to the 5.0 (new) milestone Jan 30, 2022
@snakefoot snakefoot force-pushed the StructuredMessageTemplate_MissingV1 branch from dae67f2 to 9747479 Compare January 30, 2022 16:31
@snakefoot snakefoot force-pushed the StructuredMessageTemplate_MissingV1 branch from 9747479 to 8c07383 Compare January 30, 2022 16:33
@snakefoot snakefoot added the enhancement Improvement on existing feature label Jan 30, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jan 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@snakefoot snakefoot merged commit c03bbe8 into NLog:dev Jan 30, 2022
@snakefoot snakefoot deleted the StructuredMessageTemplate_MissingV1 branch July 30, 2022 10:38
@TheBigNeo
Copy link

Hi
Maybe this problem is only with me and I have not yet found the right settings.

But since [Localizable(false)] was added, the SpellChecker does not work anymore. If a string is passed to a function which has [Localizable(false)], the string is not checked.

Is this just happening to me or can you reproduce it?

TheBigNeo

image

@snakefoot
Copy link
Contributor Author

snakefoot commented Jan 13, 2023

Maybe I'm wrong, but I think [Localizable(false)] means that the text-string will not be shown to the end-user, and doesn't need to be resolved from resource-language-translation-file.

It doesn't look like an issue with NLog, but an issue with the plugin that sees text-strings marked with [Localizable(false)] as gibberish and skips spell-checking. What is the name of the plugin?

@TheBigNeo
Copy link

It looks like it is the ReSpeller (JetBrains, Rider) which controls the spelling.

What is the reason that this attribute has been added?
I have created a ticket at JetBrains to ask why the ReSpeller does not check this.

https://youtrack.jetbrains.com/issue/RIDER-87787/ReSpeller-does-not-check-Localizable-strings

@snakefoot
Copy link
Contributor Author

What is the reason that this attribute has been added?

It was already added to most Logger-methods, so for consistency then I added it to a few missing locations.

Believe that once upon a time, then the compiler could give you a compiler-warning when having raw-text-strings that wasn't resolved from the language-resource-file. To avoid this compiler-warning then one could use [Localizable(false)], and the idea is that logger-output should not be translated for the end-user.

@TheBigNeo
Copy link

JetBrains has fixed the problem with Rider 2023.3.
There is now a new setting Check strings explicitly marked as non-localizable

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement on existing feature refactoring size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants