From dbc3fa147b6cfe5248da83d6abf24b892a42668c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 12 Feb 2012 21:33:09 +0100 Subject: [PATCH] Make the installer's custom strings translatable --- installer/mkvtoolnix-unicode.nsi | 50 ++++++++++++++++---------- installer/translations/Czech.nsh | 10 ++++++ installer/translations/Dutch.nsh | 10 ++++++ installer/translations/English.nsh | 10 ++++++ installer/translations/French.nsh | 10 ++++++ installer/translations/German.nsh | 11 ++++++ installer/translations/Italian.nsh | 11 ++++++ installer/translations/Japanese.nsh | 10 ++++++ installer/translations/Lithuanian.nsh | 10 ++++++ installer/translations/Russian.nsh | 10 ++++++ installer/translations/SimpChinese.nsh | 10 ++++++ installer/translations/Spanish.nsh | 10 ++++++ installer/translations/TradChinese.nsh | 10 ++++++ installer/translations/Ukrainian.nsh | 10 ++++++ 14 files changed, 164 insertions(+), 18 deletions(-) create mode 100644 installer/translations/Czech.nsh create mode 100644 installer/translations/Dutch.nsh create mode 100644 installer/translations/English.nsh create mode 100644 installer/translations/French.nsh create mode 100644 installer/translations/German.nsh create mode 100644 installer/translations/Italian.nsh create mode 100644 installer/translations/Japanese.nsh create mode 100644 installer/translations/Lithuanian.nsh create mode 100644 installer/translations/Russian.nsh create mode 100644 installer/translations/SimpChinese.nsh create mode 100644 installer/translations/Spanish.nsh create mode 100644 installer/translations/TradChinese.nsh create mode 100644 installer/translations/Ukrainian.nsh diff --git a/installer/mkvtoolnix-unicode.nsi b/installer/mkvtoolnix-unicode.nsi index 753fe6370..4d842fad6 100644 --- a/installer/mkvtoolnix-unicode.nsi +++ b/installer/mkvtoolnix-unicode.nsi @@ -55,19 +55,33 @@ Page custom showExternalLinks !insertmacro MUI_UNPAGE_INSTFILES # Language files -!insertmacro MUI_LANGUAGE "Czech" -!insertmacro MUI_LANGUAGE "Dutch" -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "French" -!insertmacro MUI_LANGUAGE "German" -!insertmacro MUI_LANGUAGE "Italian" -!insertmacro MUI_LANGUAGE "Japanese" -!insertmacro MUI_LANGUAGE "Lithuanian" -!insertmacro MUI_LANGUAGE "Russian" -!insertmacro MUI_LANGUAGE "Spanish" -!insertmacro MUI_LANGUAGE "SimpChinese" -!insertmacro MUI_LANGUAGE "TradChinese" -!insertmacro MUI_LANGUAGE "Ukrainian" +!macro LANG_LOAD LANGLOAD + !insertmacro MUI_LANGUAGE "${LANGLOAD}" + !include "translations\${LANGLOAD}.nsh" + !undef LANG +!macroend + +!macro LANG_STRING NAME VALUE + LangString "${NAME}" "${LANG_${LANG}}" "${VALUE}" +!macroend + +!macro LANG_UNSTRING NAME VALUE + !insertmacro LANG_STRING "un.${NAME}" "${VALUE}" +!macroend + +!insertmacro LANG_LOAD "Czech" +!insertmacro LANG_LOAD "Dutch" +!insertmacro LANG_LOAD "English" +!insertmacro LANG_LOAD "French" +!insertmacro LANG_LOAD "German" +!insertmacro LANG_LOAD "Italian" +!insertmacro LANG_LOAD "Japanese" +!insertmacro LANG_LOAD "Lithuanian" +!insertmacro LANG_LOAD "Russian" +!insertmacro LANG_LOAD "Spanish" +!insertmacro LANG_LOAD "SimpChinese" +!insertmacro LANG_LOAD "TradChinese" +!insertmacro LANG_LOAD "Ukrainian" !define MUI_LANGDLL_ALLLANGUAGES !insertmacro MUI_RESERVEFILE_LANGDLL @@ -103,7 +117,7 @@ Function .onInit # Check if we're running on a Unicode capable Windows. # If not, abort. ${IfNot} ${AtLeastWinNT4} - MessageBox MB_OK|MB_ICONSTOP "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" + MessageBox MB_OK|MB_ICONSTOP "$(STRING_WINDOWS_TOO_OLD)" Quit ${EndIf} @@ -350,7 +364,7 @@ Section "Program files" SEC01 SetOutPath "$INSTDIR" IfSilent +3 0 - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Should a shortcut be placed on the desktop?" IDNO +2 + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(STRING_SHORTCUT_ON_DESKTOP)" IDNO +2 CreateShortCut "$DESKTOP\mkvmerge GUI.lnk" "$INSTDIR\mmg.exe" "" "$INSTDIR\mmg.exe" SectionEnd @@ -385,17 +399,17 @@ var unRemoveJobs Function un.onUninstSuccess HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully uninstalled." + MessageBox MB_ICONINFORMATION|MB_OK "$(STRING_UNINSTALLED_OK)" FunctionEnd Function un.onInit !insertmacro MUI_UNGETLANGUAGE - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you really want to remove $(^Name) and all of its components?" IDYES +2 + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(STRING_REMOVE_PROGRAM_QUESTION)" IDYES +2 Abort StrCpy $unRemoveJobs "No" IfFileExists "$INSTDIR\jobs\*.*" +2 Return - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Should job files created by the GUI be deleted as well?" IDYES +2 + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(STRING_REMOVE_JOB_FILES_QUESTION)" IDYES +2 Return StrCpy $unRemoveJobs "Yes" FunctionEnd diff --git a/installer/translations/Czech.nsh b/installer/translations/Czech.nsh new file mode 100644 index 000000000..55fcf3fda --- /dev/null +++ b/installer/translations/Czech.nsh @@ -0,0 +1,10 @@ +!define LANG "Czech" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/Dutch.nsh b/installer/translations/Dutch.nsh new file mode 100644 index 000000000..d1ef079a7 --- /dev/null +++ b/installer/translations/Dutch.nsh @@ -0,0 +1,10 @@ +!define LANG "Dutch" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/English.nsh b/installer/translations/English.nsh new file mode 100644 index 000000000..15c1f5a0d --- /dev/null +++ b/installer/translations/English.nsh @@ -0,0 +1,10 @@ +!define LANG "English" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/French.nsh b/installer/translations/French.nsh new file mode 100644 index 000000000..fa51b2459 --- /dev/null +++ b/installer/translations/French.nsh @@ -0,0 +1,10 @@ +!define LANG "French" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/German.nsh b/installer/translations/German.nsh new file mode 100644 index 000000000..9fc4c4a20 --- /dev/null +++ b/installer/translations/German.nsh @@ -0,0 +1,11 @@ +!define LANG "German" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "Sie installieren MKVToolNix in einer Version von Windows, die Unicode nicht untersützt (95, 98 oder ME). Diese alten Windows-Versionen werden von MKVToolNix nicht mehr unterstüzt. Sie können allerdings eine ältere Version (2.2.0) für Windows 95, 98 und ME von http://www.bunkus.org/videotools/mkvtoolnix/ herunterladen." +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Soll eine Verknüpfung auf dem Desktop erstellt werden?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) wurde erfolgreich deinstalliert." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Wollen Sie wirklich $(^Name) mit all seine Komponenten deinstallieren?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Sollen die durch das GUI erstellten Job-Dateien ebenfalls gelöscht werden?" + +# Local Variables: +# mode: nsi +# coding: windows-1252-unix +# End: diff --git a/installer/translations/Italian.nsh b/installer/translations/Italian.nsh new file mode 100644 index 000000000..0f7075a05 --- /dev/null +++ b/installer/translations/Italian.nsh @@ -0,0 +1,11 @@ +!define LANG "Italian" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "Stai cercando di installare MKVToolNix in un pc con una versione di Windows che non supporta Unicode (95, 98 or ME). Queste vecchie versioni di Windows non sono più supportate.Puoi ancora scaricare una vecchia versione (v2.2.0) per Windows 95, 98 e ME da http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Creare un collegamento sul desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) è statto disinstallato corretamente." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Rimuovere $(^Name) e tutti i suoi componenti?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Eliminare anche i file attività creati dalla GUI?" + +# Local Variables: +# mode: nsi +# coding: windows-1252-unix +# End: diff --git a/installer/translations/Japanese.nsh b/installer/translations/Japanese.nsh new file mode 100644 index 000000000..b3b9918e5 --- /dev/null +++ b/installer/translations/Japanese.nsh @@ -0,0 +1,10 @@ +!define LANG "Japanese" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/Lithuanian.nsh b/installer/translations/Lithuanian.nsh new file mode 100644 index 000000000..21556efd6 --- /dev/null +++ b/installer/translations/Lithuanian.nsh @@ -0,0 +1,10 @@ +!define LANG "Lithuanian" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/Russian.nsh b/installer/translations/Russian.nsh new file mode 100644 index 000000000..9585699ff --- /dev/null +++ b/installer/translations/Russian.nsh @@ -0,0 +1,10 @@ +!define LANG "Russian" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/SimpChinese.nsh b/installer/translations/SimpChinese.nsh new file mode 100644 index 000000000..a6e5ad423 --- /dev/null +++ b/installer/translations/SimpChinese.nsh @@ -0,0 +1,10 @@ +!define LANG "SimpChinese" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/Spanish.nsh b/installer/translations/Spanish.nsh new file mode 100644 index 000000000..7cebeced7 --- /dev/null +++ b/installer/translations/Spanish.nsh @@ -0,0 +1,10 @@ +!define LANG "Spanish" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/TradChinese.nsh b/installer/translations/TradChinese.nsh new file mode 100644 index 000000000..400fc261c --- /dev/null +++ b/installer/translations/TradChinese.nsh @@ -0,0 +1,10 @@ +!define LANG "TradChinese" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: diff --git a/installer/translations/Ukrainian.nsh b/installer/translations/Ukrainian.nsh new file mode 100644 index 000000000..711d1954d --- /dev/null +++ b/installer/translations/Ukrainian.nsh @@ -0,0 +1,10 @@ +!define LANG "Ukrainian" +!insertmacro LANG_STRING STRING_WINDOWS_TOO_OLD "You are trying to install MKVToolNix on a Windows version that does not support Unicode (95, 98 or ME). These old Windows versions are not supported anymore. You can still get an older version (v2.2.0) for Windows 95, 98 and ME from http://www.bunkus.org/videotools/mkvtoolnix/" +!insertmacro LANG_STRING STRING_SHORTCUT_ON_DESKTOP "Should a shortcut be placed on the desktop?" +!insertmacro LANG_STRING STRING_UNINSTALLED_OK "$(^Name) was successfully uninstalled." +!insertmacro LANG_STRING STRING_REMOVE_PROGRAM_QUESTION "Do you really want to remove $(^Name) and all of its components?" +!insertmacro LANG_STRING STRING_REMOVE_JOB_FILES_QUESTION "Should job files created by the GUI be deleted as well?" + +# Local Variables: +# mode: nsi +# End: