History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-14843
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Sergey Shkredov
Reporter: Maxim A. Babenko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

Do not rename literals in WinForms generated regions

Created: 05 Aug 06 21:07   Updated: 21 Feb 08 23:31
Component/s: Refactorings - Rename
Fix Version/s: None
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 213
Old URL: http://www.intellij.net/tracker/resharper/viewSCR?publicId=14843


 Description  « Hide
Doing so breaks localized forms.

 All   Comments   Work Log   Change History      Sort Order:
Oleg Stepanov - 08 Aug 06 16:41
Re: #14843- Do not rename literals in WinForms generated regions
Could you give an example of such code where rename breaks existing semantics?

Maxim A. Babenko - 08 Aug 06 16:41
Re: #14843- Do not rename literals in WinForms generated regions
It's reproducable.

Suppose you have

private Label commentLabel;

and

// 
			// commentLabel
			// 
			this.commentLabel.AccessibleDescription = null;
			this.commentLabel.AccessibleName = null;
			resources.ApplyResources(this.commentLabel, "commentLabel");
			this.commentLabel.Font = null;
			this.commentLabel.Name = "commentLabel";

(the latter is in InitializeComponent).

If you change the name to zcommentLabel the initialization will look like

// 
			// zcommentLabel
			// 
			this.zcommentLabel.AccessibleDescription = null;
			this.zcommentLabel.AccessibleName = null;
			resources.ApplyResources(this.zcommentLabel, "zcommentLabel");
			this.zcommentLabel.Font = null;
			this.zcommentLabel.Name = "zcommentLabel";

That's cool but resources still have commentLabel.Text key! You should either update resources or don't touch this code at all. The former one is preferable.