Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not localized context menu entry "Edit with Notepad++" #7747

Closed
gmikhail opened this issue Dec 16, 2019 · 12 comments
Closed

Not localized context menu entry "Edit with Notepad++" #7747

gmikhail opened this issue Dec 16, 2019 · 12 comments

Comments

@gmikhail
Copy link

Description of the Issue

Regardless of the language selected during installation, the context menu is always "Edit with Notepad++"

Аннотация 2019-12-16 195538

Steps to Reproduce the Issue

  1. Run installer in non-english language (eg russian)
  2. Install Notepad++ (eg x64) with context menu entry and non-english localization file (eg russian)
  3. You will see in the context menu (RMB on a text file) "Edit with Notepad++"

Expected Behavior

When I choose Russian localization I want get "Изменить в Notepad++" in context menu entry

Actual Behavior

I always get "Edit with Notepad++" in context menu entry

Debug Information

Notepad++ v7.8.2 (64-bit)
Build time : Dec 4 2019 - 01:39:49
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 (64-bit)
OS Version : 1909
OS Build : 18363.535
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

@gmikhail gmikhail changed the title Localized context menu item "Edit with Notepad++" Not localized context menu entry "Edit with Notepad++" Dec 16, 2019
@andrecool-68
Copy link

andrecool-68 commented Dec 17, 2019

  1. Открой каталог где находиться файл notepad++.exe, и убедитесь что там присутствует файл NppShell_06.dll
  2. Запусти командную строку из этого каталога с этим кодом:
    regsvr32 /s /i NppShell_06.dll

Перед вами появиться данное окно ...там и делайте свою локализацию!
Безымянный

Чтобы удалить запись из контекстного меню, запустите из каталога где находиться файл notepad++.exe следующий код:
regsvr32 /s /u NppShell_06.dll

@andrecool-68
Copy link

andrecool-68 commented Dec 17, 2019

Второй вариант
Придется для этого редактировать файл shortcuts.xml (надеюсь вы его найдете в каталоге с notepad++.exe)

		<Command name="Add Notepad++ to the context menu" Ctrl="no" Alt="no" Shift="no" Key="0">regsvr32 /s /i NppShell_06.dll</Command>
		<Command name="Remove Notepad++ from the context menu" Ctrl="no" Alt="no" Shift="no" Key="0">regsvr32 /s /u NppShell_06.dll</Command>
	</UserDefinedCommands>

И теперь все эти операции можно делать из меню RUN

Безымянный

@andrecool-68
Copy link

Третий вариант это открыть редактор реестра и найти фразу Edit with &Notepad++ и отредактировать ее!
Безымянный

@gmikhail
Copy link
Author

@andrecool-68 спасибо, использовал первый вариант!

Только саму проблему это не решает. Проблема либо в локализации (нет перевода), либо в инсталляторе (игнорирует выбранный язык).


@andrecool-68 thanks, used the first option!

But this does not solve the problem. The problem is either in localization (no translation), or in the installer (ignores the selected language).

@andrecool-68
Copy link

andrecool-68 commented Dec 17, 2019

@gmikhail В файле NppShell_06.dll только английский язык! Его можно сделать и многоязычным, но будет ли подхватываться эта локализация при установке я не знаю. Честного говоря для меня эта опция вообще не актуальная так как я всегда использую портативную версию. А запись в контекстное меню добавляю ...вторым способом

@xylographe
Copy link
Contributor

Here is an example of a localized entry in the Registry,

value name:  FriendlyAppName
value type:  REG_SZ
value data:  @C:\Program Files\Subtitle Edit\SubtitleEdit.resources.dll,-10000

The number (10000) identifies the resource (STRINGTABLE) in the DLL. The table contains a string for each supported language.

@donho
Copy link
Member

donho commented Dec 20, 2019

There's no way to localize context menu grammatically.

@donho donho closed this as completed Dec 20, 2019
@xylographe
Copy link
Contributor

@donho
There is! The context menu entry can be created dynamically (as opposed to a static Registry entry).
Hash Check Shell Extension, for example, works this way (IDS_HS_MENUTEXT is the StringTable identifier for the localized "Create Checksum File..." string).

@gmikhail
Copy link
Author

I propose to reopen this issue as a bug because after each update the context menu translation is reset. The proposed solution does not solve the problem itself.

Proposal for fix: add localization strings of context menu to the installer and apply it during installation or add localization to Notepad++ with the ability to disable/enable the context menu.

Right now "Edit with Notepad++" is hardcoded in PowerEditor\src\tools\NppShell\src\NppShell.cpp

//Menu
TCHAR szNppName[] = TEXT("notepad++.exe");
TCHAR szDefaultMenutext[] = TEXT("Edit with &Notepad++");

@Hexaae
Copy link

Hexaae commented Mar 23, 2020

I agree, and I opened a similar thread BTW (didn't know this one):
https://community.notepad-plus-plus.org/topic/18709/localize-notepad-context-menu-items/4

Those context menu strings should be localized.

@andrecool-68
Copy link

Read and don't fool eggs:
#7741

@donho
Copy link
Member

donho commented Feb 20, 2023

It's possible to localize explorer context menu entry under Windows 11 - implemented in #13170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants