dotnet / ResXResourceManager

Manage localization of all ResX-Based resources in one central place.
MIT License
1.32k stars 217 forks source link

Find and Replace tool #350

Open clfey opened 4 years ago

clfey commented 4 years ago

Version = ??

tom-englert commented 4 years ago

Maybe exporting the resources to Excel gives you the editing flexibility you are looking for?

tom-englert commented 4 years ago

Consider extending the tool to reach a specific folder or the whole tree from the base folder shown at the top of the RXRM tool

I don't get what exactly you want to do. Please provide some more details.

clfey commented 4 years ago

The challenge is like this: Our application has about 3000 text items. Some of them have humand-readable Keys, but mots of them only have an underscore + GUID as Key. In many instances, the text items are scattered over several files (command titles, sub-menu selections, tooltips for all of those), and there may be several checkboxes in an application's UI window that would need to be worked on at the same time in RXRM. So if I find one of the texts, then I would still have to locate all the related texts from that window. I could start the application and look for those texts, but that is time-consuming.

I therefore chose to use Notepad++ as a find & replace tool, instructing it to operate on the whole tree of files containing texts in our application. From ther I can search for an item and double-click on the found item to go directly to that file and line number. Usually I would find the related text items nearby. So I either search & replace items using Notepad++ from ther. or I copy a related text item from the NOtpad++ file and then switch back to RXRM and enter that text in the relevant column's search pattern box.

Also, Notepad++ is great for search & replace using regular expressions.

Tampering with the underlying ResX files using Notepad++ can lead to inadvertent replacing of too many items, which messes up the ResX files. For instance, I changed all "Xref" into "XRef" (about one hundred occurrences across our application). Later, I discovered that I had inadvertently changed key names as well, because they had several variations in key name spelling (xref, XREF, XRef, Xref...) and those key names in C# are case sensitive. With the help of Github diff between last commit and the present work, I was still able to clean up, but it took some time.

Wouldn't it have been great if I could do REGX search-and-replace from RXRM, which wouldn't touch the key names, only the values?

tom-englert commented 4 years ago

Your answer is all about Find&Replace; here my answer was: Try Excel, that has all the features you are looking for (so duplicating that in RXRM would be waste of time)

My question was to provide more details on that:

Consider extending the tool to reach a specific folder or the whole tree from the base folder shown at the top of the RXRM tool

tom-englert commented 4 years ago

@clfey it's still not clear to me what your talking about here:

Consider extending the tool to reach a specific folder or the whole tree from the base folder shown at the top of the RXRM tool

clfey commented 4 years ago

Sorry, I have not found the time to clarify matters yet. Btw, it is my ambition to participate in the open source project wherever I can (I am no C# programmer), but so far I have not found the time. I fully understand that an open-source project is just that - people have their ordinary jobs elsewhere and cannot just fix or improve things just because they might be useful. But again, the RXRM is a great tool and deserves to have an impeccable GUI - in the end.