Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/telegram-purple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2015-10-19 21:10:47 +0300
committerBen Wiederhake <BenWiederhake.GitHub@gmx.de>2015-11-26 10:23:25 +0300
commit77317fb99f5dc4f6d26980746629d05ddaaa9b35 (patch)
tree05c0108aff62e56d2b185625927f309f565ca22f /tgp-utils.c
parent954ed6048b69c61736fa33346597a5f3c1df1c71 (diff)
Add plural support
Fixes #139.
Diffstat (limited to 'tgp-utils.c')
-rw-r--r--tgp-utils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tgp-utils.c b/tgp-utils.c
index 7160a09..c7a6a1f 100644
--- a/tgp-utils.c
+++ b/tgp-utils.c
@@ -21,6 +21,7 @@
#include "telegram-purple.h"
const char *format_time (time_t date) {
+ /* TODO: Inline this function for better readability? */
struct tm *datetime = localtime(&date);
/* This should be the language's timestamp format. This is preceded by a colon. */
return purple_utf8_strftime (_("%d.%m.%Y %H:%M"), datetime);
@@ -40,19 +41,19 @@ char *tgp_format_user_status (struct tgl_user_status *status) {
char *when;
switch (status->online) {
case -1:
- when = g_strdup_printf("%s", format_time (status->when));
+ when = g_strdup_printf ("%s", format_time (status->when));
break;
case -2:
/* This is preceded by a colon. */
- when = g_strdup_printf (_("recently"));
+ when = g_strdup (_("recently"));
break;
case -3:
/* This is preceded by a colon. */
- when = g_strdup_printf (_("last week"));
+ when = g_strdup (_("last week"));
break;
case -4:
/* This is preceded by a colon. */
- when = g_strdup_printf (_("last month"));
+ when = g_strdup (_("last month"));
break;
default:
/* This is preceded by a colon. It refers to a point on time. */