mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
Add i18n support
This will be needed to get better error messages to users of the D-Bus API. We use glib's builtin gettext support. No strings marked as translatable yet, we'll need to mark those user-visible strings carefully and review them.
This commit is contained in:
committed by
Daniel Drake
parent
6cbb079619
commit
3ad569b66a
@ -17,11 +17,14 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <poll.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <dbus/dbus-glib-bindings.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <libfprint/fprint.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
@ -205,6 +208,10 @@ int main(int argc, char **argv)
|
||||
guint32 request_name_ret;
|
||||
int r = 0;
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
r = fp_init();
|
||||
if (r < 0) {
|
||||
g_error("fprint init failed with error %d\n", r);
|
||||
|
||||
Reference in New Issue
Block a user