-SUBDIRS = libtweakr-section modules
+SUBDIRS = libtweakr-section modules po
libtweakr_section = \
$(top_builddir)/libtweakr-section/libtweakr-section.la
--- /dev/null
+set -x
+glib-gettextize --copy --force
+libtoolize --automake --copy --force
+aclocal
+intltoolize --automake --copy --force
+autoconf --force
+autoheader --force
+automake --add-missing --copy --force-missing --foreign
+
/* config.h.in. Generated from configure.ac by autoheader. */
+/* gettext pakname */
+#undef GETTEXT_PACKAGE
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
AC_HEADER_STDC
AC_PROG_LIBTOOL
+AC_PROG_INTLTOOL([0.23])
+GETTEXT_PACKAGE=tweakr
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", [gettext pakname])
+ALL_LINGUAS="en_GB en_US it_IT"
+dnl AM_GLIB_GNU_GETTEXT
+
PKG_CHECK_MODULES(GLIB, glib-2.0)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
libtweakr-section/Makefile
libtweakr-section/tweakr-section.pc
modules/Makefile
+ po/Makefile.in
+ po/Makefile
])
debian/stamp-autotools-files:
autoreconf -v --install
+ intltoolize --copy --force --automake
touch debian/stamp-autotools-files
binary-predeb/tweakr::
usr/lib/hildon-control-panel/*so*
usr/share/applications/hildon-control-panel/*.desktop
+usr/share/locale/*/LC_MESSAGES/*
*/
#include <config.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <hildon/hildon-picker-button.h>
GtkWidget * _build_snap_to_grid (void)
{
- const gchar *options[] = {"No", "Small", "Large", "Huge", NULL};
+ const gchar *options[] =
+ {
+ _("No"),
+ _("Small"),
+ _("Large"),
+ _("Huge"),
+ NULL
+ };
gint i = 0;
GtkWidget *button, *selector;
hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_FINGER_HEIGHT);
hildon_button_set_title (HILDON_BUTTON (button),
- "Snap icons to grid");
+ _("Snap icons to grid"));
gtk_button_set_alignment (GTK_BUTTON (button), 0.0f, 0.5f);
hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
HILDON_TOUCH_SELECTOR (selector));
iface = TWEAKR_SECTION (section);
- iface->name = "Desktop";
+ iface->name = _("Desktop");
iface->widget = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (iface->widget), section->snap_button,
FALSE, FALSE, 0);
*/
#include <config.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <hildon/hildon-picker-button.h>
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
TWEAKR_TYPE_MCE_SECTION))
-#define DISABLE_LABEL "Do nothing"
-#define SHOW_MENU_LABEL "Show menu"
-#define POWER_OFF_LABEL "Power off"
-#define LOCK_LABEL "Lock device"
+#define DISABLE_LABEL _("Do nothing")
+#define SHOW_MENU_LABEL _("Show menu")
+#define POWER_OFF_LABEL _("Power off")
+#define LOCK_LABEL _("Lock device")
enum {
SHORT_POWER_KEY_DISABLED,
const gchar *label;
} picker_t;
-static picker_t spk [] = {
- {SHORT_POWER_KEY_DISABLED, "disabled", DISABLE_LABEL},
- {SHORT_POWER_KEY_MENU, "menu", SHOW_MENU_LABEL},
- {SHORT_POWER_KEY_OFF, "poweroff", POWER_OFF_LABEL}
-};
-
-static picker_t lpk [] = {
- {LONG_POWER_KEY_DISABLED, "disabled", DISABLE_LABEL},
- {LONG_POWER_KEY_MENU, "menu", SHOW_MENU_LABEL},
- {LONG_POWER_KEY_OFF, "poweroff", POWER_OFF_LABEL}
-};
-
-static picker_t dpk [] = {
- {DOUBLE_POWER_KEY_DISABLED, "disabled", DISABLE_LABEL},
- {DOUBLE_POWER_KEY_MENU, "menu", SHOW_MENU_LABEL},
- {DOUBLE_POWER_KEY_OFF, "poweroff", POWER_OFF_LABEL},
- {DOUBLE_POWER_KEY_LOCK, "tklock", LOCK_LABEL}
-};
-
+static picker_t spk [SHORT_POWER_KEY_N];
+static picker_t lpk [LONG_POWER_KEY_N];
+static picker_t dpk [DOUBLE_POWER_KEY_N];
typedef struct _TweakrMceSection TweakrMceSection;
typedef struct _TweakrMceSectionClass
gint i;
GtkWidget *button, *selector;
+ spk[0].index = SHORT_POWER_KEY_DISABLED;
+ spk[0].value = "disabled";
+ spk[0].label = DISABLE_LABEL;
+
+ spk[1].index = SHORT_POWER_KEY_MENU;
+ spk[1].value = "menu";
+ spk[1].label = SHOW_MENU_LABEL;
+
+ spk[2].index = SHORT_POWER_KEY_OFF;
+ spk[2].value = "poweroff";
+ spk[2].label = POWER_OFF_LABEL;
+
selector = hildon_touch_selector_new_text ();
for (i = 0; i < SHORT_POWER_KEY_N; i++)
{
hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_FINGER_HEIGHT);
hildon_button_set_title (HILDON_BUTTON (button),
- "Power key: short press");
+ _("Power key short press"));
gtk_button_set_alignment (GTK_BUTTON (button), 0.0f, 0.5f);
hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
HILDON_TOUCH_SELECTOR (selector));
{
gint i;
GtkWidget *button, *selector;
+
+ lpk[0].index = LONG_POWER_KEY_DISABLED;
+ lpk[0].value = "disabled";
+ lpk[0].label = DISABLE_LABEL;
+
+ lpk[1].index = LONG_POWER_KEY_MENU;
+ lpk[1].value = "menu";
+ lpk[1].label = SHOW_MENU_LABEL;
+
+ lpk[2].index = LONG_POWER_KEY_OFF;
+ lpk[2].value = "poweroff";
+ lpk[2].label = POWER_OFF_LABEL;
selector = hildon_touch_selector_new_text ();
for (i = 0; i < LONG_POWER_KEY_N; i++)
hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_FINGER_HEIGHT);
hildon_button_set_title (HILDON_BUTTON (button),
- "Power key: long press");
+ _("Power key long press"));
gtk_button_set_alignment (GTK_BUTTON (button), 0.0f, 0.5f);
hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
HILDON_TOUCH_SELECTOR (selector));
gint i;
GtkWidget *button, *selector;
+ dpk[0].index = DOUBLE_POWER_KEY_DISABLED;
+ dpk[0].value = "disabled";
+ dpk[0].label = DISABLE_LABEL;
+
+ dpk[1].index = DOUBLE_POWER_KEY_MENU;
+ dpk[1].value = "menu";
+ dpk[1].label = SHOW_MENU_LABEL;
+
+ dpk[2].index = DOUBLE_POWER_KEY_OFF;
+ dpk[2].value = "poweroff";
+ dpk[2].label = POWER_OFF_LABEL;
+
+ dpk[3].index = DOUBLE_POWER_KEY_LOCK;
+ dpk[3].value = "tklock";
+ dpk[3].label = LOCK_LABEL;
+
selector = hildon_touch_selector_new_text ();
for (i = 0; i < DOUBLE_POWER_KEY_N; i++)
{
hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_FINGER_HEIGHT);
hildon_button_set_title (HILDON_BUTTON (button),
- "Power key: double press");
+ _("Power key long press"));
gtk_button_set_alignment (GTK_BUTTON (button), 0.0f, 0.5f);
hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
HILDON_TOUCH_SELECTOR (selector));
button = hildon_check_button_new (HILDON_SIZE_AUTO);
hildon_gtk_widget_set_theme_size (button, HILDON_SIZE_FINGER_HEIGHT);
gtk_button_set_label (GTK_BUTTON (button),
- "Opening lens cover unlocks device");
+ _("Opening camera lens cover unlocks device"));
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (_lens_cover_changed), section);
section->value_changed = FALSE;
iface = TWEAKR_SECTION (section);
- iface->name = "Hardware keys";
+ iface->name = _("Hardware keys");
iface->widget = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (iface->widget), section->short_power_key,
FALSE, FALSE, 0);
gint retcode;
note = hildon_note_new_confirmation
- (NULL, "Setting all Power Key options to \"Do nothing\" means "
- "that the only way to turn the device off is the removal of "
- "the battery. Do you want to continue?");
+ (NULL,
+ _("Setting all Power Key options to \"Do nothing\" means "
+ "that the only way to turn the device off is the removal of "
+ "the battery. Do you want to continue?"));
retcode = gtk_dialog_run (GTK_DIALOG (note));
gtk_widget_destroy (note);
argv[1] = g_strdup_printf ("%s", spk[short_active].value);
argv[2] = g_strdup_printf ("%s", lpk[long_active].value);
argv[3] = g_strdup_printf ("%s", dpk[double_active].value);
- argv[4] = g_strdup_printf ("%s", lens_cover_value);
+ argv[4] = g_strdup_printf ("%d", lens_cover_value);
argv[5] = NULL;
g_spawn_sync ("/home/user", argv, NULL,
--- /dev/null
+tweakr.c
+modules/tweakr-desktop.c
+modules/tweakr-mce.c
--- /dev/null
+# Tweakr translation file
+# Copyright (C) 2009
+# This file is distributed under the same license as the Tweakr package.
+# Salvatore Iovene <salvatore@iovene.com>, 2009.
+#
+#: tweakr.c:58
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Tweakr 0.0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-12 11:21+0200\n"
+"PO-Revision-Date: 2009-12-12 11:21+0200\n"
+"Last-Translator: Salvatore Iovene <salvatore@iovene.com>\n"
+"Language-Team: Salvatore Iovene <salvatore@iovene.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: tweakr.c:128
+msgid ""
+"Some of the settings you have changed "
+"will take effect only after you restart your device."
+msgstr ""
+"Some of the settings you have changed "
+"will take effect only after you restart your device."
+
+#: modules/tweakr-desktop.c:145
+msgid "No"
+msgstr "No"
+
+#: modules/tweakr-desktop.c:146
+msgid "Small"
+msgstr "Small"
+
+#: modules/tweakr-desktop.c:147
+msgid "Large"
+msgstr "Large"
+
+#: modules/tweakr-desktop.c:148
+msgid "Huge"
+msgstr "Huge"
+
+#: modules/tweakr-desktop.c:166
+msgid "Snap icons to grid"
+msgstr "Snap icons to grid"
+
+#: modules/tweakr-desktop.c:220
+msgid "Desktop"
+msgstr "Desktop"
+
+#: modules/tweakr-mce.c:31
+msgid "Do nothing"
+msgstr "Do nothing"
+
+#: modules/tweakr-mce.c:32
+msgid "Show menu"
+msgstr "Show menu"
+
+#: modules/tweakr-mce.c:33
+msgid "Power off"
+msgstr "Power off"
+
+#: modules/tweakr-mce.c:34
+msgid "Lock device"
+msgstr "Lock device"
+
+#: modules/tweakr-mce.c:210
+msgid "Power key short press"
+msgstr "Power key short press"
+
+#: modules/tweakr-mce.c:239
+msgid "Power key long press"
+msgstr "Power key long press"
+
+#: modules/tweakr-mce.c:268
+msgid "Power key double press"
+msgstr "Power key double press"
+
+#: modules/tweakr-mce.c:287
+msgid "Opening camera lens cover unlocks device"
+msgstr "Opening camera lens cover unlocks device"
+
+#: modules/tweakr-mce.c:365
+msgid "Hardware keys"
+msgstr "Hardware keys"
+
+#: modules/tweakr-mce.c:425
+msgid ""
+"Setting all Power Key options to \"Do nothing\" means "
+"that the only way to turn the device off is the removal of "
+"the battery. Do you want to continue?"
+msgstr ""
+"Setting all Power Key options to \"Do nothing\" means "
+"that the only way to turn the device off is the removal of "
+"the battery. Do you want to continue?"
+
--- /dev/null
+en_GB.po
\ No newline at end of file
--- /dev/null
+# Tweakr translation file
+# Copyright (C) 2009
+# This file is distributed under the same license as the Tweakr package.
+# Salvatore Iovene <salvatore@iovene.com>, 2009.
+#
+#: tweakr.c:58
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Tweakr 0.0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-12 11:21+0200\n"
+"PO-Revision-Date: 2009-12-12 11:21+0200\n"
+"Last-Translator: Salvatore Iovene <salvatore@iovene.com>\n"
+"Language-Team: Salvatore Iovene <salvatore@iovene.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: tweakr.c:128
+msgid ""
+"Some of the settings you have changed "
+"will take effect only after you restart your device."
+msgstr ""
+"Alcuni dei dettaggi che hai cambiato "
+"avranno effetto solo dopo il riavvio del dispositivo."
+
+#: modules/tweakr-desktop.c:145
+msgid "No"
+msgstr "No"
+
+#: modules/tweakr-desktop.c:146
+msgid "Small"
+msgstr "Piccola"
+
+#: modules/tweakr-desktop.c:147
+msgid "Large"
+msgstr "Grande"
+
+#: modules/tweakr-desktop.c:148
+msgid "Huge"
+msgstr "Enorme"
+
+#: modules/tweakr-desktop.c:166
+msgid "Snap icons to grid"
+msgstr "Aggancia icone alla griglia"
+
+#: modules/tweakr-desktop.c:220
+msgid "Desktop"
+msgstr "Desktop"
+
+#: modules/tweakr-mce.c:31
+msgid "Do nothing"
+msgstr "Ignora"
+
+#: modules/tweakr-mce.c:32
+msgid "Show menu"
+msgstr "Mostra menu"
+
+#: modules/tweakr-mce.c:33
+msgid "Power off"
+msgstr "Spegni il telefono"
+
+#: modules/tweakr-mce.c:34
+msgid "Lock device"
+msgstr "Blocca schermo e tasti"
+
+#: modules/tweakr-mce.c:210
+msgid "Power key short press"
+msgstr "Pulsante di accensione: pressione breve"
+
+#: modules/tweakr-mce.c:239
+msgid "Power key long press"
+msgstr "Pulsante di accensione: pressione lunga"
+
+#: modules/tweakr-mce.c:268
+msgid "Power key double press"
+msgstr "Pulsante di accensione: doppio click"
+
+#: modules/tweakr-mce.c:287
+msgid "Opening camera lens cover unlocks device"
+msgstr "Scoprire la camera sblocca il telefono"
+
+#: modules/tweakr-mce.c:365
+msgid "Hardware keys"
+msgstr "Pulsanti"
+
+#: modules/tweakr-mce.c:425
+msgid ""
+"Setting all Power Key options to \"Do nothing\" means "
+"that the only way to turn the device off is the removal of "
+"the battery. Do you want to continue?"
+msgstr ""
+"Impostare tutte i settaggi del Pulsante di Accensione "
+"a \"Ignora\" vuol dire che l'unico modo per spegnere "
+"il telefono sarĂ rimuovere la batteria. Continuare?"
+
* vim:ts=4:sw=4:et:cindent:cino=(0
*/
+#include <config.h>
+#include <glib/gi18n-lib.h>
+
#include <hildon-cp-plugin/hildon-cp-plugin-interface.h>
#include <gtk/gtk.h>
#include <hildon/hildon-note.h>
GtkWidget *note;
note = hildon_note_new_information
- (GTK_WINDOW (data), "Some of the settings you have changed"
- " will take effect only after you restart your device.");
+ (GTK_WINDOW (data),
+ _("Some of the settings you have changed "
+ "will take effect only after you restart your device."));
gtk_dialog_run (GTK_DIALOG (note));
gtk_widget_destroy (note);
}
Icon=qgn_list_cp_isetup
X-control-panel-plugin=libtweakr.so
Categories=personalization
+X-Text-Domain=tweakr