Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Programming and Learning from SD

I’m working on a project that requires translation using .Net’s Resx capabilities. This project is 2 years old and counting and our duplication and disorganization of our Resx strings are very apparent. This is a form of Technical Debt and we realized that it is time to pay some of it off before we’re in too deep. I just spent the morning replacing all of our required validation message from 28 different flavors of “X must be selected”, “Y cannot be empty”, “You need to set an email address.", ”Z must be chosen”. These message are shown directly under the input field in the form, so context already gives is meaning.

All of these strings have been translated to several languages already. Each time a new language is added we have to pay someone to translate. This is real money that has to be spent. It also complicates the validation code and HTML bindings.

The solution for us was to identify these strings, put them in an Excel spreadsheet, then have a developer (me) use the immensely helpful Resx Manager extension to remove these one by one, update code to replace them with one string in our CommonStrings.resx. requiredFieldMessage = “This is a required field.”.

We lose some specificity, but gain a lot.

Lesson Learned

Remember to think about the debt you are incurring on all aspects of your project and have a plan to pay it off when it occurs. We could have had some naming standards earlier for our Resx keys, avoided this waste of translating and duplication, and simplified code and process.

Now I’m off to simplify all of our loading messages.

Posted on Wednesday, October 14, 2015 6:36 PM ASP.Net , .Net , Technical Debt | Back to top

Comments on this post: Resx strings can be technical debt

# re: Resx strings can be technical debt
Requesting Gravatar...
IMHO this is not a technical debt but a shortsight of the specification.
Left by Thomas Freudenberg on Oct 19, 2015 11:38 AM

Your comment:
 (will show your gravatar)

Copyright © Aligned | Powered by: