evisum: add gettext support

edi-0.5
Alastair Poole 3 years ago
parent 247c45c32b
commit ad1f149e55
  1. 2
      README
  2. 20
      meson.build
  3. 1
      po/LINGUAS
  4. 237
      po/evisum.pot
  5. 237
      po/fr.po
  6. 5
      po/meson.build
  7. 280
      src/bin/gettext.h
  8. 10
      src/bin/main.c
  9. 5
      src/bin/meson.build
  10. 110
      src/bin/ui.c
  11. 3
      src/bin/ui.h

@ -28,3 +28,5 @@ NOTES
You can press Ctrl plus 'k', 'm', 'g' to display results in KB, MB
of GB respectively.
# Note to self
xgettext --keyword=_ --language=C --add-comments --sort-output --from-code=UTF-8 -o po/evisum.pot src/bin/ui.c src/bin/main.c

@ -9,6 +9,8 @@ cfg = configuration_data()
host_os = host_machine.system()
cc = meson.get_compiler('c')
deps = dependency('elementary', version: efl_version)
deps_os = declare_dependency(link_args : [] )
@ -23,11 +25,27 @@ dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_locale = join_paths(dir_prefix, get_option('localedir'))
##### translation
deps_nls = []
translate_enabled = false
intl_lib = cc.find_library('intl', required: false)
if intl_lib.found()
translate_enabled = true
deps_nls = [intl_lib]
endif
##### config.h
cfg.set_quoted('PACKAGE', meson.project_name())
cfg.set_quoted('PACKAGE_VERSION', meson.project_version())
cfg.set_quoted('PACKAGE_DATA_DIR', join_paths(dir_data, 'evisum'))
configure_file(output: 'config.h', configuration: cfg)
if translate_enabled
subdir('po')
endif
subdir('src')
subdir('data')
configure_file(output: 'config.h', configuration: cfg)

@ -0,0 +1,237 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-23 12:26+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/bin/ui.c:2048
msgid " Shared memory:"
msgstr ""
#: src/bin/ui.c:2033
msgid " Total memory :"
msgstr ""
#: src/bin/ui.c:2063
msgid " Virtual memory:"
msgstr ""
#: src/bin/ui.c:180
msgid "(plugged in)"
msgstr ""
#: src/bin/ui.c:233
msgid "<bigger>Network Incoming</bigger>"
msgstr ""
#: src/bin/ui.c:235
msgid "<bigger>Network Outgoing</bigger>"
msgstr ""
#: src/bin/ui.c:479
#, c-format
msgid "<header>Core at (%d °C)</header>"
msgstr ""
#: src/bin/ui.c:346
#, c-format
msgid ""
"<subtitle>%s</subtitle><br><bigger>mounted at %s</bigger><br>%1.1f%c of %1.1f"
"%c"
msgstr ""
#: src/bin/ui.c:2317
#, c-format
msgid "<subtitle>CPUs</subtitle><br><bigger>Total of %d CPUs</bigger>"
msgstr ""
#: src/bin/ui.c:2412
msgid "<subtitle>Memory</subtitle>"
msgstr ""
#: src/bin/ui.c:416
#, c-format
msgid ""
"<subtitle>Memory</subtitle><br><bigger>Physical %s</bigger><br><br>Swap %s"
msgstr ""
#: src/bin/ui.c:2451
msgid "Buffered"
msgstr ""
#: src/bin/ui.c:2677
msgid "CPU"
msgstr ""
#: src/bin/ui.c:2002
msgid "CPU #:"
msgstr ""
#: src/bin/ui.c:1835
msgid "CPU %"
msgstr ""
#: src/bin/ui.c:2123
msgid "CPU %:"
msgstr ""
#: src/bin/ui.c:2440
msgid "Cached"
msgstr ""
#: src/bin/ui.c:1617
msgid "Cancel"
msgstr ""
#: src/bin/ui.c:2777
msgid "Close"
msgstr ""
#: src/bin/ui.c:1805
msgid "Command"
msgstr ""
#: src/bin/ui.c:1939
msgid "Command line:"
msgstr ""
#: src/bin/ui.c:1924
msgid "Command:"
msgstr ""
#: src/bin/ui.c:1586
msgid "Decrease"
msgstr ""
#: src/bin/main.c:32
msgid "Evisum: System Monitor"
msgstr ""
#: src/bin/ui.c:1585
msgid "Increase"
msgstr ""
#: src/bin/ui.c:2183
msgid "Kill"
msgstr ""
#: src/bin/ui.c:2693
msgid "Memory"
msgstr ""
#: src/bin/ui.c:2725
msgid "Misc"
msgstr ""
#: src/bin/ui.c:2078
msgid "Nice:"
msgstr ""
#: src/bin/ui.c:2640
msgid "Options"
msgstr ""
#: src/bin/ui.c:1745
msgid "PID"
msgstr ""
#: src/bin/ui.c:1954
msgid "PID:"
msgstr ""
#: src/bin/ui.c:1607
msgid "Priority"
msgstr ""
#: src/bin/ui.c:2093
msgid "Priority:"
msgstr ""
#: src/bin/ui.c:1905
msgid "Process Statistics"
msgstr ""
#: src/bin/ui.c:2661
msgid "Processes"
msgstr ""
#: src/bin/ui.c:1790
msgid "Res"
msgstr ""
#: src/bin/ui.c:2462
msgid "Shared"
msgstr ""
#: src/bin/ui.c:1775
msgid "Size"
msgstr ""
#: src/bin/ui.c:1611 src/bin/ui.c:2168
msgid "Start"
msgstr ""
#: src/bin/ui.c:1820
msgid "State"
msgstr ""
#: src/bin/ui.c:2108
msgid "State:"
msgstr ""
#: src/bin/ui.c:1613 src/bin/ui.c:2153
msgid "Stop"
msgstr ""
#: src/bin/ui.c:2709
msgid "Storage"
msgstr ""
#: src/bin/ui.c:2472
msgid "Swapped"
msgstr ""
#: src/bin/ui.c:1703
msgid "System CPU"
msgstr ""
#: src/bin/ui.c:1718
msgid "System Memory"
msgstr ""
#: src/bin/ui.c:2018
msgid "Threads:"
msgstr ""
#: src/bin/ui.c:1760
msgid "UID"
msgstr ""
#: src/bin/ui.c:1984
msgid "UID:"
msgstr ""
#: src/bin/ui.c:2429
msgid "Used"
msgstr ""
#: src/bin/ui.c:1969
msgid "Username:"
msgstr ""
#: src/bin/ui.c:2000
msgid "WQ #:"
msgstr ""

