[RELEASE_4_3] v4.3 is entirely translatable.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@43 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-09-23 21:17:14 +00:00
parent 24bb9be975
commit 772874cbdc
11 changed files with 61 additions and 17 deletions

View File

@ -10,6 +10,8 @@ Notepad++ v4.3 fixed bugs and added features (from v4.2.2) :
8. Add new capacity (optional setting in Preferences dialog : Backup/Auto-completion tab) to trigger Auto-Completion(Function Completion or Word completion) automatically . 8. Add new capacity (optional setting in Preferences dialog : Backup/Auto-completion tab) to trigger Auto-Completion(Function Completion or Word completion) automatically .
9. The set languages in session are remembered now. 9. The set languages in session are remembered now.
10. Fix the Move down current line bug. 10. Fix the Move down current line bug.
11. Add the start up with no plugins feature (command line : notepad++ -noPlugins).
12. Fix the display file type bug on the status bar while switching between the files.
Included plugins : Included plugins :

View File

@ -4880,6 +4880,10 @@ void Notepad_plus::changePrefereceDlgLang()
if (*title) if (*title)
_preference._ctrlTab.renameTab("MISC", title); _preference._ctrlTab.renameTab("MISC", title);
changeDlgLang(_preference._backupDlg.getHSelf(), "Backup", title);
if (*title)
_preference._ctrlTab.renameTab("Backup", title);
} }
TiXmlNode * searchDlgNode(TiXmlNode *node, const char *dlgTagName) TiXmlNode * searchDlgNode(TiXmlNode *node, const char *dlgTagName)

View File

