update translations in installer script (#349)

- uninstaller deletes shortcuts in all languages
- add translations for app name, installation types, and file associations
- adjust spaces and punctuations
This commit is contained in:
Cyano Hao 2024-03-30 13:19:31 +08:00 committed by GitHub
parent dd1bb88733
commit dfe2304067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 62 additions and 43 deletions

View File

@ -1,5 +1,4 @@
/* English 1033 */
LangString MessageAppName 1033 "Red Panda C++"
LangString MessageSectionMain 1033 "The Red Panda C++ IDE (Integrated Development Environment)"
LangString MessageSectionIcons 1033 "Various icons that you can use in your programs"
LangString MessageSectionMinGW32 1033 "The ${MINGW32_COMPILER_NAME} compiler and associated tools, headers and libraries"
@ -10,7 +9,7 @@ LangString MessageSectionShortcuts 1033 "Create shortcuts to Red Panda
LangString MessageSectionCompress 1033 "Compress the Red Panda C++ installation directory (requires Windows 10 or later)"
LangString MessageSectionConfig 1033 "Remove all leftover configuration files from previous installs"
LangString MessageUninstallText 1033 "This program will uninstall Red Panda C++, continue?"
LangString MessageUninstallV2 1033 " Red Panda C++ is already installed. $\n$\nClick OK to remove the previous version or Cancel to cancel the installation."
LangString MessageUninstallV2 1033 "Red Panda C++ is already installed. $\n$\nClick OK to remove the previous version or Cancel to cancel the installation."
LangString MessageUninstallingExisting 1033 "Removing the previous version..."
LangString MessageCompressing 1033 "Compressing the Red Panda C++ installation directory..."
LangString MessageRemoveConfig 1033 "Do you want to remove all the remaining configuration files?"
@ -33,30 +32,38 @@ LangString ErrorWindowsBuildRequired 1033 "Unsupported operating system. ${REQUI
LangString WarningArchMismatch 1033 "Note: installing Red Panda C++ for ${ARCH} on $osArch OS. You may want to install native build instead."
LangString StrAppName 1033 "${APP_NAME_EN}"
LangString StrInstTypeFull 1033 "Full"
LangString StrInstTypeMinimal 1033 "Minimal"
LangString StrInstTypeSafe 1033 "Safe"
LangString StrProjectFile 1033 "Project File"
LangString StrSourceFile 1033 "Source File"
LangString StrHeaderFile 1033 "Header File"
LangString StrUninstallerAppName 1033 "Uninstall ${APP_NAME_EN}"
/* Simplified Chinese 2052 */
LangString MessageAppName 2052 "小熊猫C++"
LangString MessageSectionMain 2052 "小熊猫C++ IDE (集成开发环境)"
LangString MessageSectionMain 2052 "小熊猫 C++ IDE集成开发环境"
LangString MessageSectionIcons 2052 "项目模板使用的图标文件"
LangString MessageSectionMinGW32 2052 "${MINGW32_COMPILER_NAME} 编译器和相关的工具、头文件和库"
LangString MessageSectionMinGW64 2052 "${MINGW64_COMPILER_NAME} 编译器和相关的工具、头文件和库"
LangString MessageSectionLangs 2052 "小熊猫C++翻译文件"
LangString MessageSectionAssocs 2052 "使用小熊猫C++打开这些文件"
LangString MessageSectionLangs 2052 "小熊猫 C++ 翻译文件"
LangString MessageSectionAssocs 2052 "使用小熊猫 C++ 打开这些文件"
LangString MessageSectionShortcuts 2052 "开始菜单和快捷方式"
LangString MessageSectionCompress 2052 "压缩小熊猫 C++ 安装目录(需要 Windows 10 或更高版本)"
LangString MessageSectionConfig 2052 "删除之前安装遗留的所有配置文件"
LangString MessageUninstallText 2052 "将要删除小熊猫C++, 是否继续?"
LangString MessageUninstallV2 2052 "本机上已经安装了旧版本小熊猫C++. $\n$\n点击'确定'以将其删除并继续,或者'取消'中止安装。"
LangString MessageUninstallText 2052 "将要删除小熊猫 C++, 是否继续?"
LangString MessageUninstallV2 2052 "本机上已经安装了旧版本小熊猫 C++。$\n$\n点击 “确定” 以将其删除并继续,或者 “取消” 中止安装。"
LangString MessageUninstallingExisting 2052 "正在删除旧版本..."
LangString MessageCompressing 2052 "正在压缩小熊猫 C++ 安装目录..."
LangString MessageRemoveConfig 2052 "你想要删除所有的配置文件吗?"
LangString SectionMainName 2052 "程序文件 (必须)"
LangString SectionMainName 2052 "程序文件(必需)"
LangString SectionIconsName 2052 "图标文件"
LangString SectionLangsName 2052 "语言文件"
LangString SectionMinGW32Name 2052 "${MINGW32_COMPILER_NAME} 编译器"
LangString SectionMinGW64Name 2052 "${MINGW64_COMPILER_NAME} 编译器"
LangString SectionAssocsName 2052 "关联文件到小熊猫C++"
LangString SectionAssocsName 2052 "关联文件到小熊猫 C++"
LangString SectionAssocExtNameBegin 2052 "将"
LangString SectionAssocExtNameEnd 2052 "文件关联到小熊猫C++"
LangString SectionAssocExtNameEnd 2052 "文件关联到小熊猫 C++"
LangString SectionShortcutsName 2052 "快捷方式"
LangString SectionMenuLaunchName 2052 "创建开始菜单程序项"
LangString SectionDesktopLaunchName 2052 "创建桌面快捷方式"
@ -67,3 +74,12 @@ LangString ErrorArchMismatch 2052 "架构不匹配。此软件包适用于 ${ARC
LangString ErrorWindowsBuildRequired 2052 "不支持的操作系统。需要 ${REQUIRED_WINDOWS_NAME} (${REQUIRED_WINDOWS_BUILD}) 或更高版本。"
LangString WarningArchMismatch 2052 "注意:在 $osArch 操作系统上安装小熊猫 C++ ${ARCH} 版本。你可能想要安装本机版本。"
LangString StrAppName 2052 "${APP_NAME_ZH_CN}"
LangString StrInstTypeFull 2052 "完整"
LangString StrInstTypeMinimal 2052 "最小"
LangString StrInstTypeSafe 2052 "安全"
LangString StrProjectFile 2052 "项目文件"
LangString StrSourceFile 2052 "源文件"
LangString StrHeaderFile 2052 "头文件"
LangString StrUninstallerAppName 2052 "卸载 ${APP_NAME_ZH_CN}"

View File

@ -1,8 +1,11 @@
####################################################################
####################################################################
# Startup
SetFont "Segoe UI" 11
Unicode True
!define DISPLAY_NAME "Red Panda C++ ${APP_VERSION} (${ARCH})"
!define APP_NAME_EN "Red Panda C++"
!define APP_NAME_ZH_CN "小熊猫 C++"
!define DISPLAY_NAME "$(StrAppName) ${APP_VERSION} (${ARCH})"
!define REGISTRY_PROGRAM_ID "RedPanda-C++"
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGISTRY_PROGRAM_ID}"
@ -47,9 +50,9 @@ XPStyle on
ManifestDPIAware true
InstType "Full";1
InstType "Minimal";2
InstType "Safe";3
InstType "$(StrInstTypeFull)" ;1
InstType "$(StrInstTypeMinimal)" ;2
InstType "$(StrInstTypeSafe)" ;3
## Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "ShCtx"
@ -98,13 +101,13 @@ Section "$(SectionMainName)" SectionMain
; Allways create an uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
WriteRegStr ShCtx "${UNINSTKEY}" "DisplayName" "Redpanda-C++"
WriteRegStr ShCtx "${UNINSTKEY}" "DisplayName" "$(StrAppName) (${ARCH})"
WriteRegStr ShCtx "${UNINSTKEY}" "InstallLocation" "$INSTDIR"
WriteRegStr ShCtx "${UNINSTKEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr ShCtx "${UNINSTKEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
WriteRegStr ShCtx "${UNINSTKEY}" "DisplayVersion" "${APP_VERSION}"
WriteRegStr ShCtx "${UNINSTKEY}" "DisplayIcon" "$INSTDIR\RedPandaIDE.exe"
WriteRegStr ShCtx "${UNINSTKEY}" "Publisher" "Roy Qu(royqh1979@gmail.com)"
WriteRegStr ShCtx "${UNINSTKEY}" "Publisher" "Roy Qu (royqh1979@gmail.com)"
; Write required files
@ -149,7 +152,7 @@ Section "$(SectionAssocExtNameBegin) .dev $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".dev" "" "DevCpp.dev"
WriteRegStr HKCR "DevCpp.dev" "" "Dev-C++ Project File"
WriteRegStr HKCR "DevCpp.dev" "" "$(StrAppName) $(StrProjectFile)"
WriteRegStr HKCR "DevCpp.dev\DefaultIcon" "" '$0,3'
WriteRegStr HKCR "DevCpp.dev\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -160,7 +163,7 @@ Section "$(SectionAssocExtNameBegin) .c $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".c" "" "DevCpp.c"
WriteRegStr HKCR "DevCpp.c" "" "C Source File"
WriteRegStr HKCR "DevCpp.c" "" "C $(StrSourceFile)"
WriteRegStr HKCR "DevCpp.c\DefaultIcon" "" '$0,4'
WriteRegStr HKCR "DevCpp.c\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -171,7 +174,7 @@ Section "$(SectionAssocExtNameBegin) .cpp $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".cpp" "" "DevCpp.cpp"
WriteRegStr HKCR "DevCpp.cpp" "" "C++ Source File"
WriteRegStr HKCR "DevCpp.cpp" "" "C++ $(StrSourceFile)"
WriteRegStr HKCR "DevCpp.cpp\DefaultIcon" "" '$0,5'
WriteRegStr HKCR "DevCpp.cpp\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -182,7 +185,7 @@ Section "$(SectionAssocExtNameBegin) .cxx $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".cxx" "" "DevCpp.cxx"
WriteRegStr HKCR "DevCpp.cxx" "" "C++ Source File"
WriteRegStr HKCR "DevCpp.cxx" "" "C++ $(StrSourceFile)"
WriteRegStr HKCR "DevCpp.cxx\DefaultIcon" "" '$0,5'
WriteRegStr HKCR "DevCpp.cxx\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -193,7 +196,7 @@ Section "$(SectionAssocExtNameBegin) .cc $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".cc" "" "DevCpp.cc"
WriteRegStr HKCR "DevCpp.cc" "" "C++ Source File"
WriteRegStr HKCR "DevCpp.cc" "" "C++ $(StrSourceFile)"
WriteRegStr HKCR "DevCpp.cc\DefaultIcon" "" '$0,5'
WriteRegStr HKCR "DevCpp.cc\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -204,7 +207,7 @@ Section "$(SectionAssocExtNameBegin) .hxx $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".hxx" "" "DevCpp.hxx"
WriteRegStr HKCR "DevCpp.hxx" "" "C++ Header File"
WriteRegStr HKCR "DevCpp.hxx" "" "C++ $(StrHeaderFile)"
WriteRegStr HKCR "DevCpp.hxx\DefaultIcon" "" '$0,7'
WriteRegStr HKCR "DevCpp.hxx\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -215,7 +218,7 @@ Section "$(SectionAssocExtNameBegin) .h $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".h" "" "DevCpp.h"
WriteRegStr HKCR "DevCpp.h" "" "C Header File"
WriteRegStr HKCR "DevCpp.h" "" "C $(StrHeaderFile)"
WriteRegStr HKCR "DevCpp.h\DefaultIcon" "" '$0,6'
WriteRegStr HKCR "DevCpp.h\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -226,7 +229,7 @@ Section "$(SectionAssocExtNameBegin) .hpp $(SectionAssocExtNameEnd)"
StrCpy $0 $INSTDIR\RedPandaIDE.exe
WriteRegStr HKCR ".hpp" "" "DevCpp.hpp"
WriteRegStr HKCR "DevCpp.hpp" "" "C++ Header File"
WriteRegStr HKCR "DevCpp.hpp" "" "C++ $(StrHeaderFile)"
WriteRegStr HKCR "DevCpp.hpp\DefaultIcon" "" '$0,7'
WriteRegStr HKCR "DevCpp.hpp\Shell\Open\Command" "" '$0 "%1"'
${NotifyShell_AssocChanged}
@ -242,16 +245,16 @@ Section "$(SectionMenuLaunchName)" SectionMenuLaunch
SectionIn 1 3
StrCpy $0 $SMPROGRAMS ; start menu Programs folder
CreateDirectory "$0\$(MessageAppName)"
CreateShortCut "$0\$(MessageAppName)\$(MessageAppName).lnk" "$INSTDIR\RedPandaIDE.exe"
CreateShortCut "$0\$(MessageAppName)\License.lnk" "$INSTDIR\LICENSE"
CreateShortCut "$0\$(MessageAppName)\Uninstall $(MessageAppName).lnk" "$INSTDIR\uninstall.exe"
CreateDirectory "$0\$(StrAppName)"
CreateShortCut "$0\$(StrAppName)\$(StrAppName).lnk" "$INSTDIR\RedPandaIDE.exe"
CreateShortCut "$0\$(StrAppName)\License.lnk" "$INSTDIR\LICENSE"
CreateShortCut "$0\$(StrAppName)\$(StrUninstallerAppName).lnk" "$INSTDIR\uninstall.exe"
SectionEnd
Section "$(SectionDesktopLaunchName)" SectionDesktopLaunch
SectionIn 1 3
CreateShortCut "$DESKTOP\$(MessageAppName).lnk" "$INSTDIR\RedPandaIDE.exe"
CreateShortCut "$DESKTOP\$(StrAppName).lnk" "$INSTDIR\RedPandaIDE.exe"
SectionEnd
SectionGroupEnd
@ -383,14 +386,14 @@ Section "Uninstall"
Delete "$INSTDIR\uninstall.exe"
; Remove start menu stuff
Delete "$SMPROGRAMS\$(MessageAppName)\$(MessageAppName).lnk"
Delete "$SMPROGRAMS\$(MessageAppName)\License.lnk"
Delete "$SMPROGRAMS\$(MessageAppName)\Uninstall $(MessageAppName).lnk"
RMDir "$SMPROGRAMS\$(MessageAppName)"
RMDir /r "$SMPROGRAMS\${APP_NAME_EN}"
RMDir /r "$SMPROGRAMS\${APP_NAME_ZH_CN}"
; Remove desktop stuff
Delete "$QUICKLAUNCH\$(MessageAppName).lnk"
Delete "$DESKTOP\$(MessageAppName).lnk"
Delete "$QUICKLAUNCH\${APP_NAME_EN}.lnk"
Delete "$QUICKLAUNCH\${APP_NAME_ZH_CN}.lnk"
Delete "$DESKTOP\${APP_NAME_EN}.lnk"
Delete "$DESKTOP\${APP_NAME_ZH_CN}.lnk"
DeleteRegKey HKCR "DevCpp.dev"
DeleteRegKey HKCR "DevCpp.c"