Also translating the tools

This commit is contained in:
Pierre Pronchery 2013-07-20 05:04:07 +02:00
parent a52fd1866e
commit 00e6223895
5 changed files with 67 additions and 6 deletions

View File

@ -24,3 +24,5 @@
../src/panelctl.c
../src/run.c
../src/window.c
../tools/notify.c
../tools/test.c

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Panel 0.2.18\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-07-20 04:54+0200\n"
"POT-Creation-Date: 2013-07-20 05:00+0200\n"
"PO-Revision-Date: 2010-04-22 12:45+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: French\n"
@ -383,3 +383,37 @@ msgstr "Usage: run\n"
#: ../src/window.c:66
msgid "Invalid panel size"
msgstr "Taille invalide pour le panel"
#: ../tools/notify.c:168
msgid ""
"Usage: panel-notify [-L|-S|-X|-x][-t timeout] applet...\n"
" panel-notify -l\n"
" -L\tUse icons the size of a large toolbar\n"
" -S\tUse icons the size of a small toolbar\n"
" -X\tUse huge icons\n"
" -x\tUse icons the size of menus\n"
" -t\tTime to wait before disappearing (0: unlimited)\n"
" -l\tLists the plug-ins available\n"
msgstr ""
"Usage: panel-notify [-L|-S|-X|-x][-t durée] applet...\n"
" panel-notify -l\n"
" -L\tIcônes de la taille d'une grosse barre d'outils\n"
" -S\tIcônes de la taille d'une petite barre d'outils\n"
" -X\tIcônes de la taille de notifications\n"
" -x\tIcônes de la taille de menus\n"
" -t\tDurée d'affichage (0 : illimité)\n"
" -l\tLister les applets disponibles\n"
#: ../tools/test.c:139
msgid ""
"Usage: panel-test [-L|-S|-X|-x] applet...\n"
" panel-test -l\n"
" -l\tLists the plug-ins available\n"
msgstr ""
"Usage: panel-test [-L|-S|-X|-x] applet...\n"
" panel-test -l\n"
" -L\tIcônes de la taille d'une grosse barre d'outils\n"
" -S\tIcônes de la taille d'une petite barre d'outils\n"
" -X\tIcônes de la taille de notifications\n"
" -x\tIcônes de la taille de menus\n"
" -l\tLister les applets disponibles\n"

View File

@ -23,7 +23,6 @@
#include <System.h>
#include <Desktop.h>
#include <Desktop/Browser.h>
#define _(string) string
#ifndef PREFIX
# define PREFIX "/usr/local"

View File

@ -22,12 +22,16 @@
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <locale.h>
#include <libintl.h>
#include <gtk/gtk.h>
#include <System.h>
#include <Desktop.h>
#include "../src/panel.h"
#include "../config.h"
#define _(string) gettext(string)
/* constants */
#ifdef PACKAGE
# undef PACKAGE
#endif
@ -40,6 +44,12 @@
#ifndef LIBDIR
# define LIBDIR PREFIX "/lib"
#endif
#ifndef DATADIR
# define DATADIR PREFIX "/share"
#endif
#ifndef LOCALEDIR
# define LOCALEDIR DATADIR "/locale"
#endif
/* private */
@ -155,14 +165,14 @@ static gboolean _notify_on_timeout(gpointer data)
/* usage */
static int _usage(void)
{
fputs("Usage: panel-notify [-L|-S|-X|-x][-t timeout] applet...\n"
fputs(_("Usage: panel-notify [-L|-S|-X|-x][-t timeout] applet...\n"
" panel-notify -l\n"
" -L Use icons the size of a large toolbar\n"
" -S Use icons the size of a small toolbar\n"
" -X Use huge icons\n"
" -x Use icons the size of menus\n"
" -t Time to wait before disappearing (0: unlimited)\n"
" -l Lists the plug-ins available\n", stderr);
" -l Lists the plug-ins available\n"), stderr);
return 1;
}
@ -178,6 +188,9 @@ int main(int argc, char * argv[])
int o;
char * p;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
gtk_init(&argc, &argv);
if((huge = gtk_icon_size_from_name("panel-huge"))
== GTK_ICON_SIZE_INVALID)

View File

@ -21,12 +21,16 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <locale.h>
#include <libintl.h>
#include <gtk/gtk.h>
#include <System.h>
#include <Desktop.h>
#include "../src/panel.h"
#include "../config.h"
#define _(string) gettext(string)
/* constants */
#ifdef PACKAGE
# undef PACKAGE
#endif
@ -39,6 +43,12 @@
#ifndef LIBDIR
# define LIBDIR PREFIX "/lib"
#endif
#ifndef DATADIR
# define DATADIR PREFIX "/share"
#endif
#ifndef LOCALEDIR
# define LOCALEDIR DATADIR "/locale"
#endif
/* private */
@ -126,9 +136,9 @@ static int _test(GtkIconSize iconsize, char * applets[])
/* usage */
static int _usage(void)
{
fputs("Usage: panel-test [-L|-S|-X|-x] applet...\n"
fputs(_("Usage: panel-test [-L|-S|-X|-x] applet...\n"
" panel-test -l\n"
" -l Lists the plug-ins available\n", stderr);
" -l Lists the plug-ins available\n"), stderr);
return 1;
}
@ -142,6 +152,9 @@ int main(int argc, char * argv[])
GtkIconSize huge;
int o;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
gtk_init(&argc, &argv);
if((huge = gtk_icon_size_from_name("panel-huge"))
== GTK_ICON_SIZE_INVALID)