@ -0,0 +1,237 @@
# French translations for PACKAGE package.
# Copyright (C) 2020 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Alastair Poole <netstar@gmail.com>, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-23 12:26+0100\n"
"PO-Revision-Date: 2020-04-23 12:27+0100\n"
"Last-Translator: Alastair Poole <netstar@gmail.com>\n"
"Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/bin/ui.c:2048
msgid " Shared memory:"
msgstr ""
#: src/bin/ui.c:2033
msgid " Total memory :"
msgstr ""
#: src/bin/ui.c:2063
msgid " Virtual memory:"
msgstr ""
#: src/bin/ui.c:180
msgid "(plugged in)"
msgstr ""
#: src/bin/ui.c:233
msgid "<bigger>Network Incoming</bigger>"
msgstr ""
#: src/bin/ui.c:235
msgid "<bigger>Network Outgoing</bigger>"
msgstr ""
#: src/bin/ui.c:479
#, c-format
msgid "<header>Core at (%d °C)</header>"
msgstr ""
#: src/bin/ui.c:346
#, c-format
msgid ""
"<subtitle>%s</subtitle><br><bigger>mounted at %s</bigger><br>%1.1f%c of %1.1f"
"%c"
msgstr ""
#: src/bin/ui.c:2317
#, c-format
msgid "<subtitle>CPUs</subtitle><br><bigger>Total of %d CPUs</bigger>"
msgstr ""
#: src/bin/ui.c:2412
msgid "<subtitle>Memory</subtitle>"
msgstr ""
#: src/bin/ui.c:416
#, c-format
msgid ""
"<subtitle>Memory</subtitle><br><bigger>Physical %s</bigger><br><br>Swap %s"
msgstr ""
#: src/bin/ui.c:2451
msgid "Buffered"
msgstr ""
#: src/bin/ui.c:2677
msgid "CPU"
msgstr ""
#: src/bin/ui.c:2002
msgid "CPU #:"
msgstr ""
#: src/bin/ui.c:1835
msgid "CPU %"
msgstr ""
#: src/bin/ui.c:2123
msgid "CPU %:"
msgstr ""
#: src/bin/ui.c:2440
msgid "Cached"
msgstr ""
#: src/bin/ui.c:1617
msgid "Cancel"
msgstr ""
#: src/bin/ui.c:2777
msgid "Close"
msgstr ""
#: src/bin/ui.c:1805
msgid "Command"
msgstr ""
#: src/bin/ui.c:1939
msgid "Command line:"
msgstr ""
#: src/bin/ui.c:1924
msgid "Command:"
msgstr ""
#: src/bin/ui.c:1586
msgid "Decrease"
msgstr ""
#: src/bin/main.c:32
msgid "Evisum: System Monitor"
msgstr ""
#: src/bin/ui.c:1585
msgid "Increase"
msgstr ""
#: src/bin/ui.c:2183
msgid "Kill"
msgstr ""
#: src/bin/ui.c:2693
msgid "Memory"
msgstr ""
#: src/bin/ui.c:2725
msgid "Misc"
msgstr ""
#: src/bin/ui.c:2078
msgid "Nice:"
msgstr ""
#: src/bin/ui.c:2640
msgid "Options"
msgstr ""
#: src/bin/ui.c:1745
msgid "PID"
msgstr ""
#: src/bin/ui.c:1954
msgid "PID:"
msgstr ""
#: src/bin/ui.c:1607
msgid "Priority"
msgstr ""
#: src/bin/ui.c:2093
msgid "Priority:"
msgstr ""
#: src/bin/ui.c:1905
msgid "Process Statistics"
msgstr ""
#: src/bin/ui.c:2661
msgid "Processes"
msgstr ""
#: src/bin/ui.c:1790
msgid "Res"
msgstr ""
#: src/bin/ui.c:2462
msgid "Shared"
msgstr ""
#: src/bin/ui.c:1775
msgid "Size"
msgstr ""
#: src/bin/ui.c:1611 src/bin/ui.c:2168
msgid "Start"
msgstr ""
#: src/bin/ui.c:1820
msgid "State"
msgstr ""
#: src/bin/ui.c:2108
msgid "State:"
msgstr ""
#: src/bin/ui.c:1613 src/bin/ui.c:2153
msgid "Stop"
msgstr ""
#: src/bin/ui.c:2709
msgid "Storage"
msgstr ""
#: src/bin/ui.c:2472
msgid "Swapped"
msgstr ""
#: src/bin/ui.c:1703
msgid "System CPU"
msgstr ""
#: src/bin/ui.c:1718
msgid "System Memory"
msgstr ""
#: src/bin/ui.c:2018
msgid "Threads:"
msgstr ""
#: src/bin/ui.c:1760
msgid "UID"
msgstr ""
#: src/bin/ui.c:1984
msgid "UID:"
msgstr ""
#: src/bin/ui.c:2429
msgid "Used"
msgstr ""
#: src/bin/ui.c:1969
msgid "Username:"
msgstr ""
#: src/bin/ui.c:2000
msgid "WQ #:"
msgstr ""

@ -0,0 +1,5 @@
i18n = import('i18n')
i18n.gettext('evisum')
cfg.set('ENABLE_NLS', 1)
cfg.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))

