views:

88

answers:

3

With our next major release we are looking to globalize our ASP.Net application and I was asked to think of a way to keep track of what code has been already worked on in this effort.

My thought was to use a custom Attribute and place it on all classes that have been "fixed".

What do you think?

Does anyone have a better idea?

+1  A: 

Using an attribute to determine which classes have been globalized would then require a tool to process the code and determine which classes have and haven't been "processed", it seems like it's getting a bit complicated.

A more traditional project tracking process would probably be better - and wouldn't "pollute" your code with attributes/other markup that have no functional meaning beyond the end of the globalisation project. How about having a defect raised for each class that requires work, and tracking it that way?

Rob
If you use the attribute approach, you can probably use something like NDepend, FxCop, Gendarme, etc that will count up which classes have the attribute and which don't. You could also do it only for certain assemblies (using assembly attributes).
Garo Yeriazarian
A: 

What about just counting or listing the classes and then work class by class? While an attribute may be an interesting idea, I'd regard it as over-engineered. Globalizing does nothing more than, well, going through each class and globalizing the code :)

You want to finish that anyway before the next release. So go ahead and just do it one by one, and there you have your progress. I'd regard a defect raised for each class as too much either.

In my last project, I started full globalization a little late. I just went through the list of code files, from top to bottom. Alphabetically in my case, and folder after folder. So I always only had to remember which file I last worked on. That worked pretty well for me.

Edit: Another thing: In my last project, globalizing mainly involved moving hard-coded strings to resource files, and re-generating all text when the language changes at runtime. But you'll also have to think about things like number formats and the like. Microsoft's FxCop helped me with that, since it marks all number conversions etc. without specifying a culture as violations. FxCop keeps track of this, so when you resolved such a violation and re-ran FxCop, it would report the violation as missing (i.e. solved). That's especially useful for these harder-to-see things.

OregonGhost
A: 

How about writing a unit test for each page in the app? The unit test would load the page and perform a

foreach (System.Web.UI.Control c in Page.Controls)
{
    //Do work here
}

For the work part, load different globalization settings and see if the .Text property (or relevant property for your app) is different.

My assumption would be that no language should come out the same in all but the simplest cases.

Use the set of unit tests that sucessfully complete to track your progress.

Jason Z