From: Bișoc George Date: Mon, 31 Dec 2018 07:42:53 +0000 (+0100) Subject: [APPWIZ] Do not hardcode the strings (#1208) X-Git-Tag: 0.4.13-dev~840 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=96228ccc0ae6ea19f7453f8329fb6f5968579b7a [APPWIZ] Do not hardcode the strings (#1208) Let's make those message strings translatable. --- diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c index 5f70b4641f1..a35e915f034 100644 --- a/dll/cpl/appwiz/createlink.c +++ b/dll/cpl/appwiz/createlink.c @@ -408,12 +408,14 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath) UINT nLength; DWORD attrs; PCREATE_LINK_CONTEXT pContext; + WCHAR szMessage[128]; pContext = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pContext)); if (!pContext) { /* no memory */ - MessageBoxA(hwndCPl, "Out of memory!", NULL, MB_ICONERROR); + LoadStringW(hApplet, IDS_NO_MEMORY, szMessage, _countof(szMessage)); + MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR); return FALSE; } @@ -423,7 +425,8 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath) HeapFree(GetProcessHeap(), 0, pContext); /* no directory given */ - MessageBoxA(hwndCPl, "No directory given!", NULL, MB_ICONERROR); + LoadStringW(hApplet, IDS_NO_DIRECTORY, szMessage, _countof(szMessage)); + MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR); return FALSE; } @@ -433,7 +436,8 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath) HeapFree(GetProcessHeap(), 0, pContext); /* invalid path */ - MessageBoxA(hwndCPl, "Invalid path!", NULL, MB_ICONERROR); + LoadStringW(hApplet, IDS_INVALID_PATH, szMessage, _countof(szMessage)); + MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR); return FALSE; } diff --git a/dll/cpl/appwiz/lang/bg-BG.rc b/dll/cpl/appwiz/lang/bg-BG.rc index 06c00ea539a..4198ecd3879 100644 --- a/dll/cpl/appwiz/lang/bg-BG.rc +++ b/dll/cpl/appwiz/lang/bg-BG.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/cs-CZ.rc b/dll/cpl/appwiz/lang/cs-CZ.rc index f680584e0a5..4d0157bc21d 100644 --- a/dll/cpl/appwiz/lang/cs-CZ.rc +++ b/dll/cpl/appwiz/lang/cs-CZ.rc @@ -87,4 +87,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/de-DE.rc b/dll/cpl/appwiz/lang/de-DE.rc index af95ea7a340..29f55f9f696 100644 --- a/dll/cpl/appwiz/lang/de-DE.rc +++ b/dll/cpl/appwiz/lang/de-DE.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/el-GR.rc b/dll/cpl/appwiz/lang/el-GR.rc index 51b48c935ad..4f996bd341e 100644 --- a/dll/cpl/appwiz/lang/el-GR.rc +++ b/dll/cpl/appwiz/lang/el-GR.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/en-US.rc b/dll/cpl/appwiz/lang/en-US.rc index 38b19d5d191..b84f58d92e1 100644 --- a/dll/cpl/appwiz/lang/en-US.rc +++ b/dll/cpl/appwiz/lang/en-US.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/es-ES.rc b/dll/cpl/appwiz/lang/es-ES.rc index 9f55f9674a6..a26f64ff36e 100644 --- a/dll/cpl/appwiz/lang/es-ES.rc +++ b/dll/cpl/appwiz/lang/es-ES.rc @@ -88,4 +88,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/et-EE.rc b/dll/cpl/appwiz/lang/et-EE.rc index 95e422bca5c..9a28610184e 100644 --- a/dll/cpl/appwiz/lang/et-EE.rc +++ b/dll/cpl/appwiz/lang/et-EE.rc @@ -89,4 +89,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/fr-FR.rc b/dll/cpl/appwiz/lang/fr-FR.rc index dead951efba..3a3b8419808 100644 --- a/dll/cpl/appwiz/lang/fr-FR.rc +++ b/dll/cpl/appwiz/lang/fr-FR.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Échec lors du téléchargement du paquet Gecko. Assurez-vous d'avoir une connexion Internet pour pouvoir le télécharger. L'installation va continuer sans installer Gecko." IDS_CANTMAKEINETSHORTCUT "Échec lors de la création du raccourci Internet." IDS_CANTMAKESHORTCUT "Échec lors de la création du raccourci." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/he-IL.rc b/dll/cpl/appwiz/lang/he-IL.rc index 2ff33619e0d..e4ab1dd5d2f 100644 --- a/dll/cpl/appwiz/lang/he-IL.rc +++ b/dll/cpl/appwiz/lang/he-IL.rc @@ -83,4 +83,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/it-IT.rc b/dll/cpl/appwiz/lang/it-IT.rc index 2bb3df36d52..17845eebdef 100644 --- a/dll/cpl/appwiz/lang/it-IT.rc +++ b/dll/cpl/appwiz/lang/it-IT.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Lo scaricamento del pacchetto Gecko è fallito. Assicurati che hai una connessione internet per scaricarlo. Il setup procederà senza l'installazione del pacchetto Gecko." IDS_CANTMAKEINETSHORTCUT "La creazione di un collegamento internet è fallita." IDS_CANTMAKESHORTCUT "La creazione di un collegamento è fallita." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/ja-JP.rc b/dll/cpl/appwiz/lang/ja-JP.rc index ba852629cd8..01ad4976552 100644 --- a/dll/cpl/appwiz/lang/ja-JP.rc +++ b/dll/cpl/appwiz/lang/ja-JP.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/no-NO.rc b/dll/cpl/appwiz/lang/no-NO.rc index fd37b67a2dc..77ac73142bb 100644 --- a/dll/cpl/appwiz/lang/no-NO.rc +++ b/dll/cpl/appwiz/lang/no-NO.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/pl-PL.rc b/dll/cpl/appwiz/lang/pl-PL.rc index aeeacdd1244..b2d9371e608 100644 --- a/dll/cpl/appwiz/lang/pl-PL.rc +++ b/dll/cpl/appwiz/lang/pl-PL.rc @@ -92,4 +92,7 @@ BEGIN IDS_DWL_FAILED "Nie udało się pobrać pakietu Gecko. Upewnij się, że masz połączenie z internetem, aby pobrać pakiet. Instalacja będzie kontynuowana bez pakietu Gecko." IDS_CANTMAKEINETSHORTCUT "Nie można utworzyć skrótu internetowego." IDS_CANTMAKESHORTCUT "Nie można utworzyć skrótu." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/pt-BR.rc b/dll/cpl/appwiz/lang/pt-BR.rc index 9d724340024..1d1a267cb38 100644 --- a/dll/cpl/appwiz/lang/pt-BR.rc +++ b/dll/cpl/appwiz/lang/pt-BR.rc @@ -84,4 +84,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/ro-RO.rc b/dll/cpl/appwiz/lang/ro-RO.rc index 7410c996997..185243b789b 100644 --- a/dll/cpl/appwiz/lang/ro-RO.rc +++ b/dll/cpl/appwiz/lang/ro-RO.rc @@ -88,4 +88,7 @@ BEGIN IDS_DWL_FAILED "Descărcarea pachetului Gecko a eșuat. Asigurați-vă că aveți conexiune la internet pentru a putea descărca. Asistentul va continua fără a instala pachetul Gecko." IDS_CANTMAKEINETSHORTCUT "Eșec în crearea scurtăturii la Internet." IDS_CANTMAKESHORTCUT "Eșec în crearea scurtăturii." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/ru-RU.rc b/dll/cpl/appwiz/lang/ru-RU.rc index f440f30ace0..59b6710f9d5 100644 --- a/dll/cpl/appwiz/lang/ru-RU.rc +++ b/dll/cpl/appwiz/lang/ru-RU.rc @@ -82,4 +82,7 @@ BEGIN IDS_DWL_FAILED "Не удалось скачать пакет установки Gecko, проверьте ваше подключение к сети интернет. Установка будет продолжена без включения пакета Gecko." IDS_CANTMAKEINETSHORTCUT "Не удалось создать ярлык интернета." IDS_CANTMAKESHORTCUT "Не удалось создать ярлык." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/sk-SK.rc b/dll/cpl/appwiz/lang/sk-SK.rc index e17a74484f5..ab136de8f32 100644 --- a/dll/cpl/appwiz/lang/sk-SK.rc +++ b/dll/cpl/appwiz/lang/sk-SK.rc @@ -86,4 +86,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/sq-AL.rc b/dll/cpl/appwiz/lang/sq-AL.rc index cc374b659a9..161f72f7e75 100644 --- a/dll/cpl/appwiz/lang/sq-AL.rc +++ b/dll/cpl/appwiz/lang/sq-AL.rc @@ -86,4 +86,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/tr-TR.rc b/dll/cpl/appwiz/lang/tr-TR.rc index 3e3c2b3adee..34f4f76f9ed 100644 --- a/dll/cpl/appwiz/lang/tr-TR.rc +++ b/dll/cpl/appwiz/lang/tr-TR.rc @@ -84,4 +84,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/uk-UA.rc b/dll/cpl/appwiz/lang/uk-UA.rc index c6973974b6d..4b5fef4fc24 100644 --- a/dll/cpl/appwiz/lang/uk-UA.rc +++ b/dll/cpl/appwiz/lang/uk-UA.rc @@ -90,4 +90,7 @@ BEGIN IDS_DWL_FAILED "Не вдалося завантажити пакет встановки Gecko. Перевірте ваше підключення до мережі інтернет. Встановка буде продовжена без включення пакета Gecko." IDS_CANTMAKEINETSHORTCUT "Не вдалося створити ярлик інтернету." IDS_CANTMAKESHORTCUT "Не вдалося створити ярлик." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/zh-CN.rc b/dll/cpl/appwiz/lang/zh-CN.rc index 22deec74bbe..a14128d0d43 100644 --- a/dll/cpl/appwiz/lang/zh-CN.rc +++ b/dll/cpl/appwiz/lang/zh-CN.rc @@ -91,4 +91,7 @@ BEGIN IDS_DWL_FAILED "无法下载 Gecko 安装包。请确保您有互联网连接才能进行下载。安装程序将在不安装 Gecko 的情况下继续。" IDS_CANTMAKEINETSHORTCUT "无法创建 Internet 快捷方式" IDS_CANTMAKESHORTCUT "无法创建快捷方式。" + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/lang/zh-TW.rc b/dll/cpl/appwiz/lang/zh-TW.rc index 02c360daa95..6397cfadba1 100644 --- a/dll/cpl/appwiz/lang/zh-TW.rc +++ b/dll/cpl/appwiz/lang/zh-TW.rc @@ -89,4 +89,7 @@ BEGIN IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut." IDS_CANTMAKESHORTCUT "Failed to create shortcut." + IDS_NO_MEMORY "No memory could be allocated!" + IDS_NO_DIRECTORY "No directory given!" + IDS_INVALID_PATH "The given path is invalid!" END diff --git a/dll/cpl/appwiz/resource.h b/dll/cpl/appwiz/resource.h index c4119aa4bce..d91a360e172 100644 --- a/dll/cpl/appwiz/resource.h +++ b/dll/cpl/appwiz/resource.h @@ -25,6 +25,9 @@ #define IDS_NEW_INTERNET_SHORTCUT 2023 #define IDS_CANTMAKEINETSHORTCUT 2024 #define IDS_CANTMAKESHORTCUT 2025 +#define IDS_NO_MEMORY 2026 +#define IDS_NO_DIRECTORY 2027 +#define IDS_INVALID_PATH 2028 #define IDS_DOWNLOADING 14 #define IDS_INSTALLING 15