summaryrefslogtreecommitdiff
path: root/plugins/MimCmd/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-10 14:02:38 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-10 14:02:38 +0300
commit9446fe458391fccdc34c1a962254847b661bd04d (patch)
tree420a2f05a51c2878de79c7c369b090d7e0810299 /plugins/MimCmd/src
parent216f510b259da44e9e3e63d508d7e15315fcb4df (diff)
MimCmd: translation fix
Diffstat (limited to 'plugins/MimCmd/src')
-rw-r--r--plugins/MimCmd/src/MimCmd.cpp12
-rw-r--r--plugins/MimCmd/src/commands.cpp8
-rw-r--r--plugins/MimCmd/src/commands.h2
-rw-r--r--plugins/MimCmd/src/stdafx.h5
4 files changed, 15 insertions, 12 deletions
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 <command> [<param> [<param> [...]]].\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 <command> [<param> [<param> [...]]].\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