Link to home
Start Free TrialLog in
Avatar of hermesalpha
hermesalphaFlag for Paraguay

asked on

In Notepad++, is there any way to view only the relevant text for translation and hide or delete the rest of the characters, text and tags?

You can see on this screencast that there is a lot of characters, text and tags around the relevant text for translation:

https://www.screencast.com/t/FimkTUPq

To make it easier to view the text for translation only, is there any way to delete or hide the other text, characters and tags so only the text for translation is displayed in Notepad++? By a regular expression for example?

The file types are .yml, .json2, .xlf and .xliff (I think it's XML that is displayed in all of them).
Avatar of zvitam
zvitam
Flag of Israel image

Open up the find and replace window by pressing ctrl+h.

Set the 'Search Mode' to 'Regular expression'.

In the 'find what' text box enter: (?s)<[^><]*?> and leave the 'replace with' text box empty.

Press the replace all button and the tags should disappear.
This  may not work if there are CDATA tags present or comments containing < or >. You'll need an XML parser for more reliable transformations.
SOLUTION
Avatar of Cezariusz Marek
Cezariusz Marek
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To make it easier to view the text for translation only, is there any way to delete or hide the other text, characters and tags so only the text for translation is displayed in Notepad++?
What constitutes the "relevant text for translation"?
Is it identified by specific tags or do you want to translate all the text irrespective of tag?

If you want all the text then a quick way is to open the file in Excel - this should give you all the text without the tags.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The question has been inactive for 14 days