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
pull/9543/head
mere-human 4 years ago committed by Don HO
parent 6e43ba6ea5
commit 35584b379f
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -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…
Cancel
Save