From 9446fe458391fccdc34c1a962254847b661bd04d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Nov 2023 14:02:38 +0300 Subject: MimCmd: translation fix --- plugins/MimCmd/MimCmd.vcxproj | 4 ++-- plugins/MimCmd/src/MimCmd.cpp | 12 ++++++------ plugins/MimCmd/src/commands.cpp | 8 ++++---- plugins/MimCmd/src/commands.h | 2 -- plugins/MimCmd/src/stdafx.h | 5 +++++ 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/plugins/MimCmd/MimCmd.vcxproj b/plugins/MimCmd/MimCmd.vcxproj index d2884d1e83..db1068cb9f 100644 --- a/plugins/MimCmd/MimCmd.vcxproj +++ b/plugins/MimCmd/MimCmd.vcxproj @@ -45,8 +45,8 @@ Console - mir_core.mir;ucrtbased.dll;vcruntime140.dll - mir_core.mir;ucrtbase.dll;api-ms-win-crt-string-l1-1-0.dll;api-ms-win-crt-heap-l1-1-0.dll;api-ms-win-crt-locale-l1-1-0.dll;api-ms-win-crt-math-l1-1-0.dll;api-ms-win-crt-runtime-l1-1-0.dll;api-ms-win-crt-stdio-l1-1-0.dll;VCRUNTIME140.dll + mir_core.mir;ucrtbased.dll + mir_core.mir;api-ms-win-crt-string-l1-1-0.dll;api-ms-win-crt-heap-l1-1-0.dll;api-ms-win-crt-locale-l1-1-0.dll;api-ms-win-crt-math-l1-1-0.dll;api-ms-win-crt-runtime-l1-1-0.dll;api-ms-win-crt-stdio-l1-1-0.dll \ No newline at end of file diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp index de8617507a..fbb5ceb67e 100644 --- a/plugins/MimCmd/src/MimCmd.cpp +++ b/plugins/MimCmd/src/MimCmd.cpp @@ -52,17 +52,17 @@ void PrintUsage() wchar_t name[128]; GetProgramName(name, _countof(name)); - wprintf(TranslateW_LP(L"%s usage:\n"), name); - wprintf(TranslateW_LP(L"%s [ [ [...]]].\n"), name); - wprintf(TranslateW_LP(L"This will tell Miranda to run the specified command. The commands can have zero, one or more parameters. Use '%s help' to get a list of possible commands.\n"), name); - wprintf(TranslateW_LP(L"No command can have more than %d parameters.\n"), MAX_ARGUMENTS - 1); + wprintf(TranslateT(L"%s usage:\n"), name); + wprintf(TranslateT(L"%s [ [ [...]]].\n"), name); + wprintf(TranslateT(L"This will tell Miranda to run the specified command. The commands can have zero, one or more parameters. Use '%s help' to get a list of possible commands.\n"), name); + wprintf(TranslateT(L"No command can have more than %d parameters.\n"), MAX_ARGUMENTS - 1); } void ShowVersion() { wchar_t name[128]; GetProgramName(name, _countof(name)); - wprintf(TranslateW_LP(L"%s version %s"), name, __VERSION_STRING_DOTS); + wprintf(TranslateT(L"%s version %s"), name, __VERSION_STRING_DOTS); } int wmain(int argc, wchar_t *argv[]) @@ -90,7 +90,7 @@ int wmain(int argc, wchar_t *argv[]) wprintf(L"%s\n", reply->message); } else { - wprintf(TranslateW_LP(L"Unknown command '%s'.\n"), argv[1]); + wprintf(TranslateT(L"Unknown command '%s'.\n"), argv[1]); error = 0; } diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp index 9caaa42af5..5959b0516c 100644 --- a/plugins/MimCmd/src/commands.cpp +++ b/plugins/MimCmd/src/commands.cpp @@ -117,16 +117,16 @@ void HandleHelpCommand(PCommand, wchar_t *argv[], int argc, PReply reply) if (command) { reply->code = MIMRES_SUCCESS; - szReply.Append(TranslateW_LP(command->help)); + szReply.Append(TranslateT(command->help)); } else { reply->code = MIMRES_NOTFOUND; - szReply.AppendFormat(TranslateW_LP(L"No help for '%s'."), argv[2]); + szReply.AppendFormat(TranslateT(L"No help for '%s'."), argv[2]); } } else { reply->code = MIMRES_SUCCESS; - szReply.Append(TranslateW_LP(L"Available commands: ")); + szReply.Append(TranslateT(L"Available commands: ")); for (int i = 0; i < cKnownCommands - 1; i++) { szReply.Append(knownCommands[i].command); @@ -182,7 +182,7 @@ void ProcessConsoleCommand(PCommand command, wchar_t *arguments[], int count, PR case WAIT_OBJECT_0 + 1: //close event default: - mir_wstrcpy(sdCmdLine->reply.message, TranslateW_LP(L"Miranda has been closed or an error has occurred while waiting for the result, could not process request.")); + mir_wstrcpy(sdCmdLine->reply.message, TranslateT(L"Miranda has been closed or an error has occurred while waiting for the result, could not process request.")); done = TRUE; break; diff --git a/plugins/MimCmd/src/commands.h b/plugins/MimCmd/src/commands.h index 591572d15a..8a77897a11 100644 --- a/plugins/MimCmd/src/commands.h +++ b/plugins/MimCmd/src/commands.h @@ -28,8 +28,6 @@ typedef void (* LISTCOMMANDS)(PCommand *commands, int *count); extern LISTCOMMANDS ListCommands; -char *GetMirandaFolder(); - int ConnectToMiranda(); int DisconnectFromMiranda(); int GetKnownCommands(); diff --git a/plugins/MimCmd/src/stdafx.h b/plugins/MimCmd/src/stdafx.h index 7fe5cafc4f..d83d2149ae 100644 --- a/plugins/MimCmd/src/stdafx.h +++ b/plugins/MimCmd/src/stdafx.h @@ -37,3 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "version.h" #include "../CmdLine/src/utils.h" #include "commands.h" + +extern PLUGININFOEX pluginInfoEx; + +#undef TranslateT +#define TranslateT(T) TranslateW_UUID(T, &pluginInfoEx.uuid) \ No newline at end of file -- cgit v1.2.3