@ -0,0 +1,280 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
the gettext() and ngettext() macros. This is an alternative to calling
textdomain(), and is useful for libraries. */
# ifdef DEFAULT_TEXT_DOMAIN
# undef gettext
# define gettext(Msgid) \
dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
# endif
#else
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
chokes if dcgettext is defined as a macro. So include it now, to make
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
as well because people using "gettext.h" will not include <libintl.h>,
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
is OK. */
#if defined(__sun)
# include <locale.h>
#endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# undef gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef dgettext
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) \
((void) (Category), dgettext (Domainname, Msgid))
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) (Msgid1)) \
: ((void) (Msgid1), (const char *) (Msgid2)))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef bindtextdomain
# define bindtextdomain(Domainname, Dirname) \
((void) (Domainname), (const char *) (Dirname))
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) \
((void) (Domainname), (const char *) (Codeset))
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
/* The separator between msgctxt and msgid in a .mo file. */
#define GETTEXT_CONTEXT_GLUE "\004"
/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
short and rarely need to change.
The letter 'p' stands for 'particular' or 'special'. */
#ifdef DEFAULT_TEXT_DOMAIN
# define pgettext(Msgctxt, Msgid) \
pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
#else
# define pgettext(Msgctxt, Msgid) \
pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
#endif
#define dpgettext(Domainname, Msgctxt, Msgid) \
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
#ifdef DEFAULT_TEXT_DOMAIN
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
#else
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
#endif
#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static const char *
pgettext_aux (const char *domain,
const char *msg_ctxt_id, const char *msgid,
int category)
{
const char *translation = dcgettext (domain, msg_ctxt_id, category);
if (translation == msg_ctxt_id)
return msgid;
else
return translation;
}
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static const char *
npgettext_aux (const char *domain,
const char *msg_ctxt_id, const char *msgid,
const char *msgid_plural, unsigned long int n,
int category)
{
const char *translation =
dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
if (translation == msg_ctxt_id || translation == msgid_plural)
return (n == 1 ? msgid : msgid_plural);
else
return translation;
}
/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
can be arbitrary expressions. But for string literals these macros are
less efficient than those above. */
#include <string.h>
#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
(((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
/* || __STDC_VERSION__ >= 199901L */ )
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
#include <stdlib.h>
#endif
#define pgettext_expr(Msgctxt, Msgid) \
dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static const char *
dcpgettext_expr (const char *domain,
const char *msgctxt, const char *msgid,
int category)
{
size_t msgctxt_len = strlen (msgctxt) + 1;
size_t msgid_len = strlen (msgid) + 1;
const char *translation;
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
char msg_ctxt_id[msgctxt_len + msgid_len];
#else
char buf[1024];
char *msg_ctxt_id =
(msgctxt_len + msgid_len <= sizeof (buf)
? buf
: (char *) malloc (msgctxt_len + msgid_len));
if (msg_ctxt_id != NULL)
#endif
{
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
if (translation != msg_ctxt_id)
return translation;
}
return msgid;
}
#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static const char *
dcnpgettext_expr (const char *domain,
const char *msgctxt, const char *msgid,
const char *msgid_plural, unsigned long int n,
int category)
{
size_t msgctxt_len = strlen (msgctxt) + 1;
size_t msgid_len = strlen (msgid) + 1;
const char *translation;
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
char msg_ctxt_id[msgctxt_len + msgid_len];
#else
char buf[1024];
char *msg_ctxt_id =
(msgctxt_len + msgid_len <= sizeof (buf)
? buf
: (char *) malloc (msgctxt_len + msgid_len));
if (msg_ctxt_id != NULL)
#endif
{
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
if (!(translation == msg_ctxt_id || translation == msgid_plural))
return translation;
}
return (n == 1 ? msgid : msgid_plural);
}
#endif /* _LIBGETTEXT_H */

@ -7,6 +7,7 @@
*/
#include "config.h"
#include "gettext.h"
#include "configuration.h"
#include "ui.h"
@ -28,7 +29,7 @@ _win_add(void)
elm_icon_standard_set(icon, "evisum");
elm_win_icon_object_set(win, icon);
evas_object_resize(win, EVISUM_SIZE_WIDTH * elm_config_scale_get(), EVISUM_SIZE_HEIGHT * elm_config_scale_get());
elm_win_title_set(win, "Evisum: System Monitor");
elm_win_title_set(win, _("Evisum: System Monitor"));
elm_win_center(win, EINA_TRUE, EINA_TRUE);
ui = ui_add(win);
@ -51,6 +52,13 @@ main(int argc, char **argv)
config_init();
elm_init(argc, argv);
#if ENABLE_NLS
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
#endif
ui = _win_add();
if (ui)
{

@ -1,6 +1,7 @@
inc = include_directories('.', '../..')
executable('evisum', [
'main.c',
'configuration.c',
'configuration.h',
'disks.c',
@ -11,10 +12,10 @@ executable('evisum', [
'system.h',
'ui.c',
'ui.h',
'main.c'
'gettext.h',
],
include_directories : inc,
dependencies : [ deps, deps_os ],
dependencies : [ deps, deps_os, deps_nls ],
gui_app : true,
install : true)

@ -177,7 +177,7 @@ _battery_usage_add(Evas_Object *box, power_t *power)
eina_strbuf_append_printf(buf, "<bigger>%s ", power->battery_names[i]);
if (power->have_ac && i == 0)
{
eina_strbuf_append(buf, "(plugged in)");
eina_strbuf_append(buf, _("(plugged in)"));
}
eina_strbuf_append(buf, "</bigger>");
elm_object_text_set(label, eina_strbuf_string_get(buf));
@ -230,9 +230,9 @@ _network_usage_add(Ui *ui, Evas_Object *box, uint64_t bytes, Eina_Bool incoming)
label = elm_label_add(box);
if (incoming)
elm_object_text_set(label, "<bigger>Network Incoming</bigger>");
elm_object_text_set(label, _("<bigger>Network Incoming</bigger>"));
else
elm_object_text_set(label, "<bigger>Network Outgoing</bigger>");
elm_object_text_set(label, _("<bigger>Network Outgoing</bigger>"));
evas_object_size_hint_align_set(label, 1.0, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@ -343,7 +343,7 @@ _ui_disk_add(Ui *ui, const char *path, const char *mount, unsigned long total, u
label = elm_label_add(box);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(label, eina_slstr_printf("<subtitle>%s</subtitle><br><bigger>mounted at %s</bigger><br>%1.1f%c of %1.1f%c", path, mount,
elm_object_text_set(label, eina_slstr_printf(_("<subtitle>%s</subtitle><br><bigger>mounted at %s</bigger><br>%1.1f%c of %1.1f%c"), path, mount,
_disk_adjust(ui->data_unit, used), ui->data_unit, _disk_adjust(ui->data_unit, total), ui->data_unit));
evas_object_show(label);
elm_box_pack_end(box, label);
@ -413,9 +413,9 @@ _tab_memory_update(Ui *ui, results_t *results)
return;
elm_object_text_set(ui->title_mem, eina_slstr_printf(
"<subtitle>Memory</subtitle><br>" \
_("<subtitle>Memory</subtitle><br>" \
"<bigger>Physical %s</bigger><br><br>" \
"Swap %s",
"Swap %s"),
_mem_format(ui->data_unit, results->memory.total),
_mem_format(ui->data_unit, results->memory.swap_total)));
@ -476,7 +476,7 @@ _tab_cpu_update(Ui *ui, results_t *results)
return;
if (results->temperature != INVALID_TEMP)
elm_object_text_set(ui->temp_label, eina_slstr_printf("<header>Core at (%d °C)</header>", results->temperature));
elm_object_text_set(ui->temp_label, eina_slstr_printf(_("<header>Core at (%d °C)</header>"), results->temperature));
EINA_LIST_FOREACH(ui->cpu_list, l, pb)
{
@ -1582,8 +1582,8 @@ _item_menu_priority_add(Evas_Object *menu, Elm_Object_Item *menu_it, Proc_Info *
it = elm_menu_item_add(menu, menu_it, _icon_path_get("window"), eina_slstr_printf("%d", proc->nice), NULL, NULL);
elm_menu_item_separator_add(menu, menu_it);
elm_menu_item_add(menu, menu_it, _icon_path_get("increase"), "Increase", _item_menu_priority_increase_cb, proc);
elm_menu_item_add(menu, menu_it, _icon_path_get("decrease"), "Decrease", _item_menu_priority_decrease_cb, proc);
elm_menu_item_add(menu, menu_it, _icon_path_get("increase"), _("Increase"), _item_menu_priority_increase_cb, proc);
elm_menu_item_add(menu, menu_it, _icon_path_get("decrease"), _("Decrease"), _item_menu_priority_decrease_cb, proc);
elm_object_item_disabled_set(it, EINA_TRUE);
}
@ -1604,17 +1604,17 @@ _item_menu_create(Ui *ui, Proc_Info *proc)
menu_it = elm_menu_item_add(menu, NULL, _icon_path_get("window"), proc->command, NULL, NULL);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("window"), "Priority", NULL, NULL);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("window"), _("Priority"), NULL, NULL);
_item_menu_priority_add(menu, menu_it2, proc);
elm_menu_item_separator_add(menu, menu_it);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("start"), "Start", _item_menu_start_cb, proc);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("start"), _("Start"), _item_menu_start_cb, proc);
if (stopped) elm_object_item_disabled_set(menu_it2, EINA_TRUE);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("stop"), "Stop", _item_menu_stop_cb, proc);
menu_it2 = elm_menu_item_add(menu, menu_it, _icon_path_get("stop"), _("Stop"), _item_menu_stop_cb, proc);
if (!stopped) elm_object_item_disabled_set(menu_it2, EINA_TRUE);
elm_menu_item_add(menu, menu_it, _icon_path_get("kill"), "Kill", _item_menu_kill_cb, proc);
elm_menu_item_separator_add(menu, menu_it);
elm_menu_item_add(menu, menu_it, _icon_path_get("cancel"), "Cancel", _item_menu_cancel_cb, ui);
elm_menu_item_add(menu, menu_it, _icon_path_get("cancel"), _("Cancel"), _item_menu_cancel_cb, ui);
return menu;
}
@ -1700,7 +1700,7 @@ _ui_tab_system_add(Ui *ui)
frame = elm_frame_add(hbox);
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(frame, "System CPU");
elm_object_text_set(frame, _("System CPU"));
evas_object_show(frame);
elm_box_pack_end(hbox, frame);
@ -1715,7 +1715,7 @@ _ui_tab_system_add(Ui *ui)
frame = elm_frame_add(hbox);
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(frame, "System Memory");
elm_object_text_set(frame, _("System Memory"));
evas_object_show(frame);
elm_box_pack_end(hbox, frame);
@ -1742,7 +1742,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "PID");
elm_object_text_set(button, _("PID"));
evas_object_show(button);
elm_table_pack(table, button, 0, 0, 1, 1);
@ -1757,7 +1757,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "UID");
elm_object_text_set(button, _("UID"));
evas_object_show(button);
elm_table_pack(table, button, 1, 0, 1, 1);
@ -1772,7 +1772,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "Size");
elm_object_text_set(button, _("Size"));
evas_object_show(button);
elm_table_pack(table, button, 2, 0, 1, 1);
@ -1787,7 +1787,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "Res");
elm_object_text_set(button, _("Res"));
evas_object_show(button);
elm_table_pack(table, button, 3, 0, 1, 1);
@ -1802,7 +1802,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "Command");
elm_object_text_set(button, _("Command"));
evas_object_show(button);
elm_table_pack(table, button, 4, 0, 1, 1);
@ -1817,7 +1817,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "State");
elm_object_text_set(button, _("State"));
evas_object_show(button);
elm_table_pack(table, button, 5, 0, 1, 1);
@ -1832,7 +1832,7 @@ _ui_tab_system_add(Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "CPU %");
elm_object_text_set(button, _("CPU %"));
evas_object_show(button);
elm_table_pack(table, button, 6, 0, 1, 1);
@ -1902,7 +1902,7 @@ _ui_process_panel_add(Ui *ui)
frame = elm_frame_add(hbox);
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(frame, "Process Statistics");
elm_object_text_set(frame, _("Process Statistics"));
elm_box_pack_end(hbox, frame);
evas_object_show(frame);
@ -1921,7 +1921,7 @@ _ui_process_panel_add(Ui *ui)
elm_box_pack_end(hbox, frame);
label = elm_label_add(parent);
elm_object_text_set(label, "Command:");
elm_object_text_set(label, _("Command:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -1936,7 +1936,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "Command line:");
elm_object_text_set(label, _("Command line:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -1951,7 +1951,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "PID:");
elm_object_text_set(label, _("PID:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -1966,7 +1966,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "Username:");
elm_object_text_set(label, _("Username:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -1981,7 +1981,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "UID:");
elm_object_text_set(label, _("UID:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -1997,9 +1997,9 @@ _ui_process_panel_add(Ui *ui)
label = elm_label_add(parent);
#if defined(__MacOS__)
elm_object_text_set(label, "WQ #:");
elm_object_text_set(label, _("WQ #:"));
#else
elm_object_text_set(label, "CPU #:");
elm_object_text_set(label, _("CPU #:"));
#endif
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2015,7 +2015,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "Threads:");
elm_object_text_set(label, _("Threads:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2030,7 +2030,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, " Total memory :");
elm_object_text_set(label, _(" Total memory :"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2045,7 +2045,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, " Shared memory:");
elm_object_text_set(label, _(" Shared memory:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2060,7 +2060,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, " Virtual memory:");
elm_object_text_set(label, _(" Virtual memory:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2075,7 +2075,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "Nice:");
elm_object_text_set(label, _("Nice:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2090,7 +2090,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "Priority:");
elm_object_text_set(label, _("Priority:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2105,7 +2105,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "State:");
elm_object_text_set(label, _("State:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2120,7 +2120,7 @@ _ui_process_panel_add(Ui *ui)
elm_table_pack(table, entry, 1, i++, 1, 1);
label = elm_label_add(parent);
elm_object_text_set(label, "CPU %:");
elm_object_text_set(label, _("CPU %:"));
evas_object_show(label);
elm_table_pack(table, label, 0, i, 1, 1);
@ -2150,7 +2150,7 @@ _ui_process_panel_add(Ui *ui)
button = elm_button_add(parent);
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0.5);
elm_object_text_set(button, "Stop");
elm_object_text_set(button, _("Stop"));
evas_object_show(button);
evas_object_smart_callback_add(button, "clicked", _btn_stop_clicked_cb, ui);
elm_object_content_set(border, button);
@ -2165,7 +2165,7 @@ _ui_process_panel_add(Ui *ui)
button = elm_button_add(parent);
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0.5);
elm_object_text_set(button, "Start");
elm_object_text_set(button, _("Start"));
elm_object_content_set(border, button);
evas_object_show(button);
elm_box_pack_end(hbox, border);
@ -2180,7 +2180,7 @@ _ui_process_panel_add(Ui *ui)
button = elm_button_add(parent);
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0.5);
elm_object_text_set(button, "Kill");
elm_object_text_set(button, _("Kill"));
elm_box_pack_end(hbox, border);
evas_object_show(button);
elm_object_content_set(border, button);
@ -2314,7 +2314,7 @@ _ui_tab_cpu_add(Ui *ui)
label = elm_label_add(box);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, 0);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(label, eina_slstr_printf("<subtitle>CPUs</subtitle><br><bigger>Total of %d CPUs</bigger>", cpu_count));
elm_object_text_set(label, eina_slstr_printf(_("<subtitle>CPUs</subtitle><br><bigger>Total of %d CPUs</bigger>"), cpu_count));
evas_object_show(label);
elm_box_pack_end(box, label);
@ -2409,7 +2409,7 @@ _ui_tab_memory_add(Ui *ui)
ui->title_mem = label = elm_label_add(parent);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(label, "<subtitle>Memory</subtitle>");
elm_object_text_set(label, _("<subtitle>Memory</subtitle>"));
evas_object_show(label);
elm_box_pack_end(box, label);
@ -2426,7 +2426,7 @@ _ui_tab_memory_add(Ui *ui)
elm_table_padding_set(table, 0, 20 * elm_config_scale_get());
evas_object_show(table);
label = _label_mem(box, "Used");
label = _label_mem(box, _("Used"));
ui->progress_mem_used = progress = elm_progressbar_add(table);
evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -2437,7 +2437,7 @@ _ui_tab_memory_add(Ui *ui)
elm_table_pack(table, label, 0, 0, 1, 1);
elm_table_pack(table, progress, 1, 0, 1, 1);
label = _label_mem(box, "Cached");
label = _label_mem(box, _("Cached"));
ui->progress_mem_cached = progress = elm_progressbar_add(frame);
evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -2448,7 +2448,7 @@ _ui_tab_memory_add(Ui *ui)
elm_table_pack(table, label, 0, 1, 1, 1);
elm_table_pack(table, progress, 1, 1, 1, 1);
label = _label_mem(box, "Buffered");
label = _label_mem(box, _("Buffered"));
ui->progress_mem_buffered = progress = elm_progressbar_add(frame);
evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -2459,7 +2459,7 @@ _ui_tab_memory_add(Ui *ui)
elm_table_pack(table, label, 0, 2, 1, 1);
elm_table_pack(table, progress, 1, 2, 1, 1);
label = _label_mem(box, "Shared");
label = _label_mem(box, _("Shared"));
ui->progress_mem_shared = progress = elm_progressbar_add(frame);
evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -2469,7 +2469,7 @@ _ui_tab_memory_add(Ui *ui)
elm_table_pack(table, label, 0, 3, 1, 1);
elm_table_pack(table, progress, 1, 3, 1, 1);
label = _label_mem(box, "Swapped");
label = _label_mem(box, _("Swapped"));
ui->progress_mem_swap = progress = elm_progressbar_add(frame);
evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -2637,7 +2637,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
frame = elm_frame_add(parent);
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(frame, "Options");
elm_object_text_set(frame, _("Options"));
elm_object_style_set(frame, "pad_medium");
evas_object_show(frame);
@ -2658,7 +2658,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, TAB_BTN_SIZE * elm_config_scale_get(), 0);
elm_object_text_set(button, "Processes");
elm_object_text_set(button, _("Processes"));
evas_object_show(button);
elm_object_content_set(border, button);
elm_box_pack_end(hbox, border);
@ -2674,7 +2674,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, TAB_BTN_SIZE * elm_config_scale_get(), 0);
elm_object_text_set(button, "CPU");
elm_object_text_set(button, _("CPU"));
elm_object_content_set(border, button);
evas_object_show(button);
elm_box_pack_end(hbox, border);
@ -2690,7 +2690,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, TAB_BTN_SIZE * elm_config_scale_get(), 0);
elm_object_text_set(button, "Memory");
elm_object_text_set(button, _("Memory"));
evas_object_show(button);
elm_object_content_set(border, button);
elm_box_pack_end(hbox, border);
@ -2706,7 +2706,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, TAB_BTN_SIZE * elm_config_scale_get(), 0);
elm_object_text_set(button, "Storage");
elm_object_text_set(button, _("Storage"));
evas_object_show(button);
elm_object_content_set(border, button);
elm_box_pack_end(hbox, border);
@ -2722,7 +2722,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
evas_object_size_hint_weight_set(button, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, TAB_BTN_SIZE * elm_config_scale_get(), 0);
elm_object_text_set(button, "Misc");
elm_object_text_set(button, _("Misc"));
evas_object_show(button);
elm_object_content_set(border, button);
elm_box_pack_end(hbox, border);
@ -2774,7 +2774,7 @@ _ui_tabs_add(Evas_Object *parent, Ui *ui)
button = elm_button_add(parent);
evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(button, "Close");
elm_object_text_set(button, _("Close"));
elm_object_content_set(border, button);
elm_box_pack_end(box, border);
evas_object_show(button);

@ -2,9 +2,12 @@
#define __UI_H__
#include <Elementary.h>