From ee8b80f8b0409b387f29816cd835481fc54abdd3 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 12 Jun 2016 01:57:45 +0200 Subject: [PATCH] Also translate the switch button --- po/POTFILES | 1 + src/flashlight.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/po/POTFILES b/po/POTFILES index 3381247..47aeb0b 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,2 +1,3 @@ +../src/flashlight.c ../src/main.c ../src/window.c diff --git a/src/flashlight.c b/src/flashlight.c index 24029d0..ae6c772 100644 --- a/src/flashlight.c +++ b/src/flashlight.c @@ -28,10 +28,12 @@ +#include #include #include #include "backend.h" #include "flashlight.h" +#define _(string) gettext(string) /* Flashlight */ @@ -84,7 +86,8 @@ Flashlight * flashlight_new(GtkOrientation orientation) G_CALLBACK(_flashlight_on_toggled), flashlight); #else # warning Switch widget is not available (needs Gtk+ >= 3.0) - flashlight->co_main = gtk_toggle_button_new_with_mnemonic("_Switch"); + flashlight->co_main = gtk_toggle_button_new_with_mnemonic( + _("_Switch")); g_signal_connect_swapped(flashlight->co_main, "toggled", G_CALLBACK( _flashlight_on_toggled), flashlight); #endif