Project
ReSharper
Priority
Major
Type
Bug
Fix versions
6.0 EAP
State
Fixed
Assignee
Alexander Nesterenko
Subsystem
Localization
Affected versions
No Affected versions
Fixed in build
5.0.1639.5  
  • Created by   Maxim Babenko
    5 years ago (05 Aug 2006 21:07)
  • Updated by   Alexander Nesterenko
    2 years ago (14 Mar 2010 22:21)
  • Jira: RSRP-14843
    (history, comments)
 
RSRP-14843 Do not rename literals in WinForms generated regions
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Doing so breaks localized forms.
Comments (2)
 
History
 
Linked Issues (?)
 
TeamCity Changes (2)
 
Oleg Stepanov
  Oleg Stepanov
08 Aug 2006 16:41
5 years ago
Re: #14843- Do not rename literals in WinForms generated regions
Could you give an example of such code where rename breaks existing semantics?
Maxim Babenko
  Maxim Babenko
08 Aug 2006 16:41
5 years ago
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.