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   
Generalwww.safedevelop.com - I am confusedsitebuilderUwe Keim18 Aug '07 - 10:12 
Just clicked on the Brinkster link to your website, just to found myself redirected to www.safedevelop.com [^].
 
I am confused - where is your greate product located now? Did you cancel the development process?
 
Thanks
Uwe
 
--
My personal 24/7 webcam

Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.

GeneralRe: www.safedevelop.com - I am confusedmemberAlexander Nestrenko19 Aug '07 - 22:47 
The DT.ReSharper.Plugin renamed to the RGreatEx and moved to the www.safedevelop.com
GeneralRe: www.safedevelop.com - I am confusedsitebuilderUwe Keim22 Aug '07 - 3:16 
I see, thanks for your reply.
 
Sadly, the name "RGreatEx" is rather meaningless in context of what your plugin actually does. Something like "ReSharper StringResourcer Plugin" would be much more rememberable.
 
Any chance to get a version for 3.02, no that is has been released?
 
--
My personal 24/7 webcam

Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.

GeneralRe: www.safedevelop.com - I am confusedmemberAlexander Nestrenko22 Aug '07 - 4:23 
RGreatEx - ReSharper Great Extension. Localization functions are basiс functionality in my great plans Smile | :)
GeneralRe: www.safedevelop.com - I am confusedmemberAlexander Nestrenko22 Aug '07 - 7:22 
>Any chance to get a version for 3.02, no that is has been released?
 
The RGreatEx 0.9.25 for the R# 3.0.2 is released today.
GeneralRe: www.safedevelop.com - I am confusedsitebuilderUwe Keim22 Aug '07 - 10:18 
Hi Alexander
 
Just installed version 0.9.25 on a ReSharper 3.0.2 (Build 3.0.515.4) but I do see NO plugins in ReSharper.
 
I even uninstalled any previous versions.
 
Any hints?
 
Thanks from Germany
Uwe
 
--
My personal 24/7 webcam

Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.

GeneralRe: www.safedevelop.com - I am confusedmemberAlexander Nestrenko22 Aug '07 - 22:25 
The RGreatEx download page contains direct link to the required R# version. R# 3.0.2 have build 517.
GeneralResharper dont see this pluginmembertecnic6 Aug '07 - 4:38 
I have used VS 2008 beta 2 and Resharper 3.0.471.2. But my resharper dont see this plugin in the available plugings list.
How can I install this pluging?
 
Thanx.
GeneralRe: Resharper dont see this pluginmemberAlexander Nestrenko7 Aug '07 - 22:36 
Download new version from www.safedevelop.com and run with next command line arguments:
msiexec /i RGreatEx.Setup-0.9.24.msi VSVERSION=9.0
GeneralRe: Resharper dont see this pluginmembertecnic8 Aug '07 - 8:16 
Thank you very much.
GeneralRe: Resharper dont see this pluginmemberAlexander Nestrenko8 Aug '07 - 19:58 
You are welcome.
GeneralReSharper 3.0.2sitebuilderUwe Keim22 Jul '07 - 22:40 
To get rid of ASP.NET (erroneous) error messages, I need to upgrade to ReSharper 3.02.
 
I tried both a repair and complete reinstall of you software without success. The plug-in simply does not appear.
 
Do you hard-bind it to an exact version of ReSharper?
 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

GeneralRe: ReSharper 3.0.2memberAlexander Nestrenko22 Jul '07 - 23:21 
Last version 0.9.23 compiled for R# 3.0.1(3.0.471). You can fix this problem by assembly binding redirect.
GeneralRe: ReSharper 3.0.2sitebuilderUwe Keim22 Jul '07 - 23:24 
"assembly binding redirect" - Can you explain a little bit?
 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

GeneralRe: ReSharper 3.0.2memberAlexander Nestrenko22 Jul '07 - 23:30 
Use configuration file redirecting assembly binding for all used R# assemblies. Example from MSDN:









GeneralRe: ReSharper 3.0.2memberAlexander 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.2memberAlexander Nestrenko22 Jul '07 - 23:37 
"ControlPanel->Administrative Tools->MS .NET 2.0 Configuration" is the simplest way to configure redirects.
GeneralRe: ReSharper 3.0.2sitebuilderUwe Keim22 Jul '07 - 23:40 
Thank you, I will try that.
 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

GeneralRe: ReSharper 3.0.2memberAlexander Nestrenko23 Jul '07 - 1:53 
Do you fix problem?
GeneralRe: ReSharper 3.0.2sitebuilderUwe Keim23 Jul '07 - 1:54 
No Smile | :) . For now I gave up, waiting for the final release.
 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

News[ANN] Version 0.9.23 for R# 3.0.1 is availablememberAlexander Nestrenko9 Jul '07 - 22:49 
1. Performance improved.
2. Bugs fixed.
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is availablesitebuilderUwe Keim10 Jul '07 - 5:55 
Wonderful! You did miracles! From my first tests, working with strings in my large project just feels smoothly now.
 
Thank you very much, I feel free to post any issues that will occur during working with your great plug-in.
 
Thanks again.

 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is availablememberAlexander Nestrenko10 Jul '07 - 19:09 
Thanks for your feedback. You are welcome.
News[ANN] New version for R# 3.0.1 is availablememberAlexander Nestrenko7 Jul '07 - 4:05 
Read more http://www40.brinkster.com/DeveloperTools/en/overview.html
GeneralRe: [ANN] New version for R# 3.0.1 is availablesitebuilderUwe Keim7 Jul '07 - 23:08 
Just downloaded and installed.
 
On small projects, the plug-in works very well.
 
Unfortunately on my current main project, activating the plug-in, the project gets unusable:
 
Whenever pressing a key inside a literal string, the CPU gets up to 100%, taking approx. 5-10 seconds to get the key printed in the editor. This happens for each key I press.
 
So I'm deactivating the plug-in for my large projects and only activating it again for smaller projects. Activating/deactivating results in ReSharper exception dialogs, though.
 
--
Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.
 
Zeta Helpdesk
Open Source ticket software for Windows and web.
 
Zeta Uploader
Easily send large files by e-mail. Windows and web client.
 
Desargues
Innovative, lean and neat calculator for Windows.

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

Permalink | Advertise | Privacy | Mobile
Web01 | 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