Refine "Open UDL folder" command & make it translatable

pull/7640/head
Don HO 5 years ago
parent 302b88e0ea
commit 3220eaaa30
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -63,6 +63,7 @@
<Item subMenuId="encoding-turkish" name="土耳其文"/>
<Item subMenuId="encoding-westernEuropean" name="西歐語系"/>
<Item subMenuId="encoding-vietnamese" name="越南文"/>
<Item subMenuId="language-userDefinedLanguage" name="自訂程式語言"/>
<Item subMenuId="settings-import" name="匯入"/>
<Item subMenuId="tools-md5" name="MD5"/>
<Item subMenuId="tools-sha256" name="SHA-256"/>
@ -283,6 +284,7 @@
<Item id="46001" name="設定程式語言格式..."/>
<Item id="46250" name="定義程式語言..."/>
<Item id="46300" name="開啟自訂程式語言資料夾..."/>
<Item id="46180" name="偏好設定"/>
<Item id="47000" name="關於 Notepad++..."/>
<Item id="47001" name="Notepad++ 官方網站"/>

@ -63,9 +63,10 @@
<Item subMenuId="encoding-turkish" name="Turkish"/>
<Item subMenuId="encoding-westernEuropean" name="Western European"/>
<Item subMenuId="encoding-vietnamese" name="Vietnamese"/>
<Item subMenuId="settings-import" name="Import"/>
<Item subMenuId="tools-md5" name="MD5"/>
<Item subMenuId="tools-sha256" name="SHA-256"/>
<Item subMenuId="language-userDefinedLanguage" name="User Defined Language"/>
<Item subMenuId="settings-import" name="Import"/>
<Item subMenuId="tools-md5" name="MD5"/>
<Item subMenuId="tools-sha256" name="SHA-256"/>
</SubEntries>
<!-- all menu item -->
@ -281,6 +282,7 @@
<Item id="46001" name="Style Configurator..."/>
<Item id="46250" name="Define your language..."/>
<Item id="46300" name="Open User Defined Language folder..."/>
<Item id="46180" name="User-Defined"/>
<Item id="47000" name="About Notepad++"/>
<Item id="47010" name="Command Line Arguments..."/>

@ -63,6 +63,7 @@
<Item subMenuId="encoding-turkish" name="Turc"/>
<Item subMenuId="encoding-westernEuropean" name="Langues dEurope occidentale"/>
<Item subMenuId="encoding-vietnamese" name="Vietnamien"/>
<Item subMenuId="language-userDefinedLanguage" name="Langage utilisateur"/>
<Item subMenuId="settings-import" name="Importer"/>
<Item subMenuId="tools-md5" name="MD5"/>
<Item subMenuId="tools-sha256" name="SHA-256"/>
@ -282,6 +283,7 @@
<Item id="45013" name="Convertir en UCS-2 LE BOM"/>
<Item id="46001" name="Configurateur de coloration syntaxique..."/>
<Item id="46250" name="Définir votre langage..."/>
<Item id="46300" name="Ovrir le dossier des Langages utilisateur..."/>
<Item id="46180" name="Langage utilisateur"/>
<Item id="47000" name="À propos de Notepad++..."/>
<Item id="47001" name="Site officiel Notepad++"/>
@ -313,7 +315,7 @@
<Item id="50000" name="Complétion de fonction"/>
<Item id="50001" name="Complétion de mot"/>
<Item id="50002" name="Infobulle des paramètres de fonctions"/>
<Item id="50003" name="Document précédent"/>
<Item id="50003" name="Document précédent"/>
<Item id="50004" name="Document suivant"/>
<Item id="50005" name="Commencer/Arrêter enregistrement d'une macro"/>
<Item id="50006" name="Complétion de chemin d'accès du fichier"/>

@ -3049,10 +3049,10 @@ void Notepad_plus::command(int id)
}
break;
case IDM_LANG_OPENUDLDIR: {
generic_string _userPath = NppParameters::getInstance().getUserPath();
PathAppend(_userPath, TEXT("userDefineLangs"));
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), _userPath.c_str(), NULL, NULL, SW_SHOW);
case IDM_LANG_OPENUDLDIR:
{
generic_string userDefineLangFolderPath = NppParameters::getInstance().getUserDefineLangFolderPath();
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), userDefineLangFolderPath.c_str(), NULL, NULL, SW_SHOW);
break;
}

@ -1230,12 +1230,12 @@ bool NppParameters::load()
//-----------------------------------//
// userDefineLang.xml : for per user //
//-----------------------------------//
generic_string userDefineLangsFolderPath = _userDefineLangPath = _userPath;
_userDefineLangsFolderPath = _userDefineLangPath = _userPath;
PathAppend(_userDefineLangPath, TEXT("userDefineLang.xml"));
PathAppend(userDefineLangsFolderPath, TEXT("userDefineLangs"));
PathAppend(_userDefineLangsFolderPath, TEXT("userDefineLangs"));
std::vector<generic_string> udlFiles;
getFilesInFolder(udlFiles, TEXT("*.xml"), userDefineLangsFolderPath);
getFilesInFolder(udlFiles, TEXT("*.xml"), _userDefineLangsFolderPath);
_pXmlUserLangDoc = new TiXmlDocument(_userDefineLangPath);
loadOkay = _pXmlUserLangDoc->LoadFile();

@ -1615,6 +1615,14 @@ public:
return _userPath;
}
generic_string getUserDefineLangFolderPath() const {
return _userDefineLangsFolderPath;
}
generic_string getUserDefineLangPath() const {
return _userDefineLangPath;
}
bool writeSettingsFilesOnCloudForThe1stTime(const generic_string & cloudSettingsPath);
void setCloudChoice(const TCHAR *pathChoice);
void removeCloudChoice();
@ -1698,6 +1706,7 @@ private:
UserLangContainer *_userLangArray[NB_MAX_USER_LANG];
unsigned char _nbUserLang = 0; // won't be exceeded to 255;
generic_string _userDefineLangsFolderPath;
generic_string _userDefineLangPath;
ExternalLangContainer *_externalLangArray[NB_MAX_EXTERNAL_LANG];
int _nbExternalLang = 0;

@ -36,9 +36,9 @@ using namespace std;
MenuPosition menuPos[] = {
//==============================================
// {L0, L1, L2, id},
//==============================================
//==============================================
// {L0, L1, L2, id},
//==============================================
{ 0, -1, -1, "file" },
{ 1, -1, -1, "edit" },
{ 2, -1, -1, "search" },
@ -98,6 +98,8 @@ MenuPosition menuPos[] = {
{ 4, 5, 14, "encoding-westernEuropean" },
{ 4, 5, 15, "encoding-vietnamese" },
{ 5, 23, -1, "language-userDefinedLanguage" },
{ 6, 4, -1, "settings-import" },
{ 7, 0, -1, "tools-md5" },

Loading…
Cancel
Save