Community
    • Login

    Is there a way to hide commands?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    21 Posts 5 Posters 5.5k 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.
    • Volkan ÇolakV
      Volkan Çolak
      last edited by

      Yes sadly i have >. Thanks for everything who trying to help, let me show you the “exactly” what i want. But it translates all codes as well. If i cannot find, i will try to “re-translate” tags to their original values but sadly i have many tags.

      http://i.hizliresim.com/dBpddD.png

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        Hello, @volkan-çolak,

        I saw, one minute ago, that you’re on-line on our site ! So, just be patient one hour, about, as I found out a solution to your problem and I’m preparing a post to give you the method ;-))

        See you later,

        guy038

        1 Reply Last reply Reply Quote 1
        • guy038G
          guy038
          last edited by guy038

          Hello, @volkan-çolak, @peterjones, @scott-sumner and All,

          Aaaaah ! Yes, it took me some time to completely figure out your tricky problem, but I finally found out a solution ;-)) This method is long enough and I advice you to read this post, completely, before going ahead with the different steps to perform !

          This method consists, principally, in :

          • Some copy/paste operations, of course

          • An N++ sort operation

          • Several searches/replacements, which will use the regular expression search mode

          In this respect, for each S/R, simply follow these steps :

          • Open the N++ Replace dialog ( Ctrl + H )

          • Type in ( or copy/paste ) the SEARCH  regex in the Find what: zone

          • Type in ( or copy/paste ) the REPLACE  regex in the Replace with: zone

          • Set the Wrap around option

          • Select the Regular expression search mode

          • Click on the Replace All button ( Do not use the Replace button ! )

          Well, now, let’s go !


          • From your picture, I simply created a similar code, while trying to get a correct sequence, as below, which represents a short part of your data :
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Retreat</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Tears</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.101.Text</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">The orc shamans want to join you.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">The orc shamans want to join you.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Accept</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Accept</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          
          • First, I strongly advice you to do a copy of your original data

          Remark : We, all, should act as Mother Nature does : it never uses ADN genetic code. It always replicates it, first, as an ARN sequence, which, then, is used for any bio-chemical action ! Believe me, it’s been working… … … for 3,7 billion years !

          • So, open a COPY of your original file, in Notepad++

          • Now, using the first S/R, below, it should extract all the white zones of text, that you spoke of, in your picture

          SEARCH (?s)\s*<.+?"String">\s*|<.+

          REPLACE \r\n ( or \n if you work on Unix files )

          You should obtain the different lines, below :

          Retreat
          Tears
          Dialog.Option.101.Text
          Scenario Data
          The orc shamans want to join you.
          The orc shamans want to join you.
          Dialog.Option.358.OptionText
          Scenario Data
          Accept
          Accept
          Dialog.Option.358.OptionText
          Scenario Data
          
          • Choose, now, the menu command Edit > Line Operations > Sort Lines Lexicographically Ascending. your text becomes sorted, as below :
          Accept
          Accept
          Dialog.Option.101.Text
          Dialog.Option.358.OptionText
          Dialog.Option.358.OptionText
          Retreat
          Scenario Data
          Scenario Data
          Scenario Data
          Tears
          The orc shamans want to join you.
          The orc shamans want to join you.
          
          • Perform, then, the following S/R, in order to delete all duplicate lines of that list :

          SEARCH ^(.*\R)\1+

          REPLACE \1

          you should obtain this shortened list :

          Accept
          Dialog.Option.101.Text
          Dialog.Option.358.OptionText
          Retreat
          Scenario Data
          Tears
          The orc shamans want to join you.
          

          • Now, paste the different lines of this American-English text, on an on-line translator. You said that you generally, use the Google one, but, personally, I prefer the translator, below, based on neuronal networks, which is really very efficient ::-)

          https://www.deepl.com/translator

          Well. So, let’s imagine that we would like to translate in French, using deepl.com site. We get the French list, below, that we paste, back, in N++ :

          Accepter
          Option.de.dialogue.101.Texte
          Option.Dialog.Option.358.OptionText
          Se retirer
          Données de scénario
          Larmes
          Les chamans orcs veulent se joindre à vous.
          

          I simply changed the French nom "Retraite " with the French verb "Se retirer ", which is better, given the context !


          • Now, we’re about to build the correct file, in order to run our last S/R ! So, in a new N++ tab :

            • Insert your original data, first :

            • Add a new line, made up several equal signs as, for instance ==================

            • Append all the English sentences, that we extracted, at first step

            • Add, again, a line ==================

            • Finally, add the French sentences, obtained from the on-line translator

          This text should be, as below :

          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Retreat</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Tears</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.101.Text</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">The orc shamans want to join you.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">The orc shamans want to join you.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Accept</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Accept</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Scenario Data</Data>
            </Cell>
          </Row>
          ===================================================
          Accept
          Dialog.Option.101.Text
          Dialog.Option.358.OptionText
          Retreat
          Scenario Data
          Tears
          The orc shamans want to join you.
          ===================================================
          Accepter
          Option.de.dialogue.101.Texte
          Option.Dialog.Option.358.OptionText
          Se Retirer
          Données de scénario
          Larmes
          Les chamans orcs veulent se joindre à vous.
          

          Almost done !

          • We just have to run the last regex S/R, below, which changes all American/English sentences, in your code, with the matched French translation of these sentences !

          SEARCH (?-s)(?<="String">)(.+?)(?=</Data>(?s).+^=+.*?\R\1\R(?-s)(?:.+\R){7}(.+))|(?s)^=+.+

          REPLACE \2

          IMPORTANT : The number seven, in the syntax {7}, is the total number of lines translated. Thus, le number 7, in our example


          After replacement, you’re left with the expected text, containing translated “white” sentences, only ;-))

          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Se Retirer</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Larmes</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Option.de.dialogue.101.Texte</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Données de scénario</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Les chamans orcs veulent se joindre à vous.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Les chamans orcs veulent se joindre à vous.</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Option.Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Données de scénario</Data>
            </Cell>
          </Row>
          <Row ss:StyleID="s3">
            <Cell>
              <Data ss:Type="String">Accepter</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Accepter</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Option.Dialog.Option.358.OptionText</Data>
            </Cell>
            <Cell>
              <Data ss:Type="String">Données de scénario</Data>
            </Cell>
          </Row>
          

          Et voilà !

          Next time, I’ll give you some explanations on the regexes used, if you want to !

          Best Regards,

          guy038

          Volkan ÇolakV 1 Reply Last reply Reply Quote 4
          • Jim DaileyJ
            Jim Dailey
            last edited by

            @guy038

            Incroyable ! Nous avons besoin d’un bouton de vote à la hausse qui ajoute 10 votes !

            :-)

            1 Reply Last reply Reply Quote 2
            • PeterJonesP
              PeterJones
              last edited by

              Assuming that says what I think it says (I saw “button vote … 10 votes”), I second that motion. Actually, I square that motion; I would give +100 for that answser. :-)

              1 Reply Last reply Reply Quote 2
              • guy038G
                guy038
                last edited by

                Hi, @jim-dailey and @peterJones,

                Thank you, guys, but I believe that we should remain modest ! Anyway, you, both, provide very detailed posts on various topics, too ! So, I could return the compliment to you !

                We, all, just do our best to help anyone, when we think of a right solution ;-))

                Cheers,

                guy038

                1 Reply Last reply Reply Quote 0
                • Jim DaileyJ
                  Jim Dailey
                  last edited by

                  @guy038

                  guy038> Thank you, guys, but I believe that we should remain modest !

                  Not to invite or start a political war, but I have to say, you’ll never be President of the U.S. with that kind of attitude!

                  :-)

                  Volkan ÇolakV 1 Reply Last reply Reply Quote 1
                  • Volkan ÇolakV
                    Volkan Çolak @guy038
                    last edited by

                    @guy038 Omg i haven’t read it yet but even if you succeed or not, you deserve respect. Before i begin (tonight i will available) i truly wanted to thank you so much!

                    1 Reply Last reply Reply Quote 0
                    • Volkan ÇolakV
                      Volkan Çolak @Jim Dailey
                      last edited by

                      @Jim-Dailey Ehm. First of all thank you but it seems my knowledge + my english is unsufficient for this :( i felt guilty but i wasn’t expected it to be a difficult like this. I was tought it could be the plugin that can hides html codes :(

                      1 Reply Last reply Reply Quote 0
                      • Jim DaileyJ
                        Jim Dailey
                        last edited by

                        @Volkan-Çolak

                        I think we are having language difficulties.

                        I did not help answer your question at all, so I’m not sure why you would thank me. But, you are welcome!

                        I just tried to praise @guy038 for his amazing answer (using the site he mentioned, https://www.deepl.com/translator, so that I could post in French, which I assume is Guy’s native language).

                        Then made a poor joke about his reply to my French posting.

                        I think you will find Guy’s post very useful. Best of luck!

                        1 Reply Last reply Reply Quote 0
                        • guy038G
                          guy038
                          last edited by guy038

                          Hi, @jim-dailey,

                          To be honest, the Google translation, of the American/English text, of my previous post, in French, wasn’t so bad, either !

                          But I suppose that neuronal networks are, definitively, a + for translation matters and I was, also, a bit impressed by the press comments about DeepL translator performances ;-))

                          Cheers,

                          guy038

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