Community
    • Login

    I want to copy only the text without the codes

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 3 Posters 270 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Terry RT
      Terry R @moath eledwan
      last edited by

      @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

      moath eledwanM 1 Reply Last reply Reply Quote 0
      • moath eledwanM
        moath eledwan @Terry R
        last edited by

        @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&gt&.ﺩﺭﺎﺠﻨﻴﻓﺍﺭ ﺮﺒﻛﻷﺍ ﻕﻭﺪﻟﺍ .ﺍﺭﺎﺜﻨﻴﻣ ﻲﺒﻘﻠﺑ ﻲﻨﺒﻃﺎﺧ;lt;i&gt&

        Terry RT moath eledwanM 2 Replies Last reply Reply Quote 0
        • Terry RT
          Terry R @moath eledwan
          last edited by Terry R

          @moath-eledwan

          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 &gt; and &lt; 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.

          1 Reply Last reply Reply Quote 1
          • moath eledwanM
            moath eledwan @moath eledwan
            last edited by

            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 &gt; and &lt; 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… &lt;I&gt; &lt;/i&gt; &lt; &gt; &lt;br&gt;

            Terry RT 1 Reply Last reply Reply Quote 2
            • Terry RT
              Terry R @moath eledwan
              last edited by

              @moath-eledwan

              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 &lt; 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, &lt; 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 &lt; 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

              moath eledwanM 1 Reply Last reply Reply Quote 1
              • moath eledwanM
                moath eledwan @Terry R
                last edited by

                @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 2

                After 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

                Terry RT 1 Reply Last reply Reply Quote 0
                • Terry RT
                  Terry R @moath eledwan
                  last edited by

                  @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

                  moath eledwanM 2 Replies Last reply Reply Quote 1
                  • moath eledwanM
                    moath eledwan @Terry R
                    last edited by

                    @Terry-R

                    Yes, the original translated text contains no errors
                    example

                    &lt;i&gt;هجوم.&lt;/i&gt;</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&gt;</content&.ﻡﻮﺠﻫ;lt;i&gt&
                    

                    The text becomes strange and the tags merge into each other

                    1 Reply Last reply Reply Quote 0
                    • moath eledwanM
                      moath eledwan @Terry R
                      last edited by

                      @Terry-R

                      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?Untitled.png

                      Mark OlsonM 1 Reply Last reply Reply Quote 0
                      • Mark OlsonM
                        Mark Olson @moath eledwan
                        last edited by

                        @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++.

                        moath eledwanM 1 Reply Last reply Reply Quote 1
                        • moath eledwanM
                          moath eledwan @Mark Olson
                          last edited by

                          @Mark-Olson Thank you for the warning

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors