Click here to Skip to main content
11,719,185 members (89,173 online)
Click here to Skip to main content

Useful ReSharper plugin for localization

, 26 Apr 2007 CPOL 141K 333 72
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

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

You may also be interested in...

Comments and Discussions

 
GeneralRe: ReSharper 3.0.2 Pin
Uwe Keim22-Jul-07 23:24
sitebuilderUwe Keim22-Jul-07 23:24 
GeneralRe: ReSharper 3.0.2 Pin
Alexander Nestrenko22-Jul-07 23:30
memberAlexander Nestrenko22-Jul-07 23:30 
GeneralRe: ReSharper 3.0.2 Pin
Alexander Nestrenko22-Jul-07 23:31
memberAlexander Nestrenko22-Jul-07 23:31 
Opps...
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705">
<dependentAssembly>
<assemblyIdentity name="mscorcfg" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

GeneralRe: ReSharper 3.0.2 Pin
Alexander Nestrenko22-Jul-07 23:37
memberAlexander Nestrenko22-Jul-07 23:37 
GeneralRe: ReSharper 3.0.2 Pin
Uwe Keim22-Jul-07 23:40
sitebuilderUwe Keim22-Jul-07 23:40 
GeneralRe: ReSharper 3.0.2 Pin
Alexander Nestrenko23-Jul-07 1:53
memberAlexander Nestrenko23-Jul-07 1:53 
GeneralRe: ReSharper 3.0.2 Pin
Uwe Keim23-Jul-07 1:54
sitebuilderUwe Keim23-Jul-07 1:54 
News[ANN] Version 0.9.23 for R# 3.0.1 is available Pin
Alexander Nestrenko9-Jul-07 22:49
memberAlexander Nestrenko9-Jul-07 22:49 
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available Pin
Uwe Keim10-Jul-07 5:55
sitebuilderUwe Keim10-Jul-07 5:55 
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available Pin
Alexander Nestrenko10-Jul-07 19:09
memberAlexander Nestrenko10-Jul-07 19:09 
News[ANN] New version for R# 3.0.1 is available Pin
Alexander Nestrenko7-Jul-07 4:05
memberAlexander Nestrenko7-Jul-07 4:05 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Uwe Keim7-Jul-07 23:08
sitebuilderUwe Keim7-Jul-07 23:08 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Alexander Nestrenko8-Jul-07 19:22
memberAlexander Nestrenko8-Jul-07 19:22 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Uwe Keim8-Jul-07 19:39
sitebuilderUwe Keim8-Jul-07 19:39 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Alexander Nestrenko8-Jul-07 19:46
memberAlexander Nestrenko8-Jul-07 19:46 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Uwe Keim8-Jul-07 19:50
sitebuilderUwe Keim8-Jul-07 19:50 
GeneralRe: [ANN] New version for R# 3.0.1 is available Pin
Alexander Nestrenko9-Jul-07 21:13
memberAlexander Nestrenko9-Jul-07 21:13 
GeneralSuggestions Pin
Uwe Keim4-Jul-07 18:08
sitebuilderUwe Keim4-Jul-07 18:08 
AnswerRe: Suggestions Pin
Alexander Nestrenko4-Jul-07 19:21
memberAlexander Nestrenko4-Jul-07 19:21 
GeneralRe: Suggestions Pin
Uwe Keim4-Jul-07 19:49
sitebuilderUwe Keim4-Jul-07 19:49 
AnswerRe: Suggestions Pin
Alexander Nestrenko4-Jul-07 23:09
memberAlexander Nestrenko4-Jul-07 23:09 
GeneralRe: Suggestions Pin
Uwe Keim4-Jul-07 23:11
sitebuilderUwe Keim4-Jul-07 23:11 
General[ANN] Version 0.9.20 is available Pin
Alexander Nestrenko21-Jun-07 23:46
memberAlexander Nestrenko21-Jun-07 23:46 
GeneralRe: [ANN] Version 0.9.20 is available Pin
Uwe Keim22-Jun-07 2:36
sitebuilderUwe Keim22-Jun-07 2:36 
GeneralRe: [ANN] Version 0.9.20 is available Pin
Alexander Nestrenko22-Jun-07 2:42
memberAlexander Nestrenko22-Jun-07 2:42 

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.

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