But the VS2010 version only partially works for me (VS2010 SP1 on W7 64-bit):
- extracting the string to a resource file works - the preview is broken: line numbers stop counting at 255, with no visible indication of any changes to the source - the extracted resource does not replace the original string(s) in the source file
Seems to work quite well and saves a lot of time. Two requests: 1. Don't use the fully-qualified name of the resource class if there's a 'using' statement for the namespace 2. When undoing an extraction, remove extracted resources from the resource file (if they were newly-created)
If Microsoft has not introduced any breaking changes (I hope not) it's just matter of configuration. I've already checked in the changes, but I have to install VS2013 to test them.
Basically, if you are impatient, you can try it yourself. Locate ResourceRefactor.addin XML file in VS 2012 addins folder add block in XML that allows VS2013 (it's obvious from the ADDIN XML file). Then copy all the files to VS2013 addins folder and restart VS2013.
A very minor (but very useful) change. When I press a short-cut key to refactor, I can press enter on the dialog that appears, but I can't press enter a second time on the next dialog - I have to go grab my mouse. Can you fix this please?
Very useful tool. One small proposal: would be nice to have more options for naming but just CamelCasing - my personal preference for resource strings naming is full length and spaces replaced with underscores. I did not find a way to configure it.
I'm very pleased with the Refactoring tool - I use it with C# in VS2010. Thanks to the developer(s). :-D
I have 2 questions:
1) I'm now looking for a tool to remove dead/orphaned resource entities in the many resx files in my projects. I'm about to initiate translation of a number of projects and would like to clean the resx files for unused resources to reduce the translation cost. I'm very interested in information on existing tools to carry out this task, or help to how I myself can implement a tool doing the task.
2) I'm looking into which translation system is the best for me. Currently I'm using RC-WinTrans (version 9) and have succedded with this system, but not without frustration and a lot of tedious/manual work. Translating from en-US to a number of very different languages with language dependant form-sizes and such requires some insight/hardcore knowledge which would be nice to have a system manage.
Any suggestion as to which system to use for managing translation of a medium sized set of projects, including translation memory and such would be VERY appreachiated.
Seven Technologies / Schneider Electric
As it is written in your documentation, putting entries in local resource file requires it's build action to be set as "Embedded Resource". It is not convenient for me, I want to keep it set to "Content". However if I do this, the resx file does not display in a list of available files to write to in the tool. Is there anything that can be done with this?
I have no experience with WP7 or SL. If the platforms support RESX files (which I'm not sure about) the tool should work for them.
Since both these platforms are dead, so if there is any bus related to it, I'm not gonna fix it (but feel free to contribute fix on CodePlex :-) - http://resourcerefactor2010.codeplex.com/).
I had the same issue and found a bug in the changes that were made in this version to get support for xaml. this had a side effect on c# code. to fix this, replace the line 419 of BaseHardCodedString.cs:
if (!reference.Equals(ns.NamespaceName) && reference.StartsWith(ns + ".") && ns.NamespaceName.Length > longestMatch.NamespaceName.Length)
if (!reference.Equals(ns.NamespaceName) && reference.StartsWith(ns + ".") && (longestMatch==null || ns.NamespaceName.Length > longestMatch.NamespaceName.Length))
longestMatch can be null at the beginning, which caused both preview and replace to not work
Congratulations to this great VS extension!
I've got two feature requests:
- Provide an option to add new resource token to all culture-specific resource files with initial text
- Possibility to provide a template for XAML as sometimes wrappers are used (http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx)
Hey this looks like a great tool. XAML support needed urgently! Could you implement that?
Seeing as, in a WPF or Silverlight application, no-one wants to set all the strings in code.
It would be greatly appreciated.
Or, if its not too hard, I could contribute that myself...
According to this page http://msdn.microsoft.com/en-us/library/dd393694(VS.100).aspx Add-Ins cannot be installed using VSIX.
In case you have an idea how to deploy this project via VSIX contact me. You can download source code from http://dzonny.cz/Portals/0/SW/ResourceRefactor.src.rar.
Thanks for porting this to VS 2010. I was one of the developers who worked on this tool originally, it is nice to see there is active interest on this still.
I was actually also working on rewriting some parts of it for VS 2010 so that instead of an add-in it worked as an editor extension. This would also mean that it can be deployed with VSIX now. Hopefully I will be able to release it very soon.
Hi support for XAML makes usage of some xaml tags not supported by Silverlight. I made some changes to implement a replacement string that is compatible with silverlight projects. If some interested, just contact me
This didn't seem to work for me in razor. The context menu doesn't have the context menu and the Refactor menu option just produces an error "This project or file is not supported for resource refactoring. (HTML)"
I'm not surprised. This only works for supported file types. To be honnest I have never seen any .cshtml file myself :-(. If the Razor plugin is implemented in some nice way chances are that it'd be easy to add support for it.
Feel free to download source code from here: http://dzonny.cz/Software/Blog/tabid/93/EntryID/43/language/cs-CZ/Default.aspx and contribute Razor support :-).