I want to copy only the text without the codes
-
@moath-eledwan said in I want to copy only the text without the codes:
I have a lot of these texts and I want to extract them and return them
You haven’t explained yourself properly. You show an image of something but don’t tell us exactly what you want extracted. Please read our FAQ post here on how to properly show what you want.
Terry
You say without codes, they could include the
<
and>
in the actual text. -
I explained but it seemed like an error had occurred. I apologize for that.
What I want is to copy all the text only without the symbols. There are more than 4000 lines
Texts are not always inside codes, but some of them contain codes and affect the file when it is saved in another language, for examplethis original line
<LSTag Tooltip=“MovementSpeed”>Movement Speed</LSTag>: [1]/[2]This line when modified in another language
[2]/[lt;/LSTag>: [1<LSTag Tooltip=“MovementSpeed”>
So the xml file never worked
Do you have a way to copy all the texts to translate them, and when you return them, the original format of the file remains as it is?
-
@moath-eledwan said in I want to copy only the text without the codes:
Do you have a way to copy all the texts to translate them, and when you return them, the original format of the file remains as it is?
Extracting the text is possible, but as you want to return them, that complicates matters considerably as you need to insert a placeholder for each extracted text so you can return the “translated text” (whatever that really means) to the correct line. The placeholder might be just the line number which can be inserted at the start of every line for both copies.
So the concept might be to have 2 copies of the file. In one you would delete all the “codes” so you could “translate”. Once translated you could look to combining the 2 copies so you could shift the codes back around the “translated” text.
As I say, this is only a first draft of a solution. I still think your request needs explaining some more. Remember the more detail you can provide the more likely you will get a good solution.
Terry
-
@Terry-R
Thanks for your reply
When editing and translating texts, they are fine, but when pasted into the editor, the codes move and their formatting changes,the codes become:
<i>Address me by my title, Minthara. Grand Duke Ravengard.</i>
To this
;lt;/i>&.ﺩﺭﺎﺠﻨﻴﻓﺍﺭ ﺮﺒﻛﻷﺍ ﻕﻭﺪﻟﺍ .ﺍﺭﺎﺜﻨﻴﻣ ﻲﺒﻘﻠﺑ ﻲﻨﺒﻃﺎﺧ;lt;i>&
-
Sorry but it’s still difficult to understand what you are trying to show.
I can see that the translated text appears to be a right to left language. So the
>
and<
are essentially the>
and<
characters that were in the original text. I would say that if you don’t want these codes to “move” (appear differently) then you need to check the translator program and see if it can ignore those codes.Terry
PS I’m a moderator and I see you just posted the same post a second time. It appears to be exactly the same so I won’t release it. Bear in mind that as you are a new account and we place restrictions on accounts like yours to prevent spam, just wait until the post is released. You would have been advised this when setting up your account.
-
Sorry but it’s still difficult to understand what you are trying to show.
I can see that the translated text appears to be a right to left language. So the
>
and<
are essentially the>
and<
characters that were in the original text. I would say that if you don’t want these codes to “move” (appear differently) then you need to check the translator program and see if it can ignore those codes.Terry
PS I’m a moderator and I see you just posted the same post a second time. It appears to be exactly the same so I won’t release it. Bear in mind that as you are a new account and we place restrictions on accounts like yours to prevent spam, just wait until the post is released. You would have been advised this when setting up your account.
I am new and don’t know how to use this site. I hope you will be patient with me and thank you for your responses
Now, after hours of trying, I have almost discovered the thing that solves my problem
When I added this code, I found it on your website (?<=>)[^<]*(?=</) and it misleads the entire text into MARK ALL. I wondered if there was code like this that would mislead and copy only texts without…
<I> </i> < > <br>
-
As I mentioned in an earlier post, I think using 2 copies of the file is the way forward. Both copies would have the line numbers at the start of all lines in both copies.
For the second copy of file, you would remove all code including the
<
etc. This would likely take 2 regular expressions. The first would remove the code at the start of the line and the</content>
at the end. The second would remove the remaining code as per your list,<
etc.You should now have ONLY the text you want to translate. Once the text is translated you would need the line numbers still on each line. It wouldn’t matter if they were at the front or rear of the line.
The two copies would be combined and sorted so the 2 versions of the lines were together. Moving the code that was removed from the start and the end of the line is easy. However adding back in the codes you mentioned such as
<
is probably best done manually as there would be no reference between the two lines since one is left to right and the other right to left.I hope you can understand all these steps as I suspect english is not your first language.
Terry
PS From now on your posts should release immediately
-
@Terry-R Thank you again
Is there a way to hide all icons from the editor and show only the texts?
example
After scoring a <LSTag Tooltip=“CriticalHit”>Critical Hit</LSTag>, use the <LSTag Type=“ActionResource” Tooltip=“BonusActionPoint”>Bonus Action</LSTag> To make an additional attack.
Example 2After scoring a critical hit, use your bonus action to make an additional attack.
Then restore it by pasting it and putting the codes back in place?
I think this is the last solution before I give up
-
@moath-eledwan said in I want to copy only the text without the codes:
Then restore it by pasting it and putting the codes back in place?
As I said in the previous post these codes can be removed by regular expression but because you translate the text they cannot be restored by regular expression. Worse still is that your example of translated text shows it as a right to left language, the reverse of the original text…
This is my personal belief. Other members might provide a solution to this final puzzle but I only see it as a manual process.
Terry
-
Yes, the original translated text contains no errors
example<i>هجوم.</i></content>
However, when the direction of the translated text is reversed, the entire html tags are also reversed, so it becomes like this
example
<lt;/i></content&.ﻡﻮﺠﻫ;lt;i>&
The text becomes strange and the tags merge into each other
-
A strange thing has happened in Word. The modified text is now correct, but it is not displayed in Notepad in the same way. Is there a solution to
word txt :
this? -
@moath-eledwan said in I want to copy only the text without the codes:
A strange thing has happened in Word.
You should know by now that this forum is not the appropriate place to discuss issues with software other than Notepad++.
-
@Mark-Olson Thank you for the warning