@ -926,6 +926,40 @@ public:
FindDlgTabTitiles & getFindDlgTabTitiles() { return _findDlgTabTitiles;}; FindDlgTabTitiles & getFindDlgTabTitiles() { return _findDlgTabTitiles;};
const char * getNativeLangMenuString(int itemID) {
if (!_pXmlNativeLangDoc)
return NULL;
TiXmlNode * node = _pXmlNativeLangDoc->FirstChild("NotepadPlus");
if (!node) return NULL;
node = node->FirstChild("Native-Langue");
if (!node) return NULL;
node = node->FirstChild("Menu");
if (!node) return NULL;
node = node->FirstChild("Main");
if (!node) return NULL;
node = node->FirstChild("Commands");
if (!node) return NULL;
for (TiXmlNode *childNode = node->FirstChildElement("Item");
childNode ;
childNode = childNode->NextSibling("Item") )
{
TiXmlElement *element = childNode->ToElement();
int id;
if (element->Attribute("id", &id) && (id == itemID))
{
return element->Attribute("name");
}
}
return NULL;
};
private: private:
NppParameters(); NppParameters();
~NppParameters() { ~NppParameters() {

View File

@ -39,10 +39,10 @@ BEGIN
EDITTEXT IDC_COL_INCREASENUM_EDIT,95,110,38,12,ES_NUMBER EDITTEXT IDC_COL_INCREASENUM_EDIT,95,110,38,12,ES_NUMBER
CONTROL "Leadng zeros", IDC_COL_LEADZERO_CHECK,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,140,112,70,10 CONTROL "Leadng zeros", IDC_COL_LEADZERO_CHECK,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,140,112,70,10
CONTROL "Dec",IDC_COL_DEC_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,30,148,28,10 CONTROL "Dec",IDC_COL_DEC_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,30,148,50,10
CONTROL "Hex",IDC_COL_HEX_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,124,148,29,10 CONTROL "Hex",IDC_COL_HEX_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,124,148,50,10
CONTROL "Oct",IDC_COL_OCT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,30,167,27,10 CONTROL "Oct",IDC_COL_OCT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,30,167,50,10
CONTROL "Bin",IDC_COL_BIN_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,124,167,25,10 CONTROL "Bin",IDC_COL_BIN_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,124,167,50,10
GROUPBOX "Format",IDC_COL_FORMAT_GRP_STATIC,20,132,188,54,BS_CENTER GROUPBOX "Format",IDC_COL_FORMAT_GRP_STATIC,20,132,188,54,BS_CENTER
DEFPUSHBUTTON "OK",IDOK,145,13,70,14,BS_NOTIFY DEFPUSHBUTTON "OK",IDOK,145,13,70,14,BS_NOTIFY
PUSHBUTTON "Cancel",IDCANCEL,145,36,70,14,BS_NOTIFY PUSHBUTTON "Cancel",IDCANCEL,145,36,70,14,BS_NOTIFY

View File

@ -92,7 +92,7 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
_hBgColourStaticText = ::GetDlgItem(_hSelf, IDC_BG_STATIC); _hBgColourStaticText = ::GetDlgItem(_hSelf, IDC_BG_STATIC);
_hFontNameStaticText = ::GetDlgItem(_hSelf, IDC_FONTNAME_STATIC); _hFontNameStaticText = ::GetDlgItem(_hSelf, IDC_FONTNAME_STATIC);
_hFontSizeStaticText = ::GetDlgItem(_hSelf, IDC_FONTSIZE_STATIC); _hFontSizeStaticText = ::GetDlgItem(_hSelf, IDC_FONTSIZE_STATIC);
_hStyleInfoStaticText = ::GetDlgItem(_hSelf, IDC_STYLEDEFAULT_WARNING_STATIC); _hStyleInfoStaticText = ::GetDlgItem(_hSelf, IDC_STYLEDESCRIPTION_STATIC);
colourHooker.setColour(RGB(0xFF, 0x00, 0x00)); colourHooker.setColour(RGB(0xFF, 0x00, 0x00));
colourHooker.hookOn(_hStyleInfoStaticText); colourHooker.hookOn(_hStyleInfoStaticText);
@ -538,17 +538,17 @@ void WordStyleDlg::setVisualFromStyleList()
//--Warning text //--Warning text
//bool showWarning = ((_currentLexerIndex == 0) && (style._styleID == STYLE_DEFAULT));//?SW_SHOW:SW_HIDE; //bool showWarning = ((_currentLexerIndex == 0) && (style._styleID == STYLE_DEFAULT));//?SW_SHOW:SW_HIDE;
COLORREF c = RGB(0xFF, 0x00, 0x00); COLORREF c = c = RGB(0x00, 0x00, 0xFF);
char str[256]; char str[256];
strcpy(str, _originalWarning); //strcpy(str, _originalWarning);
//if (!showWarning) //if (!showWarning)
{ {
if (!_originalWarning[0]) //if (!_originalWarning[0])
// Get the original text for the usage afterward // Get the original text for the usage afterward
::GetWindowText(_hStyleInfoStaticText, _originalWarning, sizeof(_originalWarning)); //::GetWindowText(_hStyleInfoStaticText, _originalWarning, sizeof(_originalWarning));
str[0] = '\0'; str[0] = '\0';
c = RGB(0x00, 0x00, 0xFF);
int i = ::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_GETCURSEL, 0, 0); int i = ::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_GETCURSEL, 0, 0);
if (i == LB_ERR) if (i == LB_ERR)
return; return;

View File

@ -64,7 +64,7 @@ private :
class WordStyleDlg : public StaticDialog class WordStyleDlg : public StaticDialog
{ {
public : public :
WordStyleDlg():_isDirty(false), _isSync(true), _isShownGOCtrls(false){_originalWarning[0] = '\0';}; WordStyleDlg():_isDirty(false), _isSync(true), _isShownGOCtrls(false){/*_originalWarning[0] = '\0';*/};
void init(HINSTANCE hInst, HWND parent) { void init(HINSTANCE hInst, HWND parent) {
Window::init(hInst, parent); Window::init(hInst, parent);
@ -125,7 +125,7 @@ private :
HWND _hFontNameStaticText; HWND _hFontNameStaticText;
HWND _hFontSizeStaticText; HWND _hFontSizeStaticText;
HWND _hStyleInfoStaticText; HWND _hStyleInfoStaticText;
char _originalWarning[256]; //char _originalWarning[256];
LexerStylerArray _lsArray; LexerStylerArray _lsArray;
StyleArray _globalStyles; StyleArray _globalStyles;

View File

@ -42,7 +42,8 @@ BEGIN
LTEXT "Font Name :",IDC_FONTNAME_STATIC,315,47,52,8,0, WS_EX_RIGHT LTEXT "Font Name :",IDC_FONTNAME_STATIC,315,47,52,8,0, WS_EX_RIGHT
LTEXT "Font size :",IDC_FONTSIZE_STATIC,381,73,51,8,0, WS_EX_RIGHT LTEXT "Font size :",IDC_FONTSIZE_STATIC,381,73,51,8,0, WS_EX_RIGHT
LTEXT "Style :",IDC_STYLEDESC_STATIC,87,10,68,8 LTEXT "Style :",IDC_STYLEDESC_STATIC,87,10,68,8
LTEXT "Attention : The definition of this style will be the default definition for all non defined styles", IDC_STYLEDEFAULT_WARNING_STATIC,190,6,295,22 //LTEXT "Attention : The definition of this style will be the default definition for all non defined styles", IDC_STYLEDEFAULT_WARNING_STATIC,190,6,295,22
LTEXT " ", IDC_STYLEDESCRIPTION_STATIC,190,6,295,22
EDITTEXT IDC_DEF_EXT_EDIT,17,191,61,14,ES_AUTOHSCROLL | ES_READONLY EDITTEXT IDC_DEF_EXT_EDIT,17,191,61,14,ES_AUTOHSCROLL | ES_READONLY
LTEXT "Default ext : ",IDC_DEF_EXT_STATIC,20,179,61,8 LTEXT "Default ext : ",IDC_DEF_EXT_STATIC,20,179,61,8
EDITTEXT IDC_USER_EXT_EDIT,93,191,71,14, ES_AUTOHSCROLL EDITTEXT IDC_USER_EXT_EDIT,93,191,71,14, ES_AUTOHSCROLL

View File

@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define IDC_BG_STATIC (IDD_STYLER_DLG + 7) #define IDC_BG_STATIC (IDD_STYLER_DLG + 7)
#define IDC_FONTNAME_STATIC (IDD_STYLER_DLG + 8) #define IDC_FONTNAME_STATIC (IDD_STYLER_DLG + 8)
#define IDC_FONTSIZE_STATIC (IDD_STYLER_DLG + 9) #define IDC_FONTSIZE_STATIC (IDD_STYLER_DLG + 9)
#define IDC_STYLEDEFAULT_WARNING_STATIC (IDD_STYLER_DLG + 10) //#define IDC_STYLEDEFAULT_WARNING_STATIC (IDD_STYLER_DLG + 10) for the sake of compablity of traslation xml files, this number (2210) don't be use anymore by Notepad++
#define IDC_STYLEDESC_STATIC (IDD_STYLER_DLG + 11) #define IDC_STYLEDESC_STATIC (IDD_STYLER_DLG + 11)
#define IDC_COLOURGROUP_STATIC (IDD_STYLER_DLG + 12) #define IDC_COLOURGROUP_STATIC (IDD_STYLER_DLG + 12)
#define IDC_FONTGROUP_STATIC (IDD_STYLER_DLG + 13) #define IDC_FONTGROUP_STATIC (IDD_STYLER_DLG + 13)
@ -53,6 +53,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define IDC_GLOBAL_BOLD_CHECK (IDD_STYLER_DLG + 30) #define IDC_GLOBAL_BOLD_CHECK (IDD_STYLER_DLG + 30)
#define IDC_GLOBAL_ITALIC_CHECK (IDD_STYLER_DLG + 31) #define IDC_GLOBAL_ITALIC_CHECK (IDD_STYLER_DLG + 31)
#define IDC_GLOBAL_UNDERLINE_CHECK (IDD_STYLER_DLG + 32) #define IDC_GLOBAL_UNDERLINE_CHECK (IDD_STYLER_DLG + 32)
#define IDC_STYLEDESCRIPTION_STATIC (IDD_STYLER_DLG + 33)
# define IDD_GLOBAL_STYLER_DLG 2300 # define IDD_GLOBAL_STYLER_DLG 2300
#define IDC_SAVECLOSE_BUTTON (IDD_GLOBAL_STYLER_DLG + 1) #define IDC_SAVECLOSE_BUTTON (IDD_GLOBAL_STYLER_DLG + 1)

View File

@ -226,7 +226,7 @@ IDD_PREFERENCE_BACKUP_BOX DIALOGEX 0, 0, 305, 147
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
GROUPBOX "Backup",IDC_STATIC,9,0,289,83,BS_CENTER GROUPBOX "Backup",IDC_BACKUPDIR_GRP_STATIC,9,0,289,83,BS_CENTER
CONTROL "None",IDC_RADIO_BKNONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,34,10,87,10 CONTROL "None",IDC_RADIO_BKNONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,34,10,87,10
CONTROL "Simple Backup",IDC_RADIO_BKSIMPLE,"Button",BS_AUTORADIOBUTTON,158,10,111,10 CONTROL "Simple Backup",IDC_RADIO_BKSIMPLE,"Button",BS_AUTORADIOBUTTON,158,10,111,10
CONTROL "Verbose Backup",IDC_RADIO_BKVERBOSE,"Button",BS_AUTORADIOBUTTON,158,24,111,10 CONTROL "Verbose Backup",IDC_RADIO_BKVERBOSE,"Button",BS_AUTORADIOBUTTON,158,24,111,10
@ -236,7 +236,7 @@ BEGIN
EDITTEXT IDC_BACKUPDIR_EDIT,76,51,179,14,ES_AUTOHSCROLL EDITTEXT IDC_BACKUPDIR_EDIT,76,51,179,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDD_BACKUPDIR_BROWSE_BUTTON,262,51,16,14 PUSHBUTTON "...",IDD_BACKUPDIR_BROWSE_BUTTON,262,51,16,14
GROUPBOX "Auto-completion",IDD_AUTOC_GRPSTATIC,9,89,289,56,BS_CENTER GROUPBOX "Auto-completion",IDD_AUTOC_GRPSTATIC,9,89,289,56,BS_CENTER
CONTROL "Enable Auto-completion on each input",IDD_AUTOC_ENABLECHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,99,141,10 CONTROL "Enable Auto-completion on each input",IDD_AUTOC_ENABLECHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,99,150,10
CONTROL "Function completion",IDD_AUTOC_FUNCRADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,41,114,145,10 CONTROL "Function completion",IDD_AUTOC_FUNCRADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,41,114,145,10
CONTROL "Word completion",IDD_AUTOC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,41,130,145,10 CONTROL "Word completion",IDD_AUTOC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,41,130,145,10
END END

View File

@ -43,8 +43,10 @@ public :
if (!_hasSeparators) if (!_hasSeparators)
{ {
const char * nativeLangOpenAllFiles = (NppParameters::getInstance())->getNativeLangMenuString(IDM_OPEN_ALL_RECENT_FILE);
const char * openAllFileStr = nativeLangOpenAllFiles?nativeLangOpenAllFiles:"Open All Recent Files";
::InsertMenu(_hMenu, _posBase + size + 1, MF_BYPOSITION, UINT(-1), 0); ::InsertMenu(_hMenu, _posBase + size + 1, MF_BYPOSITION, UINT(-1), 0);
::InsertMenu(_hMenu, _posBase + size + 2, MF_BYPOSITION, IDM_OPEN_ALL_RECENT_FILE, "Open All Recent Files"); ::InsertMenu(_hMenu, _posBase + size + 2, MF_BYPOSITION, IDM_OPEN_ALL_RECENT_FILE, openAllFileStr);
::InsertMenu(_hMenu, _posBase + size + 3, MF_BYPOSITION, UINT(-1), 0); ::InsertMenu(_hMenu, _posBase + size + 3, MF_BYPOSITION, UINT(-1), 0);
_hasSeparators = true; _hasSeparators = true;
} }