intl: translatable.
This commit is contained in:
parent
ae6d5c2d15
commit
726a705275
|
@ -2,6 +2,9 @@
|
||||||
# define __MacOS__
|
# define __MacOS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ui/gettext.h"
|
||||||
|
#define _(STR) gettext(STR)
|
||||||
|
|
||||||
#if defined(__MacOS__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
|
#if defined(__MacOS__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
|
@ -70,27 +73,27 @@ static void
|
||||||
_states_init(void)
|
_states_init(void)
|
||||||
{
|
{
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
_states['D'] = "dsleep";
|
_states['D'] = _("dsleep");
|
||||||
_states['I'] = "idle";
|
_states['I'] = _("idle");
|
||||||
_states['R'] = "running";
|
_states['R'] = _("running");
|
||||||
_states['S'] = "sleeping";
|
_states['S'] = _("sleeping");
|
||||||
_states['T'] = "stopped";
|
_states['T'] = _("stopped");
|
||||||
_states['X'] = "dead";
|
_states['X'] = _("dead");
|
||||||
_states['Z'] = "zombie";
|
_states['Z'] = _("zombie");
|
||||||
#else
|
#else
|
||||||
_states[SIDL] = "idle";
|
_states[SIDL] = _("idle");
|
||||||
_states[SRUN] = "running";
|
_states[SRUN] = _("running");
|
||||||
_states[SSLEEP] = "sleeping";
|
_states[SSLEEP] = _("sleeping");
|
||||||
_states[SSTOP] = "stopped";
|
_states[SSTOP] = _("stopped");
|
||||||
#if !defined(__MacOS__)
|
#if !defined(__MacOS__)
|
||||||
#if !defined(__OpenBSD__)
|
#if !defined(__OpenBSD__)
|
||||||
_states[SWAIT] = "wait";
|
_states[SWAIT] = _("wait");
|
||||||
_states[SLOCK] = "lock";
|
_states[SLOCK] = _("lock");
|
||||||
_states[SZOMB] = "zombie";
|
_states[SZOMB] = _("zombie");
|
||||||
#endif
|
#endif
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
_states[SDEAD] = "zombie";
|
_states[SDEAD] = _("zombie");
|
||||||
_states[SONPROC] = "running";
|
_states[SONPROC] = _("running");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -885,21 +885,21 @@ _summary_update(Data *pd)
|
||||||
{
|
{
|
||||||
Eina_Strbuf *buf = eina_strbuf_new();
|
Eina_Strbuf *buf = eina_strbuf_new();
|
||||||
|
|
||||||
eina_strbuf_append_printf(buf, "%i processes: ", pd->summary.total);
|
eina_strbuf_append_printf(buf, _("%i processes: "), pd->summary.total);
|
||||||
if (pd->summary.running)
|
if (pd->summary.running)
|
||||||
eina_strbuf_append_printf(buf, "%i running, ", pd->summary.running);
|
eina_strbuf_append_printf(buf, _("%i running, "), pd->summary.running);
|
||||||
if (pd->summary.sleeping)
|
if (pd->summary.sleeping)
|
||||||
eina_strbuf_append_printf(buf, "%i sleeping, ", pd->summary.sleeping);
|
eina_strbuf_append_printf(buf, _("%i sleeping, "), pd->summary.sleeping);
|
||||||
if (pd->summary.stopped)
|
if (pd->summary.stopped)
|
||||||
eina_strbuf_append_printf(buf, "%i stopped, ", pd->summary.stopped);
|
eina_strbuf_append_printf(buf, _("%i stopped, "), pd->summary.stopped);
|
||||||
if (pd->summary.idle)
|
if (pd->summary.idle)
|
||||||
eina_strbuf_append_printf(buf, "%i idle, ", pd->summary.idle);
|
eina_strbuf_append_printf(buf, _("%i idle, "), pd->summary.idle);
|
||||||
if (pd->summary.dead)
|
if (pd->summary.dead)
|
||||||
eina_strbuf_append_printf(buf, "%i dead, ", pd->summary.dead);
|
eina_strbuf_append_printf(buf, _("%i dead, "), pd->summary.dead);
|
||||||
if (pd->summary.dsleep)
|
if (pd->summary.dsleep)
|
||||||
eina_strbuf_append_printf(buf, "%i dsleep, ", pd->summary.dsleep);
|
eina_strbuf_append_printf(buf, _("%i dsleep, "), pd->summary.dsleep);
|
||||||
if (pd->summary.zombie)
|
if (pd->summary.zombie)
|
||||||
eina_strbuf_append_printf(buf, "%i zombie, ", pd->summary.zombie);
|
eina_strbuf_append_printf(buf, _("%i zombie, "), pd->summary.zombie);
|
||||||
|
|
||||||
eina_strbuf_replace_last(buf, ",", ".");
|
eina_strbuf_replace_last(buf, ",", ".");
|
||||||
|
|
||||||
|
@ -912,19 +912,19 @@ static void
|
||||||
_summary_total(Data *pd, Proc_Info *proc)
|
_summary_total(Data *pd, Proc_Info *proc)
|
||||||
{
|
{
|
||||||
pd->summary.total++;
|
pd->summary.total++;
|
||||||
if (!strcmp(proc->state, "running"))
|
if (!strcmp(proc->state, _("running")))
|
||||||
pd->summary.running++;
|
pd->summary.running++;
|
||||||
else if (!strcmp(proc->state, "sleeping"))
|
else if (!strcmp(proc->state, _("sleeping")))
|
||||||
pd->summary.sleeping++;
|
pd->summary.sleeping++;
|
||||||
else if (!strcmp(proc->state, "stopped"))
|
else if (!strcmp(proc->state, _("stopped")))
|
||||||
pd->summary.stopped++;
|
pd->summary.stopped++;
|
||||||
else if (!strcmp(proc->state, "idle"))
|
else if (!strcmp(proc->state, _("idle")))
|
||||||
pd->summary.idle++;
|
pd->summary.idle++;
|
||||||
else if (!strcmp(proc->state, "zombie"))
|
else if (!strcmp(proc->state, _("zombie")))
|
||||||
pd->summary.zombie++;
|
pd->summary.zombie++;
|
||||||
else if (!strcmp(proc->state, "dead"))
|
else if (!strcmp(proc->state, _("dead")))
|
||||||
pd->summary.dead++;
|
pd->summary.dead++;
|
||||||
else if (!strcmp(proc->state, "dsleep"))
|
else if (!strcmp(proc->state, _("dsleep")))
|
||||||
pd->summary.dsleep++;
|
pd->summary.dsleep++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue