Skip to content

Untranslated menus cause error: improvement proposal #24

Description

@FilipL505

As a complete newbie in notepad++ plugin development I encountered the following issue.
While trying to understand the plugin and it functions, I simply started with removing all the existing menus and adding some new menus do something simple.
As result of this, 2 errors where thrown during Notepad++ startup.

After some digging the reason is simple.
I used the Translator routine (Translator.GetTranslatedMenuItem("My menu")) as in your examples, however without a translation being set-up.
I know, should not be done, but like is stated, all of this is completely new to me.

Since, I find your plugin a great to get started, I was wandering if it would not be better to catch these errors and return an more clear message, educating the beginner even more.

I found that the:

  • In the Main.SetToolBarIcons routine: the funcID field of the PluginBase._funcItems.Items[funcId]._cmdID object is set to -1
  • In the Settings.SetXmlMenuItemCheck routine: the Main.IdCloseHtmlTag is set to -1.
    Both causing an error during startup.

I downloaded the latest version of the plugin as far that I know [0.0.4],[0.0.3] - 2024-02-26 downloaded at 9 mach 2026 and tested with Notepad++ v8.9.3 (64-bit)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions