mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
i18n: ensure we setup i18n/l10n during application startup
Historically, Sysprof never supported translations. When revamping the Sysprof implementation we didn't fix that, even though we were able to start accepting translations. This ensures we setup the translation tooling at startup. Fixes #3
This commit is contained in:
@ -16,9 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
@ -320,6 +318,14 @@ sp_application_init (SpApplication *self)
|
||||
{ "quit", sysprof_quit },
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
g_set_application_name (_("Sysprof"));
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (self), actions, G_N_ELEMENTS (actions), self);
|
||||
|
||||
g_application_set_default (G_APPLICATION (self));
|
||||
|
||||
Reference in New Issue
Block a user