Click here to Skip to main content
Click here to Skip to main content

Useful ReSharper plugin for localization

By , 26 Apr 2007
 

Introduction

This article describes plugin functions.

DT ReSharper Plugin roadmap

is available in the latest version
is partly available

  • Context actions
    • Move strings to resource
    • Replace string by property
    • Use System.String.Empty instead of ""
    • Use System.Environment.NewLine instead of "\r\n"
  • Highlighting
    • String literal is invalid
    • String could be moved to resource
    • String present in a resource
  • Refactoring
    • Move strings to resource
    • Move all strings from file(s) to resource
    • Move all strings from folder(s) to resource
    • Move all strings from project(s) to resource
    • Move all strings from solution to resource

Context actions

Move strings to resource

Move strings to resource by context action.

Replace string by property

If a string exists in project resource files, then use "Replace string by property" context action.

Use System.String.Empty instead of ""

For empty strings use System.String.Empty.

Use System.Environment.NewLine instead of "\r\n"

For string that contains \r and \n, use System.Environment.NewLine.

Highlighting

String literal is invalid

In the ReSharper -> Options you can set "Localization -> String literal is invalid" to "Show as error".

An unrecognized escape sequence marked by red wave.

String could be moved to resource

In the ReSharper -> Options you can set "Localization -> String literal could be moved to resource" to "Show as warning".

All strings underlined by wavy line.

Refactoring

Move strings to resource

You can move strings to resource by context action or main menu item.

First, you select the resource file and string name.

If the checkbox "Apply for all same strings in project {CurrentProjectName}" is true, then you can see all the same strings in this project.

Current string does not present in this list.

String placed to resource file after action.

and string literal replaced by property.

If checkbox "Keep modified files open" is true, then you can undo this action.

History

All changes

Visit DT ReSharper plugin homepage.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Alexander Nesterenko
Software Developer (Senior)
Belarus Belarus
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
News[ANN] Version 0.8.17 is available PinmemberAlexander Nestrenko22 May '07 - 22:34 
News[ANN] Version 0.8.16 is available PinmemberAlexander Nestrenko18 May '07 - 2:04 
GeneralPossible Issue: Line Breaks PinsitebuilderUwe Keim14 May '07 - 17:57 
News[ANN] Version 0.8.15 is available PinmemberAlexander Nestrenko14 May '07 - 5:37 
GeneralSuggestion: "Resource key" Combo box should y-resize PinsitebuilderUwe Keim14 May '07 - 2:00 
GeneralSuggestion: Allow adding to resource, even if already exists PinsitebuilderUwe Keim14 May '07 - 1:34 
NewsSuggestion: More Resource Key Options PinsitebuilderUwe Keim13 May '07 - 20:33 
GeneralDoesn't work [modified] PinsitebuilderUwe Keim13 May '07 - 20:10 
News[ANN] Version 0.8.14 is available PinmemberAlexander Nestrenko5 May '07 - 3:17 
NewsStringResourceTool Pinmemberlexa_k3 May '07 - 22:29 
QuestionExcellent - now how about .NET 1.1? PinmemberJason Dyke3 May '07 - 22:22 
GeneralSuggestion for Feature: "Ignore @ verbatim strings" PinsitebuilderUwe Keim3 May '07 - 18:58 
General.Really great. Pinmembertopcatalpha1 May '07 - 23:00 
QuestionIs it working with asp pages? Pinmembershlomiw1 May '07 - 22:17 
Generalarticle title PinmemberRobert Ensor1 May '07 - 12:12 
QuestionSource PinmemberSimone Busoli1 May '07 - 7:13 
GeneralResharper Plugin Pinmemberh.eskandari30 Apr '07 - 20:42 
QuestionSource Please Pinmemberhatton30 Apr '07 - 15:22 
QuestionWhat do you think about this plugin? PinmemberAlexander Nestrenko28 Apr '07 - 0:02 
QuestionWorks with ReSharper 3.0, too? PinsitebuilderUwe Keim27 Apr '07 - 21:40 
GeneralGreat plugin ... Pinmembersting0127 Apr '07 - 1:01 
GeneralProblem with installation PinmemberMichael O.27 Apr '07 - 0:54 
GeneralNice work Pinmemberdchrno27 Apr '07 - 0:38 
GeneralGreat work Pinmemberwaxa26 Apr '07 - 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 27 Apr 2007
Article Copyright 2007 by Alexander Nesterenko
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid