mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 16:24:27 +02:00
Make tab splitter menu and incremental search translatable
Rename menu IDs in tab splitter to be in English. Relocate some controls in incremental search dialog to ease translation. Fix #8955, close #9496
This commit is contained in:
parent
6e43ba6ea5
commit
35584b379f
@ -1359,6 +1359,8 @@ Find in all files except exe, obj && log:
|
||||
<common-name value="Name: "/>
|
||||
<tabrename-title value="Rename Current Tab"/>
|
||||
<tabrename-newname value="New Name: "/>
|
||||
<splitter-rotate-left value="Rotate to left"/>
|
||||
<splitter-rotate-right value="Rotate to right"/>
|
||||
<recent-file-history-maxfile value="Max File: "/>
|
||||
<language-tabsize value="Tab Size: "/>
|
||||
<userdefined-title-new value="Create New Language..."/>
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include <stdexcept>
|
||||
#include <windows.h>
|
||||
#include "SplitterContainer.h"
|
||||
#include "Parameters.h"
|
||||
#include "localization.h"
|
||||
#include <cassert>
|
||||
|
||||
|
||||
@ -179,12 +181,12 @@ LRESULT SplitterContainer::runProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case ROTATION_A_GAUCHE:
|
||||
case ROTATION_LEFT:
|
||||
{
|
||||
rotateTo(DIRECTION::LEFT);
|
||||
break;
|
||||
}
|
||||
case ROTATION_A_DROITE:
|
||||
case ROTATION_RIGHT:
|
||||
{
|
||||
rotateTo(DIRECTION::RIGHT);
|
||||
break;
|
||||
@ -240,8 +242,15 @@ LRESULT SplitterContainer::runProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (!_hPopupMenu)
|
||||
{
|
||||
_hPopupMenu = ::CreatePopupMenu();
|
||||
::InsertMenu(_hPopupMenu, 1, MF_BYPOSITION, ROTATION_A_GAUCHE, TEXT("Rotate to left"));
|
||||
::InsertMenu(_hPopupMenu, 0, MF_BYPOSITION, ROTATION_A_DROITE, TEXT("Rotate to right"));
|
||||
|
||||
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
||||
const generic_string textLeft =
|
||||
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-left", TEXT("Rotate to left"));
|
||||
const generic_string textRight =
|
||||
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-right", TEXT("Rotate to right"));
|
||||
|
||||
::InsertMenu(_hPopupMenu, 1, MF_BYPOSITION, ROTATION_LEFT, textLeft.c_str());
|
||||
::InsertMenu(_hPopupMenu, 0, MF_BYPOSITION, ROTATION_RIGHT, textRight.c_str());
|
||||
}
|
||||
|
||||
::TrackPopupMenu(_hPopupMenu, TPM_LEFTALIGN, p.x, p.y, 0, _hSelf, NULL);
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#define SPC_CLASS_NAME TEXT("splitterContainer")
|
||||
|
||||
#define ROTATION_A_GAUCHE 2000
|
||||
#define ROTATION_A_DROITE 2001
|
||||
#define ROTATION_LEFT 2000
|
||||
#define ROTATION_RIGHT 2001
|
||||
|
||||
|
||||
enum class DIRECTION
|
||||
|
Loading…
x
Reference in New Issue
Block a user