Hello, @martin-steiner, @ekopalypse and All,
Of course, the @ekopalypse’s python script seems the best bet ! However, you can just achieve it with the native regex engine of N++ !
I was able to download your Test_File.zip archive and extract the Cooper_CH1_Call.xml file
Just execute each point of the method below :
Open your Cooper_CH1_Call.xml file in N++
Open the Mark dialog ( Ctrl + M )
Uncheck all the box options
Check the Wrap around option
SEARCH (?x-si) (?<= <Text> ) .+ (?= </Text> )
Select the Regular expression search mode
Click on the Mark All button
Click on the Copy Marked Text button
Move to the very end of the file
Add an empty new line
Paste the bookmarked lines with Ctrl + V
=> Near the end of the XMl file, you should get this text :
</DialogCues>
<Name>Cooper_CH1_Call</Name>
</DialogCueSheetData>
Ahoj. Tady je opět Cooper.
You cannot open that door \nwith your current version of \nthe OMNI View software.
You will need to update your \nsoftware at a Daemon server.
Upgrade to version 1.0 and \nyou can open this door.
Then, you can get the girl to the Library.
Nejbližší Daemon se nachází v jídelně,
na druhé straně kolejí.
I will add this waypoint to your OMNI View.
I will also highlight this location on your map.
I will add this waypoint to your map.
...
...
...
Zobrazíš ji výběrem ikony mapy v telefonu. Buď opatrný.
The girl must feel a strong sense of deja vu, but fortunately you have been down this road before, too.
Each confinement room contains a power unit in case of power failure.
Find the unit to open the door.
It is in a different location inside every room, so check every corner in OMNI-View.
Tohle je pepřový sprej značky P-Zero.
Equip it with the phone, and select a guard for her to attack.
Knowing the girl, she'll defend herself even without the spray equipped.
But be careful, each canister has a single shot.
And guards will eventually return to patrol angrier than ever.
Note that I assume that your initial XML file does not contain any empty line !
Now, simply add the desired translation of every line, after some space characters. For instance :
</DialogCues>
<Name>Cooper_CH1_Call</Name>
</DialogCueSheetData>
Ahoj. Tady je opět Cooper. Line 001
You cannot open that door \nwith your current version of \nthe OMNI View software. Line 002
You will need to update your \nsoftware at a Daemon server. Line 003
Upgrade to version 1.0 and \nyou can open this door. Line 004
Then, you can get the girl to the Library. Line 005
Nejbližší Daemon se nachází v jídelně, Line 006
na druhé straně kolejí. Line 007
I will add this waypoint to your OMNI View. Line 008
I will also highlight this location on your map. Line 009
I will add this waypoint to your map. Line 010
...
...
...
Zobrazíš ji výběrem ikony mapy v telefonu. Buď opatrný. Line 244
The girl must feel a strong sense of deja vu, but fortunately you have been down this road before, too. Line 245
Each confinement room contains a power unit in case of power failure. Line 246
Find the unit to open the door. Line 247
It is in a different location inside every room, so check every corner in OMNI-View. Line 248
Tohle je pepřový sprej značky P-Zero. Line 249
Equip it with the phone, and select a guard for her to attack. Line 250
Knowing the girl, she'll defend herself even without the spray equipped. Line 251
But be careful, each canister has a single shot. Line 252
And guards will eventually return to patrol angrier than ever. Line 253
Then :
Open the Replace dialog Ctrl + H
Uncheck all the box options
Check the Wrap around option
SEARCH (?x-si) (?<= <Text> ) ( .+ ) (?= </Text> (?s: .+ ) ^ \R (?-s: .+ \R )* \1 \x20{2,} ( .+ ) ) | (?s) ^ \R .+
REPLACE ?2\2
Select the Regular expression search mode
Click on the Replace All button
Here you are ! All the lines <Text>..........</Text> should now contain their corresponding translation Line ### !
Best Regards
guy038
P.S. :
In case, your XML file contains empty lines, change, for instance, the uniq empty separation line with a line of @ characters and use the regex replacement :
SEARCH (?x-si) (?<= <Text> ) ( .+ ) (?= </Text> (?s: .+ ) ^ @+ \R (?-s: .+ \R )* \1 \x20{2,} ( .+ ) ) | (?s) ^ @+ \R .+
REPLACE ?2\2