From 97b091bedcfeb1f7b84c2d0a96405a71837e2214 Mon Sep 17 00:00:00 2001 From: zufuliu Date: Mon, 11 Nov 2024 19:08:02 +0800 Subject: [PATCH] Rename scheme menu "Office VBA" to "VBA / VB 6.0" since they have same syntax. --- doc/FileExt.txt | 8 +++++--- locale/de/Notepad4.rc | 4 ++-- locale/fr/Notepad4.rc | 4 ++-- locale/it/Notepad4.rc | 4 ++-- locale/ja/Notepad4.rc | 4 ++-- locale/ko/Notepad4.rc | 4 ++-- locale/pt-BR/Notepad4.rc | 4 ++-- locale/ru/Notepad4.rc | 4 ++-- locale/zh-Hans/Notepad4.rc | 4 ++-- locale/zh-Hant/Notepad4.rc | 4 ++-- src/Notepad4.rc | 4 ++-- src/Styles.cpp | 2 +- 12 files changed, 26 insertions(+), 24 deletions(-) diff --git a/doc/FileExt.txt b/doc/FileExt.txt index c321cbac90..2c1d29452e 100644 --- a/doc/FileExt.txt +++ b/doc/FileExt.txt @@ -588,13 +588,15 @@ Vim Script Visual Basic vb - bas VBA Source Code File + + https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa241721(v=vs.60) + bas Visual Basic Module frm Visual Basic Text Form cls Program Class File ctl Visual Basic User Control Object File - pag Visual Basic Property Page + pag Visual Basic Property Page File dsr Visual Basic Active Designer File - dob Visual Basic User Document + dob ActiveX Document Form File WebAssembly diff --git a/locale/de/Notepad4.rc b/locale/de/Notepad4.rc index 50f3780726..0e0c7701f1 100644 --- a/locale/de/Notepad4.rc +++ b/locale/de/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML Dokument" diff --git a/locale/fr/Notepad4.rc b/locale/fr/Notepad4.rc index 2c55afdf18..e2584143df 100644 --- a/locale/fr/Notepad4.rc +++ b/locale/fr/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "Langage SQL" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "Document XML" diff --git a/locale/it/Notepad4.rc b/locale/it/Notepad4.rc index d13ea1fce0..2845f467b5 100644 --- a/locale/it/Notepad4.rc +++ b/locale/it/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "Documento &XML" diff --git a/locale/ja/Notepad4.rc b/locale/ja/Notepad4.rc index 3b1adcdb3b..c915ea22f1 100644 --- a/locale/ja/Notepad4.rc +++ b/locale/ja/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "XML文書(&X)" diff --git a/locale/ko/Notepad4.rc b/locale/ko/Notepad4.rc index c4bc8c2f64..778508c0a1 100644 --- a/locale/ko/Notepad4.rc +++ b/locale/ko/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "SQL 방언(&Q)" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "XML 문서(&X)" diff --git a/locale/pt-BR/Notepad4.rc b/locale/pt-BR/Notepad4.rc index 77979af9e3..33821c0e7d 100644 --- a/locale/pt-BR/Notepad4.rc +++ b/locale/pt-BR/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML Document" diff --git a/locale/ru/Notepad4.rc b/locale/ru/Notepad4.rc index 2d98a5893b..081ebab975 100644 --- a/locale/ru/Notepad4.rc +++ b/locale/ru/Notepad4.rc @@ -555,8 +555,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML-документ" diff --git a/locale/zh-Hans/Notepad4.rc b/locale/zh-Hans/Notepad4.rc index ed8040c7bb..43e7e6468e 100644 --- a/locale/zh-Hans/Notepad4.rc +++ b/locale/zh-Hans/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML 文档" diff --git a/locale/zh-Hant/Notepad4.rc b/locale/zh-Hant/Notepad4.rc index d659193d0e..064b7a35de 100644 --- a/locale/zh-Hant/Notepad4.rc +++ b/locale/zh-Hant/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML 文件" diff --git a/src/Notepad4.rc b/src/Notepad4.rc index 9446cc9fe9..c5aab4a87e 100644 --- a/src/Notepad4.rc +++ b/src/Notepad4.rc @@ -554,8 +554,8 @@ BEGIN //POPUP "S&QL Dialect" POPUP "&Visual Basic" BEGIN - MENUITEM "&Visual Basic", IDM_LEXER_VBNET - MENUITEM "&Office VBA", IDM_LEXER_VBA + MENUITEM "Visual &Basic", IDM_LEXER_VBNET + MENUITEM "&VBA / VB 6.0", IDM_LEXER_VBA MENUITEM "VB&Script", IDM_LEXER_VBS END POPUP "&XML Document" diff --git a/src/Styles.cpp b/src/Styles.cpp index 4f3258138f..71ab2a4765 100644 --- a/src/Styles.cpp +++ b/src/Styles.cpp @@ -2437,7 +2437,7 @@ static void Style_UpdateLexerLang(LPCEDITLEXER pLex, LPCWSTR lpszExt, LPCWSTR lp break; case NP2LEX_VISUALBASIC: - if (StrCaseEqual(L"bas", lpszExt)) { + if (lstrlen(lpszExt) == 3) { np2LexLangIndex = IDM_LEXER_VBA; } break;