Click here to Skip to main content
Licence CPOL
First Posted 26 Apr 2007
Views 103,419
Downloads 203
Bookmarked 72 times

Useful ReSharper plugin for localization

By | 26 Apr 2007 | Article
This ReSharper plugin contains features that helps you for localization

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



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. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalwww.safedevelop.com - I am confused PinsitebuilderUwe Keim10:12 18 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko22:47 19 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinsitebuilderUwe Keim3:16 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko4:23 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko7:22 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinsitebuilderUwe Keim10:18 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko22:25 22 Aug '07  
GeneralResharper dont see this plugin Pinmembertecnic4:38 6 Aug '07  
GeneralRe: Resharper dont see this plugin PinmemberAlexander Nestrenko22:36 7 Aug '07  
GeneralRe: Resharper dont see this plugin Pinmembertecnic8:16 8 Aug '07  
GeneralRe: Resharper dont see this plugin PinmemberAlexander Nestrenko19:58 8 Aug '07  
You are welcome.
GeneralReSharper 3.0.2 PinsitebuilderUwe Keim22:40 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko23:21 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim23:24 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko23:30 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko23:31 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko23:37 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim23:40 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko1:53 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim1:54 23 Jul '07  
News[ANN] Version 0.9.23 for R# 3.0.1 is available PinmemberAlexander Nestrenko22:49 9 Jul '07  
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available PinsitebuilderUwe Keim5:55 10 Jul '07  
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available PinmemberAlexander Nestrenko19:09 10 Jul '07  
News[ANN] New version for R# 3.0.1 is available PinmemberAlexander Nestrenko4:05 7 Jul '07  
GeneralRe: [ANN] New version for R# 3.0.1 is available PinsitebuilderUwe Keim23:08 7 Jul '07  

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

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