Localizable string only shows some [solved]

Hi
I have the problem that only some strings are shown so that they can be moved to resources.
For example:

var items = new List<ItemInfo>
            {
                new ItemInfo {ID = 1, ParentID = 0, Name = Resources.MainWin_worker_test_DoWork_Testing},
                new ItemInfo {ID = 2, ParentID = 1, Name = "Programming"},
                new ItemInfo {ID = 3, ParentID = 1, Name = Resources.MainWin_worker_test_DoWork_Testing},
                new ItemInfo {ID = 4, ParentID = 1, Name = "Writing Log"},
            };
The 2 remaining strings are not shown in code issues.
5 comments
Comment actions Permalink

Hello Kardo,

  Could you please attach a sample solution which will demonstrate the problem? Also please specify the version of installed ReSharper.

Thanks!  

0
Comment actions Permalink

Hi
Resharper version Build 8.2.1000.4556 on 2014-05-19T09:12:38
Plugins: 1
#1. “NuGet support for ReSharper” v1.3.0.16602 by JetBrains
Visual Studio 12.0.30501.0.

I think I figured out why only some strings were changed.
In another part (another method in the class) I had '

label2.Text="Testing"

This seems to be the reason I managed to change some strings to resources in ItemInfo.

I'll attach a solution about the part that resharper won't change unless there is the same string somewhere else (as setting a lable or similar). Is there a reason resharper won't change this sort of strings?



Attachment(s):
WindowsFormsApplication1.rar.zip
0
Comment actions Permalink

How is your setting of "Localizable Inspector" in the project properties? I had to change it from "Optimistic" to "Pessimistic" to get all strings moved to resources.

Regards
Klaus

0
Comment actions Permalink

Hello Kardo,

  Thanks for the solution.

  If you are talking about 'this.Text = "Form1;"' string in Form1.Designer.cs file - ReSharper does not highlight anything in generated code. To get it there, please do the folowing: ReSharper | Options | Code Inspection | Generated Code

  • Generated code regions | Remove "Windows Form Designer generated code";
  • Generated file masks | Remove "*.Designer.cs";


  Also check that needed project in its Property Window (F4 shortcut) has the following settings adjusted:

  • Localizable = Yes
  • Localizable Inspector = Pessimistic

Thanks!


Attachment(s):
2014-06-06_1438.png
0
Comment actions Permalink

Thanks
This helped

0

Please sign in to leave a comment.