Modify ↓

Opened 4 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#24950 closed task (fixed)

[patch] Fix Sonar issues in AddImageryLayerAction

Reported by: DanProgs <Abenteurer.2901@…> Owned by: DanProgs <Abenteurer.2901@…>
Priority: normal Milestone: 26.09
Component: Core Version:
Keywords: Cc:

Description

Attachments (2)

24950.patch​ (6.9 KB ) - added by DanProgs <Abenteurer.2901@…> 4 weeks ago.
24950.2.patch​ (7.0 KB ) - added by DanProgs <Abenteurer.2901@…> 2 weeks ago.

Download all attachments as: .zip

Change History (8)

by DanProgs <Abenteurer.2901@…>, 4 weeks ago

Attachment: 24950.patch​ added

comment:1 by DanProgs <Abenteurer.2901@…>, 2 weeks ago

Summary: Refactoring: Created a constant for the literal "WMS Error" → [patch] Fix Sonar issues in AddImageryLayerAction

The recurring string 'WMS Error' has been defined as a constant. Furthermore, curly braces have been added to control structures, and fields and variables have been declared as "final".

comment:2 by stoecker, 2 weeks ago

Milestone: → 26.09
Owner: changed from team to DanProgs <Abenteurer.2901@…>
Status: new → needinfo

That doesn't work. tr() must surround the text or it wont be detected as translatable string

  • So either marktr() around the text assignment and tr() around the usage or
  • tr() in the assignment and use the text without tr() when it is ensured to be initialized after the I18n framework.

Or move the string into the functions and use tr() there.

Probably the easiest solution here is usage of marktr().

by DanProgs <Abenteurer.2901@…>, 2 weeks ago

Attachment: 24950.2.patch​ added

comment:3 by DanProgs <Abenteurer.2901@…>, 2 weeks ago

Thanks for pointing that out. I had overlooked the translation logic, unfortunately. It should be correct again now.

comment:4 by DanProgs <Abenteurer.2901@…>, 2 weeks ago

Status: needinfo → new

comment:5 by stoecker, 2 weeks ago

Resolution: → fixed
Status: new → closed

In 19661/josm:

fix #24950 - patch by DanProgs - fix sonar issues (patch modifed)

comment:6 by stoecker, 2 weeks ago

Now you forget the import. Added it. Nowadays I use KI to additionally review the provided patches in the hope it catches issues I overlook and it also didn't catch this fact. So you're not alone. :-)

Anyway you provided me with a patch where I started the AI review with the question in mind "will it catch this". Worth it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain DanProgs <Abenteurer.2901@…>.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.