views:

12

answers:

1

I've inherited a web application written in ASP.NET that has an incomplete implementation of a localization scheme (not using resource files). Here's a micro version:

public class Useful
{
    public void DoSomething()
    {
        return Localizations.Do_Something_Message_vx7Hds8i;
    }
}

public class Localizations
{
    public const string Do_Something_Message_vx7Hds8i = "Some text!";
}

In almost all cases, these localized strings aren't even used in more than one place. I'd like to factor out this annoying localization layer before properly localizing the app.

The end result I want is just:

public class Useful
{
    public void DoSomething()
    {
        return "Some text!";
    }
}

This is proving tediously slow and I have over 1000 in this app.

What would be awesome would be a one-click way of selecting the reference and have it automatically suck in the string contents. I'm using Visual Studio 2008 and ReSharper 5.1.

Does anyone know if there's a way to accomplish this? It seems like there should be a proper name for what I'm trying to do (anti-modularization?) but I'm a little stumped where to start.

+1  A: 

The default key command in Resharper is Ctrl+Alt+N for inline refactoring.

Agent_9191
Bless you. At this rate I'll be done in an hour!
Stefan Mohr