Synchronize GUP localization file with Notepad++ in installer

During the installation, GUP localization file will be synchronized with Notepad++ chosen localization.
So updater will show the same installed language of Notepad++ in the dialogs if the language is avalable in GUP.
This commit is contained in:
Don HO 2021-02-07 00:15:51 +01:00
parent a4d7f77016
commit 5155dfed9d
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
2 changed files with 6 additions and 1 deletions

View File

@ -76,6 +76,8 @@ ${MementoSection} "Auto-Updater" AutoUpdater
File "..\bin\updater\LICENSE"
File "..\bin\updater\README.md"
!endif
SetOutPath "$PLUGINSDIR\gupLocalization"
File "..\bin\updater\translations\"
${MementoSectionEnd}
${MementoSection} "Plugins Admin" PluginsAdmin
@ -143,6 +145,7 @@ Section un.AutoUpdater
Delete "$INSTDIR\updater\readme.txt"
Delete "$INSTDIR\updater\README.md"
Delete "$INSTDIR\updater\getDownLoadUrl.php"
Delete "$INSTDIR\updater\nativeLang.xml"
RMDir "$INSTDIR\updater"
SectionEnd

View File

@ -121,9 +121,11 @@ Function copyCommonFiles
IfFileExists "$INSTDIR\nativeLang.xml" 0 +2
Delete "$INSTDIR\nativeLang.xml"
StrCmp $LANGUAGE ${LANG_ENGLISH} +3 0
StrCmp $LANGUAGE ${LANG_ENGLISH} +5 0
CopyFiles "$PLUGINSDIR\nppLocalization\$(langFileName)" "$UPDATE_PATH\nativeLang.xml"
CopyFiles "$PLUGINSDIR\nppLocalization\$(langFileName)" "$INSTDIR\localization\$(langFileName)"
IfFileExists "$PLUGINSDIR\gupLocalization\$(langFileName)" 0 +2
CopyFiles "$PLUGINSDIR\gupLocalization\$(langFileName)" "$INSTDIR\updater\nativeLang.xml"
FunctionEnd