• Login
Community
  • Login

Changing context menu text in a language.xml

Scheduled Pinned Locked Moved General Discussion
15 Posts 4 Posters 1.3k 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.
  • G
    guy038
    last edited by guy038 Mar 22, 2021, 2:42 PM Mar 22, 2021, 2:35 PM

    Hello, @peter-greistorfer, @Alan-kilborn, @peterjones and All,

    In addition to the coloured boxes, with the new versions, it also follows any change of colour, just done in Settings > Style Configurator... > Global Styles > Style Mark Style 1 to 5, even without restarting N++. Whaoou ;-))

    BR

    guy038

    1 Reply Last reply Reply Quote 2
    • A
      Alan Kilborn @PeterJones
      last edited by Mar 22, 2021, 2:48 PM

      @PeterJones said in Changing context menu text in a language.xml:

      Interestingly, if you have more than one instance of that style entry in the contextMenu, only the first instance will have the color box:

      It begs the question: If, when doing a pointless thing, if a harmless inconsistency occurs, is it called a bug?
      Or is it merely an “interestingly…”

      P 1 Reply Last reply Mar 22, 2021, 3:23 PM Reply Quote 1
      • P
        Peter Greistorfer @Alan Kilborn
        last edited by Peter Greistorfer Mar 22, 2021, 3:25 PM Mar 22, 2021, 3:23 PM

        You guys are great, thanks a lot for your fast help!

        Finally, I’m just using <Item ItemNameAs="CYAN " id=“43022”/> (of course, it’s not BLUE!), which gives me direct access to that colour. Unfortunately, the best, those coloured boxes, doesn’t appear … Does it depend on npp’s version, I’m not running the latest build …

        And, if it’s allowed (<=>my problems are already solved), what’s the reason I couldn’t edit that “Using 1st style”-entry in the language-files?

        P 1 Reply Last reply Mar 22, 2021, 3:57 PM Reply Quote 0
        • P
          PeterJones @Peter Greistorfer
          last edited by Mar 22, 2021, 3:57 PM

          @Peter-Greistorfer said in Changing context menu text in a language.xml:

          You guys are great, thanks a lot for your fast help!

          Glad it helped.

          Unfortunately, the best, those coloured boxes, doesn’t appear … Does it depend on npp’s version, I’m not running the latest build …

          Interesting. It’s in the v7.9.2 changelog: I had forgotten that was so recent. Probably because I rarely look at the styling commands.

          what’s the reason I couldn’t edit that “Using 1st style”-entry in the language-files?

          I don’t know. It works for me (I still had v7.9.2 open, so that’s the version I changed).

          1. Set Preferences > General > Localization to English (customizable) – this copies english_customizable.xml to nativeLang.xml
          2. Edit nativeLang.xml, change from
            <Item id="43022" name="Using 1st Style"/>
            to
            <Item id="43022" name="Using 1st Style [CYAN]"/>
            and save
          3. Exit Notepad++. Re-run Notepad++
          4. Right-click context menu: 0211e221-1a8b-422e-85b1-d679b53467c8-image.png
            (also used that edited name in Search > Mark All)

          It worked for me.

          1 Reply Last reply Reply Quote 2
          • P
            Peter Greistorfer
            last edited by Mar 22, 2021, 4:20 PM

            I see, it works for you, Peter. Strange. Will re-check that issue after having installed the newest npp. But my main problem is successfully solved and that’s great!

            Thanks again and have a nice day,

            another Peter

            P 1 Reply Last reply Mar 22, 2021, 4:39 PM Reply Quote 1
            • P
              Peter Greistorfer @Peter Greistorfer
              last edited by Mar 22, 2021, 4:39 PM

              Wait, please, just one question:

              If I style, e.g., MyWord with CYAN, then all occurrences of MyWord are coloured CYAN … is there any way to style/colour only a single MyWord, I mean a type of colour formatting (I should add, I set up a python-macro, found in the net, which loads and saves styles. It works fine, but as sketched, not in the “single-mode”).

              A 2 Replies Last reply Mar 22, 2021, 5:05 PM Reply Quote 0
              • A
                Alan Kilborn @Peter Greistorfer
                last edited by Mar 22, 2021, 5:05 PM

                @Peter-Greistorfer said in Changing context menu text in a language.xml:

                If I style, e.g., MyWord with CYAN, then all occurrences of MyWord are coloured CYAN …

                is there any way to style/colour only a single MyWord

                Nope. Currently that just isn’t how the feature works. You get ALL occurrences.

                1 Reply Last reply Reply Quote 2
                • A
                  Alan Kilborn @Peter Greistorfer
                  last edited by Mar 22, 2021, 5:20 PM

                  @Peter-Greistorfer

                  is there any way to style/colour only a single MyWord

                  Nope. Currently that just isn’t how the feature works. You get ALL occurrences.

                  But I did just locate this:
                  https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9263

                  So maybe there is hope for your desire in the future!

                  P 1 Reply Last reply Mar 22, 2021, 6:33 PM Reply Quote 3
                  • P
                    Peter Greistorfer @Alan Kilborn
                    last edited by Mar 22, 2021, 6:33 PM

                    @Alan-Kilborn Exactly, thank you for the link!

                    1 Reply Last reply Reply Quote 0
                    • P
                      PeterJones @PeterJones
                      last edited by Mar 22, 2021, 7:20 PM

                      @PeterJones said in Changing context menu text in a language.xml:

                      PS: I have given myself issue#180 to clarify the docs somewhat with regard to how to use ID vs MenuEntryName or PluginEntryName.

                      FYI: PR#181 should clarify this usage.

                      P 1 Reply Last reply Mar 23, 2021, 10:04 AM Reply Quote 1
                      • P
                        Peter Greistorfer @PeterJones
                        last edited by Mar 23, 2021, 10:04 AM

                        @PeterJones I see - and understand, thank you!

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