• Login
Community
  • Login

help about lines arabic

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 950 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.
  • S
    saud s.k
    last edited by Aug 26, 2018, 11:45 PM

    hey

    long story short i am here to Translate a game to the arabic but in my note after the auto translate i got the lines upside down

    the first line in the bottom and the last line first !!! i need to flip it back but i don’t know how … i wana do it manually but its 35000 line ,
    it will take too long and i wana add [keep.text] at the start of every line …

    it will be so helpful if you give me any hint

    C 1 Reply Last reply Aug 27, 2018, 12:50 AM Reply Quote 2
    • C
      Claudia Frank @saud s.k
      last edited by Claudia Frank Aug 27, 2018, 12:51 AM Aug 27, 2018, 12:50 AM

      @saud-s.k

      is it really the case that you need to flip text from

      fifth
      fourth
      third
      second
      first
      

      to

      first
      second
      third
      fourth
      fifth
      

      if so, install the python script plugin and once done do
      Plugins->Python Script->Show Console and execute the following
      editor.setText('\r\n'.join(reversed(editor.getText().splitlines())))
      in the run area of the python console.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 2
      • S
        saud s.k
        last edited by Aug 27, 2018, 1:29 AM

        done and it work fine thank you very much Claudia

        the last thing is to add “[keep.text]” at the start of every line

        C 1 Reply Last reply Aug 27, 2018, 1:37 AM Reply Quote 1
        • C
          Claudia Frank @saud s.k
          last edited by Aug 27, 2018, 1:37 AM

          @saud-s.k

          a little bit cryptic but this one can do it

          editor.setText('\r\n'.join(reversed(['[keep.text]{}'.format(x) for x in editor.getText().splitlines()])))

          Cheers
          Claudia

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