diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-06-21 08:57:57 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-06-21 08:57:57 +0000 |
commit | 18b4c46a69a390bdf78424c6a231c4673fbd8096 (patch) | |
tree | 6c636cda58015e012ed508e1239e680735281805 /protocols/Xfire/src | |
parent | 39599842d91d490fe82ae8f97ea17e91859b2556 (diff) |
Xfire: Make "Away from keyboard" string translatable.
git-svn-id: http://svn.miranda-ng.org/main/trunk@5075 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src')
-rw-r--r-- | protocols/Xfire/src/main.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index bd0a3bf4ed..53be6dbcfe 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1089,7 +1089,7 @@ extern "C" __declspec(dllexport) int Load(void) //statusmessages setzen
strcpy(statusmessage[0],"");
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
+ mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
char servicefunction[100];
@@ -1661,7 +1661,7 @@ INT_PTR SetStatus(WPARAM wParam,LPARAM lParam) {
//setze bei aktivem nocustomaway die alte awaystatusmsg zurück, bugfix
if(db_get_b(NULL,protocolname,"nocustomaway",0))
- strcpy_s(statusmessage[1],1024,"(AFK) Away from Keyboard");
+ mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
myClient->Status(statusmessage[1]);
}
@@ -3323,9 +3323,9 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam) { {
strcpy(statusmessage[0],"");
}
- else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)/*&&db_get_b(NULL,protocolname,"nocustomaway",0)==0*/)
+ else if(wParam!=ID_STATUS_OFFLINE/*&&db_get_b(NULL,protocolname,"nocustomaway",0)==0*/)
{
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
+ mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
}
}
else
@@ -3334,14 +3334,12 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam) { {
strcpy(statusmessage[0],( char* )lParam);
}
- else if((wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)&&db_get_b(NULL,protocolname,"nocustomaway",0)==0&&strlen(( char* )lParam)>0)
- {
- sprintf(statusmessage[1], "(AFK) %s", (char*)lParam);
- //strcpy(statusmessage[1],( char* )lParam);
- }
- else if(wParam!=ID_STATUS_ONLINE&&wParam!=ID_STATUS_OFFLINE)
- {
- strcpy(statusmessage[1],"(AFK) Away from Keyboard");
+ else if (wParam != ID_STATUS_OFFLINE) {
+ if (db_get_b(NULL,protocolname,"nocustomaway",0)==0&&strlen(( char* )lParam)>0) {
+ mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", (char*)lParam);
+ //strcpy(statusmessage[1],( char* )lParam);
+ } else
+ mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", Translate("Away from Keyboard"));
}
}
|