Added Python plugin support

This commit is contained in:
Sebastien Helleu 2005-05-01 18:53:23 +00:00
parent dca4064502
commit eda55fbdb4
30 changed files with 3548 additions and 622 deletions

View File

@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2005-04-30
ChangeLog - 2005-05-01
Version 0.1.2 (under dev!):
* added Python plugin support
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
* added transfer rate for DCC files
* added "-all" option for /nick command

4
TODO
View File

@ -34,8 +34,8 @@ v0.1.2:
- add key bindings to config file
* Plugins:
+ Python plugin
+ "/python load" and "/python unload" commands to (un)load Python scripts
# Python plugin
# "/python load" and "/python unload" commands to (un)load Python scripts
Future versions:

View File

@ -68,6 +68,7 @@ AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa mem
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
AH_VERBATIM([DEBUG], [#undef DEBUG])
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],,enable_ncurses=yes)
@ -75,11 +76,10 @@ AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=yes,enable_python=no)
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
enable_plugins="no"
enable_python="no"
PYTHON_CFLAGS=
enable_ruby="no"
RUBY_CFLAGS=
@ -88,7 +88,7 @@ AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
if test "x$enable_ncurses" = "xyes" ; then
@ -141,6 +141,15 @@ if test "x$enable_perl" = "xyes" ; then
AC_DEFINE(PLUGIN_PERL)
fi
if test "x$enable_python" = "xyes" ; then
enable_plugins="yes"
PYTHON_CFLAGS=`python -c "import distutils.sysconfig,string; print ' -I' + distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
PYTHON_LFLAGS=`python -c "import distutils.sysconfig,string; print string.join(distutils.sysconfig.get_config_vars('LINKFORSHARED', 'BLDLIBRARY', 'SHLIBS'))"`
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/python/lib_weechat_python.a $PYTHON_LFLAGS"
AC_SUBST(PYTHON_CFLAGS)
AC_DEFINE(PLUGIN_PYTHON)
fi
if test "x$enable_plugins" = "xyes" ; then
AC_DEFINE(PLUGINS)
fi
@ -171,6 +180,7 @@ AC_OUTPUT([Makefile
src/irc/Makefile
src/plugins/Makefile
src/plugins/perl/Makefile
src/plugins/python/Makefile
src/gui/Makefile
src/gui/curses/Makefile
src/gui/wxwidgets/Makefile

View File

@ -9,6 +9,8 @@
./src/irc/irc.h
./src/plugins/perl/wee-perl.c
./src/plugins/perl/wee-perl.h
./src/plugins/python/wee-python.c
./src/plugins/python/wee-python.h
./src/plugins/plugins.c
./src/plugins/plugins.h
./src/gui/curses/gui-input.c

374
po/es.po
View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.2-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"PO-Revision-Date: 2005-04-30 19:49+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: 2005-05-01 20:48+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -1251,7 +1251,7 @@ msgstr "no es posible cambiar el modo para el resto de usuarios"
msgid "whois (secure connection)"
msgstr ""
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr "Servidor: "
@ -1300,7 +1300,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s número de argumentos incorrecto para el comando \"%s\"\n"
@ -1960,12 +1961,138 @@ msgstr "descarga del Perl script \"%s\"\n"
msgid "unloading all Perl scripts...\n"
msgstr "descargando todos los Perl scripts...\n"
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'print_with_channel'\n"
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
"Error de Python: no ha sido posible registrar el Python script \"%s\" (ya "
"existe otro script con ese nombre)\n"
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr "Python script registrado: \"%s\", versión %s (%s)\n"
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
"%s no ha sido posible cargar el Python script \"%s\" (memoria insuficiente)\n"
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'print'\n"
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'print_infobar'\n"
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'command'\n"
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr ""
"Error de Python: servidor no encontrado para la función Python 'command'\n"
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'add_message_handler'\n"
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'add_command_handler'\n"
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'get_info'\n"
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr ""
"Error de Python: servidor no encontrado para la función Python 'get_info'\n"
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr ""
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr "carga del Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr "Cargando Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr "descarga del Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr "descargando todos los Python scripts...\n"
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr ""
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr "carga automática del script %s : %s%s%s\n"
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2164,7 +2291,7 @@ msgstr "comando: nombre de un comando de Weechat
msgid "list/load/unload Perl scripts"
msgstr "lista/carga/descarga de los Perl scripts"
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr "[load fichero] | [autoload] | [unload]"
@ -2177,10 +2304,22 @@ msgstr ""
"Sin argumentos, el comando /perl lista todos los Perl scripts cargados."
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr "lista/carga/descarga de los Python scripts"
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
"fichero: Python script (archivo) a cargar\n"
"Sin argumentos, el comando /python lista todos los Python scripts cargados."
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr "lista, añade o elimina servidores"
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
@ -2191,7 +2330,7 @@ msgstr ""
"nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin "
"canal[,canal]] ] | [del nombre_de_servidor]"
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2213,27 +2352,27 @@ msgstr ""
"nombre_de_usuario: nombre de usuario\n"
"nombre_real: nombre real del usuario"
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr "guardar configuración a disco"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr "[archivo]"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr "archivo: fichero en el que guardar la configuración"
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr "modificar parámetros de configuración"
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr "[opción[=valor]]"
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
@ -2241,27 +2380,27 @@ msgstr ""
"opción: nombre de una opción\n"
"valor: valor para la opción"
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr "eliminar un alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr "alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr "alias: nombre del alias a suprimir"
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr "gestión de ventanas"
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr "[list | splith | splitv | [merge [down | up | left | right | all]]]"
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2274,29 +2413,29 @@ msgstr ""
"splitv: dividir la ventana actual verticalmente\n"
"merge: fusionar una ventana con otra"
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr "%s ¡el alias o el comando \"%s\" ya existe!\n"
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr "%s ¡el alias no puede ejecutar otro alias!\n"
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr "%s ¡el comando objetivo \"%s\" no existe!\n"
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s número de argumentos incorrecto para el comando %s \"%s\" (esperado: %d "
"parámetro%s)\n"
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
@ -2305,19 +2444,19 @@ msgstr ""
"%s número de argumentos incorrecto para el comando %s \"%s\" (esperado: "
"entre %d y %d parámetro%s)\n"
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr "%s el comando \"%s\" ha fallado\n"
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s número de argumentos incorrecto para el comando IRC \"%s\" (esperado: %d "
"parámetro%s)\n"
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
@ -2326,178 +2465,180 @@ msgstr ""
"%s número de argumentos incorrecto para el comando IRC \"%s\" (esperado: "
"entre %d y %d parámetro%s)\n"
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr "%s ¡el comando \"%s\" requiere una conexión a servidor!\n"
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr "%s comando \"%s\" desconocido (escriba /help para la ayuda)\n"
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr "%s no ha sido posible encontrar el usuario al que enviar el mensaje\n"
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr "¡Esta ventana no es un canal!\n"
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s faltan argumentos para el comando \"%s\"\n"
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr "Alias \"%s\" => \"%s\" creado\n"
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr ""
"No ha sido posible crear el alias \"%s\" => \"%s\" (no hay suficiente "
"memoria)\n"
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr "Lista de alias:\n"
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr "Ningún alias definido.\n"
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr " (servidor: "
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr "Privado con: "
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr "Búfers abiertos:\n"
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s número de búfer incorrecto\n"
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr "%s no es posible cerrar el único búfer\n"
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
"%s no se puede cerrar el búfer de servidor mientras haya canales abiertos\n"
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr "Niveles de notificación: "
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr "%s nivel de notificación incorrecto (debe estar entre 0 y 3)\n"
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s búfer \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "parámetro desconocido \"%s\" para el comando \"%s\"\n"
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s ya conectado al servidor \"%s\"!\n"
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr "%s actualmente conectando al servidor \"%s\"!\n"
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr "%s servidor no encontrado\n"
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s opción desconocida para el comando \"%s\"\n"
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s ¡no conectado al servidor \"%s\"!\n"
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr "La reconexión automática está anulada\n"
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr "Comandos internos %s :\n"
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr "Comandos IRC :\n"
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "No hay ayuda disponible, el comando \"%s\" es desconocido\n"
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr "Perl scripts registrados:\n"
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr " (ninguno)\n"
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr "Funciones Perl para mensajes:\n"
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr "Comandos Perl :\n"
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Comando /%s => Perl(%s)\n"
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr "Perl scripts descargados\n"
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@ -2506,32 +2647,68 @@ msgstr ""
"Por favor, recompile WeeChat con la opción \"--enable-perl\" para el "
"script ./configure\n"
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr "Python scripts registrados:\n"
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr "Funciones Python para mensajes:\n"
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr " IRC(%s) => Python(%s)\n"
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr "Comandos Python :\n"
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr " Comando /%s => Python(%s)\n"
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr "Python scripts descargados\n"
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
"WeeChat ha sido compilado sin soporte para Python.\n"
"Por favor, recompile WeeChat con la opción \"--enable-python\" para el "
"script ./configure\n"
#: src/common/command.c:1606
msgid "No server.\n"
msgstr "Ningún servidor.\n"
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Servidor '%s' no encontrado.\n"
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s falta el nombre de servidor para el comando \"%s\"\n"
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
"%s demasiados argumentos para el comando \"%s\", ignorando parámetros\n"
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s servidor \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@ -2540,108 +2717,108 @@ msgstr ""
"%s usted no puede eliminar el servidor \"%s\" ya que está usted conectado a "
"él. Pruebe /disconnect %s antes.\n"
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr "Servidor"
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr "ha sido eliminado\n"
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s faltan parámetros para el comando \"%s\"\n"
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s el servidor \"%s\" ya existe, ¡no se puede crear!\n"
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s falta contraseña para el comando \"%s\"\n"
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s falta(n) usuario(s) para el parámetro \"%s\"\n"
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s falta comando para el parámetro \"%s\"\n"
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr "creado\n"
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr "%s no es posible crear el servidor\n"
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr "(desconocido)"
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr "(contraseña oculta) "
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s servidor \"%s\" no encontrado\n"
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s opción de configuración \"%s\" no encontrada\n"
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
"%s la opción \"%s\" no puede ser modificada mientras WeeChat esté en "
"ejecución\n"
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Ninguna opción de configuración encontrada con \"%s\"\n"
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr "Ninguna opción de configuración encontrada\n"
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "opción/opciones de configuración encontrada(s) con \"%s\"\n"
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr "opción/opciones de configuración encontrada(s)\n"
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias o comando \"%s\" no encontrado\n"
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" eliminado\n"
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr "Ventanas abiertas:\n"
@ -3735,6 +3912,3 @@ msgstr ""
#: src/common/weeconfig.c:1564
msgid "saving config to disk\n"
msgstr "guardar configuración a disco\n"
#~ msgid "nickname: new nickname for current IRC server"
#~ msgstr "usuario: nuevo nombre de usuario para el servidor IRC actual"

370
po/fr.po
View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.2-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"PO-Revision-Date: 2005-04-30 19:49+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: 2005-05-01 20:47+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -1252,7 +1252,7 @@ msgstr "impossible de changer le mode pour les autres utilisateurs"
msgid "whois (secure connection)"
msgstr "qui est (connexion sécurisée)"
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr "Serveur: "
@ -1302,7 +1302,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@ -1959,12 +1960,134 @@ msgstr "d
msgid "unloading all Perl scripts...\n"
msgstr "déchargement de tous les scripts Perl...\n"
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'print_with_channel'\n"
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
"Erreur Python: impossible d'enregistrer le script Python \"%s\" (un autre "
"script existe déjà avec ce nom)\n"
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr "script Python enregistré: \"%s\", version %s (%s)\n"
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
"%s impossible de charger le script Python \"%s\" (mémoire insuffisante)\n"
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'print'\n"
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python 'print_infobar'\n"
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'command'\n"
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr "Erreur Python: serveur non trouvé pour la fonction Python 'command'\n"
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'add_message_handler'\n"
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'add_command_handler'\n"
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'get_info'\n"
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr "Erreur Python: serveur non trouvé pour la fonction Python 'get_info'\n"
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr "Erreur Python: erreur pendant le chargement de l'interpréteur Python\n"
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr "Chargement du module Python \"weechat\"\n"
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
"Erreur Python: impossible de charger le script Python \"%s\" (mémoire "
"insuffisante)\n"
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr "Erreur Python: erreur dans la fonction \"%s\"\n"
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr "chargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr "Chargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr "Erreur Python: erreur à l'ouverture du fichier \"%s\"\n"
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr "Erreur Python: erreur en analysant le fichier \"%s\"\n"
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr "déchargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr "déchargement de tous les scripts Python...\n"
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr "Erreur Python: impossible de libérer l'interpréteur Python\n"
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr "chargement automatique du script %s : %s%s%s\n"
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2162,7 +2285,7 @@ msgstr "commande: nom d'une commande WeeChat ou IRC"
msgid "list/load/unload Perl scripts"
msgstr "liste/charge/décharge des scripts Perl"
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr "[load fichier] | [autoload] | [unload]"
@ -2175,10 +2298,22 @@ msgstr ""
"Sans paramètre, la commande /perl liste tous les scripts Perl chargés."
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr "liste/charge/décharge des scripts Python"
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
"fichier: script Python (fichier) à charger\n"
"Sans paramètre, la commande /python liste tous les scripts Python chargés."
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr "liste, ajoute ou retire des serveurs"
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
@ -2189,7 +2324,7 @@ msgstr ""
"nom_utilisateur] [-realname nom_réel] [-command commande] [-autojoin canal[,"
"canal]] ] | [del nom_serveur]"
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2211,27 +2346,27 @@ msgstr ""
"nom_utilisateur: nom d'utilisateur\n"
"nom_réel: nom réel de l'utilisateur"
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr "sauvegarder la configuration sur disque"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr "[fichier]"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr "fichier: fichier pour sauvegarder la configuration"
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr "modifier des paramètres de configuration"
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr "[option[=valeur]]"
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
@ -2239,27 +2374,27 @@ msgstr ""
"option: nom d'une option\n"
"valeur: valeur pour l'option"
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr "supprimer un alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr "nom_alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr "nom_alias: nom de l'alias à supprimer"
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr "gestion des fenêtres"
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr "[list | splith | splitv | [merge [down | up | left | right | all]]]"
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2271,29 +2406,29 @@ msgstr ""
"splitv: éclate la fenêtre en deux verticalement\n"
"merge: fusionne la fenêtre avec une autre"
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr "%s l'alias ou la commande \"%s\" existe déjà !\n"
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr "%s l'alias ne peux pas lancer un autre alias !\n"
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr "%s la commande cible \"%s\" n'existe pas !\n"
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s nombre de paramètres incorrect pour la commande %s \"%s\" (attendu: %d "
"paramètre%s)\n"
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
@ -2302,19 +2437,19 @@ msgstr ""
"%s nombre de paramètres incorrect pour la commande %s \"%s\" (attendu: entre "
"%d et %d paramètre%s)\n"
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr "%s la commande \"%s\" a échoué\n"
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s nombre de paramètres incorrect pour la commande IRC \"%s\" (attendu: %d "
"paramètre%s)\n"
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
@ -2323,177 +2458,179 @@ msgstr ""
"%s nombre de paramètres incorrect pour la commande IRC \"%s\" (attendu: "
"entre %d et %d paramètre%s)\n"
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr "%s la commande \"%s\" nécessite une connexion au serveur !\n"
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr "%s commande \"%s\" inconnue (tapez /help pour l'aide)\n"
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr "Cette fenêtre n'est pas un canal !\n"
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr "Alias \"%s\" => \"%s\" créé\n"
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr "Impossible de créer l'alias \"%s\" => \"%s\" (pas assez de mémoire)\n"
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr "Liste des alias:\n"
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr "Aucun alias défini.\n"
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr " (serveur: "
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr "Privé avec: "
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr "Tampons ouverts:\n"
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s numéro de buffer incorrect\n"
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr "%s impossible de fermer le tampon unique\n"
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
"%s impossible de fermer le tampon du serveur tant que des canaux sont "
"ouverts\n"
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr "Niveaux de notification: "
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr "%s niveau de notification incorrect (doit être entre 0 et 3)\n"
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n"
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n"
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s déjà connecté au serveur \"%s\" !\n"
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr "%s une connexion vers le serveur \"%s\" est en cours !\n"
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr "%s serveur non trouvé\n"
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s non connecté au serveur \"%s\" !\n"
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr "La reconnexion automatique est annulée\n"
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr "Commandes internes %s :\n"
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr "Commandes IRC :\n"
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr "Scripts Perl enregistrés :\n"
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr " (aucun)\n"
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr "Fonctions Perl pour messages :\n"
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr "Commandes Perl :\n"
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Commande /%s => Perl(%s)\n"
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr "Scripts Perl déchargés\n"
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@ -2502,31 +2639,67 @@ msgstr ""
"Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le "
"script ./configure\n"
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr "Scripts Python enregistrés :\n"
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr "Fonctions Python pour messages :\n"
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr " IRC(%s) => Python(%s)\n"
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr "Commandes Python :\n"
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr " Commande /%s => Python(%s)\n"
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr "Scripts Python déchargés\n"
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
"WeeChat a été construit sans le support Python.\n"
"Merci de reconstruire WeeChat avec l'option \"--enable-python\" pour le "
"script ./configure\n"
#: src/common/command.c:1606
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Serveur '%s' non trouvé.\n"
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@ -2535,106 +2708,106 @@ msgstr ""
"%s vous ne pouvez pas supprimer le server \"%s\" car vous êtes connecté "
"dessus. Essayez /disconnect %s avant.\n"
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr "(mot de passe caché) "
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr "Aucune option de configuration trouvée\n"
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr "option(s) de configuration trouvée(s)\n"
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr "Fenêtres ouvertes:\n"
@ -3726,6 +3899,3 @@ msgstr ""
#: src/common/weeconfig.c:1564
msgid "saving config to disk\n"
msgstr "sauvegarde de la configuration sur disque\n"
#~ msgid "nickname: new nickname for current IRC server"
#~ msgstr "pseudo: nouveau pseudo pour le serveur IRC courant"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1146,7 +1146,7 @@ msgstr ""
msgid "whois (secure connection)"
msgstr ""
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr ""
@ -1194,7 +1194,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@ -1833,12 +1834,122 @@ msgstr ""
msgid "unloading all Perl scripts...\n"
msgstr ""
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr ""
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr ""
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr ""
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr ""
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr ""
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2020,7 +2131,7 @@ msgstr ""
msgid "list/load/unload Perl scripts"
msgstr ""
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr ""
@ -2031,17 +2142,27 @@ msgid ""
msgstr ""
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr ""
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr ""
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
"command command] [-autojoin channel[,channel]] ] | [del servername]"
msgstr ""
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2054,53 +2175,53 @@ msgid ""
"realname: real name of user"
msgstr ""
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr ""
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr ""
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr ""
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr ""
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr ""
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
msgstr ""
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr ""
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr ""
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr ""
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr ""
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr ""
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2108,355 +2229,390 @@ msgid ""
"merge: merge window with another"
msgstr ""
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr ""
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr ""
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr ""
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
"arg%s)\n"
msgstr ""
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr ""
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
"arg%s)\n"
msgstr ""
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr ""
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr ""
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr ""
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr ""
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr ""
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr ""
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr ""
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr ""
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr ""
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr ""
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr ""
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr ""
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr ""
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr ""
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr ""
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr ""
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr ""
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr ""
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr ""
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr ""
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr ""
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr ""
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr ""
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr ""
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr ""
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr ""
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
msgstr ""
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr ""
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr ""
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr ""
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr ""
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr ""
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr ""
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
#: src/common/command.c:1606
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr ""
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
"disconnect %s before.\n"
msgstr ""
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr ""
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr ""
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr ""
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr ""
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr ""
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr ""

View File

@ -77,6 +77,11 @@ t_weechat_command weechat_commands[] =
N_("filename: Perl script (file) to load\n"
"Without argument, /perl command lists all loaded Perl scripts."),
0, 2, weechat_cmd_perl, NULL },
{ "python", N_("list/load/unload Python scripts"),
N_("[load filename] | [autoload] | [unload]"),
N_("filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."),
0, 2, weechat_cmd_python, NULL },
{ "server", N_("list, add or remove servers"),
N_("[servername] | "
"[servername hostname port [-auto | -noauto] [-pwd password] [-nicks nick1 "
@ -1286,13 +1291,12 @@ weechat_cmd_help (int argc, char **argv)
int
weechat_cmd_perl (int argc, char **argv)
{
#ifdef PLUGINS
#ifdef PLUGIN_PERL
t_plugin_script *ptr_plugin_script;
t_plugin_handler *ptr_plugin_handler;
int handler_found, path_length;
char *path_script;
#ifdef PLUGIN_PERL
switch (argc)
{
case 0:
@ -1418,11 +1422,146 @@ weechat_cmd_perl (int argc, char **argv)
(void) argv;
#endif /* PLUGIN_PERL */
return 0;
}
/*
* weechat_cmd_python: list/load/unload Python scripts
*/
int
weechat_cmd_python (int argc, char **argv)
{
#ifdef PLUGIN_PYTHON
t_plugin_script *ptr_plugin_script;
t_plugin_handler *ptr_plugin_handler;
int handler_found, path_length;
char *path_script;
switch (argc)
{
case 0:
/* list registered Python scripts */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Registered Python scripts:\n"));
if (python_scripts)
{
for (ptr_plugin_script = python_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " %s v%s%s%s\n",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
}
}
else
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
/* list Python message handlers */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Python message handlers:\n"));
handler_found = 0;
for (ptr_plugin_handler = plugin_msg_handlers; ptr_plugin_handler;
ptr_plugin_handler = ptr_plugin_handler->next_handler)
{
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s) => Python(%s)\n"),
ptr_plugin_handler->name,
ptr_plugin_handler->function_name);
}
}
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
/* list Python command handlers */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Python command handlers:\n"));
handler_found = 0;
for (ptr_plugin_handler = plugin_cmd_handlers; ptr_plugin_handler;
ptr_plugin_handler = ptr_plugin_handler->next_handler)
{
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" Command /%s => Python(%s)\n"),
ptr_plugin_handler->name,
ptr_plugin_handler->function_name);
}
}
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
break;
case 1:
if (strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
if (strcasecmp (argv[0], "unload") == 0)
{
/* unload all Python scripts */
plugin_unload (PLUGIN_TYPE_PYTHON, NULL);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python scripts unloaded\n"));
}
break;
case 2:
if (strcasecmp (argv[0], "load") == 0)
{
/* load Python script */
if (strstr(argv[1], DIR_SEPARATOR))
path_script = NULL;
else
{
path_length = strlen (weechat_home) + strlen (argv[1]) + 7;
path_script = (char *) malloc (path_length * sizeof (char));
snprintf (path_script, path_length, "%s%s%s%s%s",
weechat_home, DIR_SEPARATOR, "python",
DIR_SEPARATOR, argv[1]);
}
plugin_load (PLUGIN_TYPE_PYTHON,
(path_script) ? path_script : argv[1]);
if (path_script)
free (path_script);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s unknown option for \"%s\" command\n"),
WEECHAT_ERROR, "python");
}
break;
default:
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "python");
}
#else
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("WeeChat was build without Python support.\n"
"Please rebuild WeeChat with "
"\"--enable-python\" option for ./configure script\n"));
/* make gcc happy */
(void) argc;
(void) argv;
#endif /* PLUGINS */
#endif /* PLUGIN_PYTHON */
return 0;
}

View File

@ -70,6 +70,7 @@ extern int weechat_cmd_debug (int, char **);
extern int weechat_cmd_disconnect (int, char **);
extern int weechat_cmd_help (int, char **);
extern int weechat_cmd_perl (int, char **);
extern int weechat_cmd_python (int, char **);
extern int weechat_cmd_save (int, char **);
extern int weechat_cmd_server (int, char **);
extern int weechat_cmd_set (char *);

View File

@ -207,6 +207,20 @@ completion_build_list (t_completion *completion, void *channel)
"unload");
return;
}
if ((strcasecmp (completion->base_command, "python") == 0)
&& (completion->base_command_arg == 1))
{
weelist_add (&completion->completion_list,
&completion->last_completion,
"load");
weelist_add (&completion->completion_list,
&completion->last_completion,
"autoload");
weelist_add (&completion->completion_list,
&completion->last_completion,
"unload");
return;
}
if ((strcasecmp (completion->base_command, "set") == 0)
&& (completion->base_command_arg == 1))
{

View File

@ -21,16 +21,16 @@ if PLUGIN_PERL
perl_dir = perl
endif
# if PLUGIN_PYTHON
# python_dir = python
# endif
if PLUGIN_PYTHON
python_dir = python
endif
# if PLUGIN_RUBY
# ruby_dir = ruby
# endif
# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir)
SUBDIRS = $(perl_dir)
SUBDIRS = $(perl_dir) $(python_dir)
noinst_LIBRARIES = lib_weechat_plugins.a

View File

@ -39,6 +39,10 @@
#include "perl/wee-perl.h"
#endif
#ifdef PLUGIN_PYTHON
#include "python/wee-python.h"
#endif
char *plugin_name[3] = { "Perl", "Python", "Ruby" };
@ -115,6 +119,11 @@ plugin_init ()
wee_perl_init();
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
#endif
#ifdef PLUGIN_PYTHON
wee_python_init();
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
#endif
}
/*
@ -133,7 +142,9 @@ plugin_load (int plugin_type, char *filename)
#endif
break;
case PLUGIN_TYPE_PYTHON:
/* TODO: load Python script */
#ifdef PLUGIN_PYTHON
wee_python_load (filename);
#endif
break;
case PLUGIN_TYPE_RUBY:
/* TODO: load Ruby script */
@ -292,6 +303,10 @@ plugin_event_msg (char *irc_command, char *arguments, char *server)
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
#ifdef PLUGIN_PYTHON
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
wee_python_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
}
}
#else
@ -321,6 +336,10 @@ plugin_exec_command (char *user_command, char *arguments, char *server)
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
#ifdef PLUGIN_PYTHON
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
wee_python_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
/* command executed */
return 1;
@ -358,7 +377,10 @@ plugin_unload (int plugin_type, char *scriptname)
#endif
break;
case PLUGIN_TYPE_PYTHON:
/* TODO: unload Python scripts */
#ifdef PLUGIN_PYTHON
wee_python_end ();
wee_python_init ();
#endif
break;
case PLUGIN_TYPE_RUBY:
/* TODO: unload Ruby scripts */
@ -383,4 +405,8 @@ plugin_end ()
#ifdef PLUGIN_PERL
wee_perl_end();
#endif
#ifdef PLUGIN_PYTHON
wee_python_end();
#endif
}

View File

@ -0,0 +1,23 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
noinst_LIBRARIES = lib_weechat_python.a
lib_weechat_python_a_SOURCES = wee-python.h \
wee-python.c

View File

@ -0,0 +1,713 @@
/*
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* wee-python.c: Python plugin support for WeeChat */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <Python.h>
#include <stdlib.h>
#include <string.h>
#undef _
#include "../../common/weechat.h"
#include "../plugins.h"
#include "wee-python.h"
#include "../../common/command.h"
#include "../../irc/irc.h"
#include "../../gui/gui.h"
t_plugin_script *python_scripts = NULL;
t_plugin_script *last_python_script = NULL;
/*
* weechat.register(nom, version, fonction, description):
* startup function for all WeeChat Python scripts
*/
static PyObject *
wee_python_register (PyObject *self, PyObject *args)
{
char *name, *version, *shutdown_func, *description;
t_plugin_script *ptr_python_script, *python_script_found, *new_python_script;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ssss", &name, &version, &shutdown_func, &description))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_with_channel' Python function\n"));
return NULL;
}
python_script_found = NULL;
for (ptr_python_script = python_scripts; ptr_python_script;
ptr_python_script = ptr_python_script->next_script)
{
if (strcasecmp (ptr_python_script->name, name) == 0)
{
python_script_found = ptr_python_script;
break;
}
}
if (python_script_found)
{
/* error: another scripts already exists with this name! */
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"),
name);
}
else
{
/* registering script */
new_python_script = (t_plugin_script *)malloc (sizeof (t_plugin_script));
if (new_python_script)
{
new_python_script->name = strdup (name);
new_python_script->version = strdup (version);
new_python_script->shutdown_func = strdup (shutdown_func);
new_python_script->description = strdup (description);
/* add new script to list */
new_python_script->prev_script = last_python_script;
new_python_script->next_script = NULL;
if (python_scripts)
last_python_script->next_script = new_python_script;
else
python_scripts = new_python_script;
last_python_script = new_python_script;
wee_log_printf (_("registered Python script: \"%s\", version %s (%s)\n"),
name, version, description);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s unable to load Python script \"%s\" (not enough memory)\n"),
WEECHAT_ERROR, name);
}
}
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.print(message): print message to current buffer
*/
static PyObject *
wee_python_print (PyObject *self, PyObject *args)
{
char *message;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s", &message))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print' Python function\n"));
return NULL;
}
irc_display_prefix (gui_current_window->buffer, PREFIX_PLUGIN);
gui_printf (gui_current_window->buffer, "%s\n", message);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.print_with_channel(message, channel, server=None):
* print message to a specific channel/server
* (server is optional)
*/
static PyObject *
wee_python_print_with_channel (PyObject *self, PyObject *args)
{
char *message, *channel, *server = NULL;
int ret = 0;
t_gui_buffer *ptr_buffer;
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss|s", &message, &channel, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_with_channel' Python function\n"));
return NULL;
}
ptr_buffer = NULL;
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
if (!server || (strcasecmp (ptr_server->name, server)) == 0)
{
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
if (strcasecmp (ptr_channel->name, channel) == 0)
{
ptr_buffer = ptr_channel->buffer;
break;
}
}
}
if (ptr_buffer)
break;
}
/* buffer found => display message & return 1 ~= True */
if (ptr_buffer)
{
irc_display_prefix (ptr_buffer, PREFIX_PLUGIN);
gui_printf (ptr_buffer, "%s", message);
ret = 1;
}
return Py_BuildValue ("i", ret);
}
/*
* weechat.print_infobar(delay, message): print message to infobar
*/
static PyObject *
wee_python_print_infobar (PyObject *self, PyObject *args)
{
int delay;
char *message;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "is", &delay, &message))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_infobar' Python function\n"));
return NULL;
}
gui_infobar_printf (delay, COLOR_WIN_INFOBAR, message);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.command(command, server=None): send command to server
*/
static PyObject *
wee_python_command (PyObject *self, PyObject *args)
{
char *server = NULL, *command, *command2;
t_irc_server *ptr_server;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s|s", &command, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'command' Python function\n"));
return NULL;
}
if (server == NULL)
{
ptr_server = SERVER(gui_current_window->buffer);
}
else
{
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
{
if (strcasecmp (ptr_server->name, server) == 0)
break;
}
if (!ptr_server)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: server not found for 'command' Python function\n"));
}
}
if (ptr_server)
{
command2 = (char *) malloc (strlen (command) + 8);
strcpy (command2, command);
if (!strstr (command2, "\r\n"))
strcat (command2, "\r\n");
server_sendf (ptr_server, command2);
free (command2);
}
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.add_message_handler(message, function):
* add handler for messages
*/
static PyObject *
wee_python_add_message_handler (PyObject *self, PyObject *args)
{
char *message, *function;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss", &message, &function))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'add_message_handler' Python function\n"));
return NULL;
}
plugin_handler_add (&plugin_msg_handlers, &last_plugin_msg_handler,
PLUGIN_TYPE_PYTHON, message, function);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.add_command_handler(name, function):
* define/redefines commands
*/
static PyObject *
wee_python_add_command_handler(PyObject *self, PyObject *args)
{
char *name, *function;
t_plugin_handler *ptr_plugin_handler;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss", &name, &function))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'add_command_handler' Python function\n"));
return NULL;
}
if (!weelist_search (index_commands, name))
weelist_add (&index_commands, &last_index_command, name);
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, name);
if (ptr_plugin_handler)
{
free (ptr_plugin_handler->function_name);
ptr_plugin_handler->function_name = strdup (function);
}
else
plugin_handler_add (&plugin_cmd_handlers, &last_plugin_cmd_handler,
PLUGIN_TYPE_PYTHON, name, function);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.get_info(info, server=None):
* get various infos
*/
static PyObject *
wee_python_get_info (PyObject *self, PyObject *args)
{
char *arg, *info = NULL, *server = NULL;
t_irc_server *ptr_server;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s|s", &arg, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'get_info' Python function\n"));
return NULL;
}
if (server == NULL)
{
ptr_server = SERVER(gui_current_window->buffer);
}
else
{
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
{
if (strcasecmp (ptr_server->name, server) == 0)
break;
}
if (!ptr_server)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: server not found for 'get_info' Python function\n"));
}
}
if (ptr_server && arg)
{
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
{
info = PACKAGE_STRING;
}
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
{
if (ptr_server->nick)
info = ptr_server->nick;
}
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
{
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
info = CHANNEL (gui_current_window->buffer)->name;
}
else if ( (strcasecmp (arg, "3") == 0) || (strcasecmp (arg, "server") == 0) )
{
if (ptr_server->name)
info = ptr_server->name;
}
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
{
info = weechat_home;
}
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
{
return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);
}
if (info)
return Py_BuildValue ("s", info);
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
}
/*
* initialize subroutines
*/
static
PyMethodDef weechat_funcs[] = {
{"register", wee_python_register, METH_VARARGS, ""},
{"prnt", wee_python_print, METH_VARARGS, ""},
{"print_with_channel", wee_python_print_with_channel, METH_VARARGS, ""},
{"print_infobar", wee_python_print_infobar, METH_VARARGS, ""},
{"command", wee_python_command, METH_VARARGS, ""},
{"add_message_handler", wee_python_add_message_handler, METH_VARARGS, ""},
{"add_command_handler", wee_python_add_command_handler, METH_VARARGS, ""},
{"get_info", wee_python_get_info, METH_VARARGS, ""},
{NULL, NULL, 0, NULL}
};
/*
* wee_python_init: initialize Python interface for WeeChat
*/
void
wee_python_init ()
{
Py_Initialize ();
if (Py_IsInitialized () == 0)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python error: error while launching Python interpreter\n"));
}
else
{
Py_InitModule ("weechat", weechat_funcs);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Loading Python module \"weechat\"\n"));
}
}
/*
* wee_python_search: search a (loaded) Python script by name
*/
t_plugin_script *
wee_python_search (char *name)
{
t_plugin_script *ptr_python_script;
for (ptr_python_script = python_scripts; ptr_python_script;
ptr_python_script = ptr_python_script->next_script)
{
if (strcmp (ptr_python_script->name, name) == 0)
return ptr_python_script;
}
/* script not found */
return NULL;
}
/*
* wee_python_exec: execute a Python script
*/
int
wee_python_exec (char *function, char *server, char *arguments)
{
int len, return_code, i, j, alen;
char *srv, *args, *runstring;
return_code = 1;
if (arguments == NULL)
{
alen = 0;
args = strdup ("");
}
else
{
alen = (int) strlen (arguments);
args = (char *) malloc ( 2 * alen * sizeof (*args));
}
if (!args)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
return 0;
}
// copy arguments in args to escape double quotes
j = 0;
for (i=0; i < alen; ++i)
{
if (arguments[i] == '"' || arguments[i] == '\\')
{
args[j] = '\\';
++j;
}
args[j] = arguments[i];
++j;
}
args[j] = 0;
if (server == NULL)
srv = strdup ("");
else
srv = strdup (server);
if (!srv)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
free (args);
return 0;
}
len = (int) strlen (function);
len += (int) strlen ("(\"\",\"\")");
len += (int) strlen (srv);
len += (int) strlen (args);
len += 1;
runstring = (char *) malloc ( len * sizeof (*runstring));
if (runstring)
{
sprintf (runstring, "%s(\"%s\",\"%s\")", function, srv, args);
if (PyRun_SimpleString (runstring) != 0)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while running function \"%s\"\n"), function);
return_code = 0;
}
free (runstring);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
return_code = 0;
}
free (args);
free (srv);
return return_code;
}
/*
* wee_python_load: load a Python script
*/
int
wee_python_load (char *filename)
{
FILE *fp;
/* execute Python script */
wee_log_printf (_("loading Python script \"%s\"\n"), filename);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Loading Python script \"%s\"\n"), filename);
if ((fp = fopen (filename, "r")) == NULL)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while opening file \"%s\"\n"), filename);
return 1;
}
if (PyRun_SimpleFile (fp, filename) != 0)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while parsing file \"%s\"\n"), filename);
return 1;
}
fclose (fp);
return 0;
}
/*
* wee_python_script_free: free a Python script
*/
void
wee_python_script_free (t_plugin_script *ptr_python_script)
{
t_plugin_script *new_python_scripts;
/* remove script from list */
if (last_python_script == ptr_python_script)
last_python_script = ptr_python_script->prev_script;
if (ptr_python_script->prev_script)
{
(ptr_python_script->prev_script)->next_script = ptr_python_script->next_script;
new_python_scripts = python_scripts;
}
else
new_python_scripts = ptr_python_script->next_script;
if (ptr_python_script->next_script)
(ptr_python_script->next_script)->prev_script = ptr_python_script->prev_script;
/* free data */
if (ptr_python_script->name)
free (ptr_python_script->name);
if (ptr_python_script->version)
free (ptr_python_script->version);
if (ptr_python_script->shutdown_func)
free (ptr_python_script->shutdown_func);
if (ptr_python_script->description)
free (ptr_python_script->description);
free (ptr_python_script);
python_scripts = new_python_scripts;
}
/*
* wee_python_unload: unload a Python script
*/
void
wee_python_unload (t_plugin_script *ptr_python_script)
{
if (ptr_python_script)
{
wee_log_printf (_("unloading Python script \"%s\"\n"),
ptr_python_script->name);
/* call shutdown callback function */
if (ptr_python_script->shutdown_func[0])
wee_python_exec (ptr_python_script->shutdown_func, "", "");
wee_python_script_free (ptr_python_script);
}
}
/*
* wee_python_unload_all: unload all Python scripts
*/
void
wee_python_unload_all ()
{
wee_log_printf (_("unloading all Python scripts...\n"));
while (python_scripts)
wee_python_unload (python_scripts);
}
/*
* wee_python_end: shutdown Python interface
*/
void
wee_python_end ()
{
/* unload all scripts */
wee_python_unload_all ();
/* free all handlers */
plugin_handler_free_all_type (&plugin_msg_handlers,
&last_plugin_msg_handler,
PLUGIN_TYPE_PYTHON);
plugin_handler_free_all_type (&plugin_cmd_handlers,
&last_plugin_cmd_handler,
PLUGIN_TYPE_PYTHON);
Py_Finalize ();
if (Py_IsInitialized () != 0) {
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python error: error while freeing Python interpreter\n"));
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WEECHAT_PYTHON_H
#define __WEECHAT_PYTHON_H 1
#include "../plugins.h"
extern void wee_python_init ();
extern t_plugin_script *wee_python_search (char *);
extern int wee_python_exec (char *, char *, char *);
extern int wee_python_load (char *);
extern void wee_python_unload (t_plugin_script *);
extern void wee_python_unload_all ();
extern void wee_python_end ();
#endif /* wee-python.h */

View File

@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2005-04-30
ChangeLog - 2005-05-01
Version 0.1.2 (under dev!):
* added Python plugin support
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
* added transfer rate for DCC files
* added "-all" option for /nick command

View File

@ -34,8 +34,8 @@ v0.1.2:
- add key bindings to config file
* Plugins:
+ Python plugin
+ "/python load" and "/python unload" commands to (un)load Python scripts
# Python plugin
# "/python load" and "/python unload" commands to (un)load Python scripts
Future versions:

View File

@ -68,6 +68,7 @@ AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa mem
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
AH_VERBATIM([DEBUG], [#undef DEBUG])
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],,enable_ncurses=yes)
@ -75,11 +76,10 @@ AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=yes,enable_python=no)
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
enable_plugins="no"
enable_python="no"
PYTHON_CFLAGS=
enable_ruby="no"
RUBY_CFLAGS=
@ -88,7 +88,7 @@ AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
if test "x$enable_ncurses" = "xyes" ; then
@ -141,6 +141,15 @@ if test "x$enable_perl" = "xyes" ; then
AC_DEFINE(PLUGIN_PERL)
fi
if test "x$enable_python" = "xyes" ; then
enable_plugins="yes"
PYTHON_CFLAGS=`python -c "import distutils.sysconfig,string; print ' -I' + distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
PYTHON_LFLAGS=`python -c "import distutils.sysconfig,string; print string.join(distutils.sysconfig.get_config_vars('LINKFORSHARED', 'BLDLIBRARY', 'SHLIBS'))"`
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/python/lib_weechat_python.a $PYTHON_LFLAGS"
AC_SUBST(PYTHON_CFLAGS)
AC_DEFINE(PLUGIN_PYTHON)
fi
if test "x$enable_plugins" = "xyes" ; then
AC_DEFINE(PLUGINS)
fi
@ -171,6 +180,7 @@ AC_OUTPUT([Makefile
src/irc/Makefile
src/plugins/Makefile
src/plugins/perl/Makefile
src/plugins/python/Makefile
src/gui/Makefile
src/gui/curses/Makefile
src/gui/wxwidgets/Makefile

View File

@ -9,6 +9,8 @@
./src/irc/irc.h
./src/plugins/perl/wee-perl.c
./src/plugins/perl/wee-perl.h
./src/plugins/python/wee-python.c
./src/plugins/python/wee-python.h
./src/plugins/plugins.c
./src/plugins/plugins.h
./src/gui/curses/gui-input.c

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.2-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"PO-Revision-Date: 2005-04-30 19:49+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: 2005-05-01 20:48+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -1251,7 +1251,7 @@ msgstr "no es posible cambiar el modo para el resto de usuarios"
msgid "whois (secure connection)"
msgstr ""
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr "Servidor: "
@ -1300,7 +1300,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s número de argumentos incorrecto para el comando \"%s\"\n"
@ -1960,12 +1961,138 @@ msgstr "descarga del Perl script \"%s\"\n"
msgid "unloading all Perl scripts...\n"
msgstr "descargando todos los Perl scripts...\n"
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'print_with_channel'\n"
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
"Error de Python: no ha sido posible registrar el Python script \"%s\" (ya "
"existe otro script con ese nombre)\n"
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr "Python script registrado: \"%s\", versión %s (%s)\n"
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
"%s no ha sido posible cargar el Python script \"%s\" (memoria insuficiente)\n"
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'print'\n"
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'print_infobar'\n"
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'command'\n"
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr ""
"Error de Python: servidor no encontrado para la función Python 'command'\n"
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'add_message_handler'\n"
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python "
"'add_command_handler'\n"
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr ""
"Error de Python: parámetros incorrectos para la función Python 'get_info'\n"
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr ""
"Error de Python: servidor no encontrado para la función Python 'get_info'\n"
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr ""
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr "carga del Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr "Cargando Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr "descarga del Python script \"%s\"\n"
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr "descargando todos los Python scripts...\n"
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr ""
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr "carga automática del script %s : %s%s%s\n"
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2164,7 +2291,7 @@ msgstr "comando: nombre de un comando de Weechat
msgid "list/load/unload Perl scripts"
msgstr "lista/carga/descarga de los Perl scripts"
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr "[load fichero] | [autoload] | [unload]"
@ -2177,10 +2304,22 @@ msgstr ""
"Sin argumentos, el comando /perl lista todos los Perl scripts cargados."
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr "lista/carga/descarga de los Python scripts"
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
"fichero: Python script (archivo) a cargar\n"
"Sin argumentos, el comando /python lista todos los Python scripts cargados."
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr "lista, añade o elimina servidores"
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
@ -2191,7 +2330,7 @@ msgstr ""
"nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin "
"canal[,canal]] ] | [del nombre_de_servidor]"
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2213,27 +2352,27 @@ msgstr ""
"nombre_de_usuario: nombre de usuario\n"
"nombre_real: nombre real del usuario"
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr "guardar configuración a disco"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr "[archivo]"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr "archivo: fichero en el que guardar la configuración"
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr "modificar parámetros de configuración"
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr "[opción[=valor]]"
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
@ -2241,27 +2380,27 @@ msgstr ""
"opción: nombre de una opción\n"
"valor: valor para la opción"
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr "eliminar un alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr "alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr "alias: nombre del alias a suprimir"
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr "gestión de ventanas"
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr "[list | splith | splitv | [merge [down | up | left | right | all]]]"
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2274,29 +2413,29 @@ msgstr ""
"splitv: dividir la ventana actual verticalmente\n"
"merge: fusionar una ventana con otra"
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr "%s ¡el alias o el comando \"%s\" ya existe!\n"
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr "%s ¡el alias no puede ejecutar otro alias!\n"
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr "%s ¡el comando objetivo \"%s\" no existe!\n"
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s número de argumentos incorrecto para el comando %s \"%s\" (esperado: %d "
"parámetro%s)\n"
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
@ -2305,19 +2444,19 @@ msgstr ""
"%s número de argumentos incorrecto para el comando %s \"%s\" (esperado: "
"entre %d y %d parámetro%s)\n"
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr "%s el comando \"%s\" ha fallado\n"
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s número de argumentos incorrecto para el comando IRC \"%s\" (esperado: %d "
"parámetro%s)\n"
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
@ -2326,178 +2465,180 @@ msgstr ""
"%s número de argumentos incorrecto para el comando IRC \"%s\" (esperado: "
"entre %d y %d parámetro%s)\n"
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr "%s ¡el comando \"%s\" requiere una conexión a servidor!\n"
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr "%s comando \"%s\" desconocido (escriba /help para la ayuda)\n"
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr "%s no ha sido posible encontrar el usuario al que enviar el mensaje\n"
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr "¡Esta ventana no es un canal!\n"
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s faltan argumentos para el comando \"%s\"\n"
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr "Alias \"%s\" => \"%s\" creado\n"
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr ""
"No ha sido posible crear el alias \"%s\" => \"%s\" (no hay suficiente "
"memoria)\n"
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr "Lista de alias:\n"
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr "Ningún alias definido.\n"
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr " (servidor: "
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr "Privado con: "
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr "Búfers abiertos:\n"
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s número de búfer incorrecto\n"
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr "%s no es posible cerrar el único búfer\n"
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
"%s no se puede cerrar el búfer de servidor mientras haya canales abiertos\n"
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr "Niveles de notificación: "
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr "%s nivel de notificación incorrecto (debe estar entre 0 y 3)\n"
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s búfer \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "parámetro desconocido \"%s\" para el comando \"%s\"\n"
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s ya conectado al servidor \"%s\"!\n"
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr "%s actualmente conectando al servidor \"%s\"!\n"
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr "%s servidor no encontrado\n"
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s opción desconocida para el comando \"%s\"\n"
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s ¡no conectado al servidor \"%s\"!\n"
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr "La reconexión automática está anulada\n"
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr "Comandos internos %s :\n"
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr "Comandos IRC :\n"
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "No hay ayuda disponible, el comando \"%s\" es desconocido\n"
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr "Perl scripts registrados:\n"
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr " (ninguno)\n"
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr "Funciones Perl para mensajes:\n"
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr "Comandos Perl :\n"
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Comando /%s => Perl(%s)\n"
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr "Perl scripts descargados\n"
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@ -2506,32 +2647,68 @@ msgstr ""
"Por favor, recompile WeeChat con la opción \"--enable-perl\" para el "
"script ./configure\n"
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr "Python scripts registrados:\n"
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr "Funciones Python para mensajes:\n"
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr " IRC(%s) => Python(%s)\n"
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr "Comandos Python :\n"
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr " Comando /%s => Python(%s)\n"
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr "Python scripts descargados\n"
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
"WeeChat ha sido compilado sin soporte para Python.\n"
"Por favor, recompile WeeChat con la opción \"--enable-python\" para el "
"script ./configure\n"
#: src/common/command.c:1606
msgid "No server.\n"
msgstr "Ningún servidor.\n"
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Servidor '%s' no encontrado.\n"
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s falta el nombre de servidor para el comando \"%s\"\n"
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
"%s demasiados argumentos para el comando \"%s\", ignorando parámetros\n"
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s servidor \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@ -2540,108 +2717,108 @@ msgstr ""
"%s usted no puede eliminar el servidor \"%s\" ya que está usted conectado a "
"él. Pruebe /disconnect %s antes.\n"
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr "Servidor"
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr "ha sido eliminado\n"
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s faltan parámetros para el comando \"%s\"\n"
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s el servidor \"%s\" ya existe, ¡no se puede crear!\n"
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s falta contraseña para el comando \"%s\"\n"
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s falta(n) usuario(s) para el parámetro \"%s\"\n"
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s falta comando para el parámetro \"%s\"\n"
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr "creado\n"
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr "%s no es posible crear el servidor\n"
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr "(desconocido)"
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr "(contraseña oculta) "
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s servidor \"%s\" no encontrado\n"
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s opción de configuración \"%s\" no encontrada\n"
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
"%s la opción \"%s\" no puede ser modificada mientras WeeChat esté en "
"ejecución\n"
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Ninguna opción de configuración encontrada con \"%s\"\n"
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr "Ninguna opción de configuración encontrada\n"
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "opción/opciones de configuración encontrada(s) con \"%s\"\n"
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr "opción/opciones de configuración encontrada(s)\n"
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias o comando \"%s\" no encontrado\n"
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" eliminado\n"
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr "Ventanas abiertas:\n"
@ -3735,6 +3912,3 @@ msgstr ""
#: src/common/weeconfig.c:1564
msgid "saving config to disk\n"
msgstr "guardar configuración a disco\n"
#~ msgid "nickname: new nickname for current IRC server"
#~ msgstr "usuario: nuevo nombre de usuario para el servidor IRC actual"

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.2-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"PO-Revision-Date: 2005-04-30 19:49+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: 2005-05-01 20:47+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -1252,7 +1252,7 @@ msgstr "impossible de changer le mode pour les autres utilisateurs"
msgid "whois (secure connection)"
msgstr "qui est (connexion sécurisée)"
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr "Serveur: "
@ -1302,7 +1302,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@ -1959,12 +1960,134 @@ msgstr "d
msgid "unloading all Perl scripts...\n"
msgstr "déchargement de tous les scripts Perl...\n"
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'print_with_channel'\n"
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
"Erreur Python: impossible d'enregistrer le script Python \"%s\" (un autre "
"script existe déjà avec ce nom)\n"
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr "script Python enregistré: \"%s\", version %s (%s)\n"
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
"%s impossible de charger le script Python \"%s\" (mémoire insuffisante)\n"
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'print'\n"
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python 'print_infobar'\n"
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'command'\n"
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr "Erreur Python: serveur non trouvé pour la fonction Python 'command'\n"
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'add_message_handler'\n"
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
"Erreur Python: mauvais paramètres pour la fonction Python "
"'add_command_handler'\n"
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr "Erreur Python: mauvais paramètres pour la fonction Python 'get_info'\n"
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr "Erreur Python: serveur non trouvé pour la fonction Python 'get_info'\n"
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr "Erreur Python: erreur pendant le chargement de l'interpréteur Python\n"
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr "Chargement du module Python \"weechat\"\n"
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
"Erreur Python: impossible de charger le script Python \"%s\" (mémoire "
"insuffisante)\n"
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr "Erreur Python: erreur dans la fonction \"%s\"\n"
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr "chargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr "Chargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr "Erreur Python: erreur à l'ouverture du fichier \"%s\"\n"
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr "Erreur Python: erreur en analysant le fichier \"%s\"\n"
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr "déchargement du script Python \"%s\"\n"
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr "déchargement de tous les scripts Python...\n"
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr "Erreur Python: impossible de libérer l'interpréteur Python\n"
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr "chargement automatique du script %s : %s%s%s\n"
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2162,7 +2285,7 @@ msgstr "commande: nom d'une commande WeeChat ou IRC"
msgid "list/load/unload Perl scripts"
msgstr "liste/charge/décharge des scripts Perl"
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr "[load fichier] | [autoload] | [unload]"
@ -2175,10 +2298,22 @@ msgstr ""
"Sans paramètre, la commande /perl liste tous les scripts Perl chargés."
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr "liste/charge/décharge des scripts Python"
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
"fichier: script Python (fichier) à charger\n"
"Sans paramètre, la commande /python liste tous les scripts Python chargés."
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr "liste, ajoute ou retire des serveurs"
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
@ -2189,7 +2324,7 @@ msgstr ""
"nom_utilisateur] [-realname nom_réel] [-command commande] [-autojoin canal[,"
"canal]] ] | [del nom_serveur]"
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2211,27 +2346,27 @@ msgstr ""
"nom_utilisateur: nom d'utilisateur\n"
"nom_réel: nom réel de l'utilisateur"
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr "sauvegarder la configuration sur disque"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr "[fichier]"
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr "fichier: fichier pour sauvegarder la configuration"
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr "modifier des paramètres de configuration"
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr "[option[=valeur]]"
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
@ -2239,27 +2374,27 @@ msgstr ""
"option: nom d'une option\n"
"valeur: valeur pour l'option"
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr "supprimer un alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr "nom_alias"
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr "nom_alias: nom de l'alias à supprimer"
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr "gestion des fenêtres"
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr "[list | splith | splitv | [merge [down | up | left | right | all]]]"
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2271,29 +2406,29 @@ msgstr ""
"splitv: éclate la fenêtre en deux verticalement\n"
"merge: fusionne la fenêtre avec une autre"
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr "%s l'alias ou la commande \"%s\" existe déjà !\n"
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr "%s l'alias ne peux pas lancer un autre alias !\n"
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr "%s la commande cible \"%s\" n'existe pas !\n"
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s nombre de paramètres incorrect pour la commande %s \"%s\" (attendu: %d "
"paramètre%s)\n"
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
@ -2302,19 +2437,19 @@ msgstr ""
"%s nombre de paramètres incorrect pour la commande %s \"%s\" (attendu: entre "
"%d et %d paramètre%s)\n"
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr "%s la commande \"%s\" a échoué\n"
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
"%s nombre de paramètres incorrect pour la commande IRC \"%s\" (attendu: %d "
"paramètre%s)\n"
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
@ -2323,177 +2458,179 @@ msgstr ""
"%s nombre de paramètres incorrect pour la commande IRC \"%s\" (attendu: "
"entre %d et %d paramètre%s)\n"
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr "%s la commande \"%s\" nécessite une connexion au serveur !\n"
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr "%s commande \"%s\" inconnue (tapez /help pour l'aide)\n"
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr "%s impossible de trouver le pseudo pour envoyer le message\n"
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr "Cette fenêtre n'est pas un canal !\n"
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr "Alias \"%s\" => \"%s\" créé\n"
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr "Impossible de créer l'alias \"%s\" => \"%s\" (pas assez de mémoire)\n"
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr "Liste des alias:\n"
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr "Aucun alias défini.\n"
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr "Canal: "
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr " (serveur: "
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr "Privé avec: "
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr "Tampons ouverts:\n"
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr "%s numéro de buffer incorrect\n"
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr "%s impossible de fermer le tampon unique\n"
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
"%s impossible de fermer le tampon du serveur tant que des canaux sont "
"ouverts\n"
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr "Niveaux de notification: "
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr "%s niveau de notification incorrect (doit être entre 0 et 3)\n"
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n"
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n"
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr "%s déjà connecté au serveur \"%s\" !\n"
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr "%s une connexion vers le serveur \"%s\" est en cours !\n"
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr "%s serveur non trouvé\n"
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr "%s non connecté au serveur \"%s\" !\n"
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr "La reconnexion automatique est annulée\n"
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr "Commandes internes %s :\n"
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr "Commandes IRC :\n"
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr "Scripts Perl enregistrés :\n"
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr " (aucun)\n"
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr "Fonctions Perl pour messages :\n"
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr " IRC(%s) => Perl(%s)\n"
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr "Commandes Perl :\n"
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr " Commande /%s => Perl(%s)\n"
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr "Scripts Perl déchargés\n"
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
@ -2502,31 +2639,67 @@ msgstr ""
"Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le "
"script ./configure\n"
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr "Scripts Python enregistrés :\n"
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr "Fonctions Python pour messages :\n"
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr " IRC(%s) => Python(%s)\n"
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr "Commandes Python :\n"
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr " Commande /%s => Python(%s)\n"
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr "Scripts Python déchargés\n"
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
"WeeChat a été construit sans le support Python.\n"
"Merci de reconstruire WeeChat avec l'option \"--enable-python\" pour le "
"script ./configure\n"
#: src/common/command.c:1606
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Serveur '%s' non trouvé.\n"
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@ -2535,106 +2708,106 @@ msgstr ""
"%s vous ne pouvez pas supprimer le server \"%s\" car vous êtes connecté "
"dessus. Essayez /disconnect %s avant.\n"
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr "(mot de passe caché) "
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr "Aucune option de configuration trouvée\n"
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr "option(s) de configuration trouvée(s)\n"
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr "Fenêtres ouvertes:\n"
@ -3726,6 +3899,3 @@ msgstr ""
#: src/common/weeconfig.c:1564
msgid "saving config to disk\n"
msgstr "sauvegarde de la configuration sur disque\n"
#~ msgid "nickname: new nickname for current IRC server"
#~ msgstr "pseudo: nouveau pseudo pour le serveur IRC courant"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-04-30 19:48+0200\n"
"POT-Creation-Date: 2005-05-01 20:47+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1146,7 +1146,7 @@ msgstr ""
msgid "whois (secure connection)"
msgstr ""
#: src/irc/irc-display.c:154 src/common/command.c:812
#: src/irc/irc-display.c:154 src/common/command.c:817
msgid "Server: "
msgstr ""
@ -1194,7 +1194,8 @@ msgstr ""
#: src/irc/irc-send.c:345 src/irc/irc-send.c:357 src/irc/irc-send.c:375
#: src/irc/irc-send.c:996 src/irc/irc-send.c:1089 src/irc/irc-send.c:1609
#: src/common/command.c:1124 src/common/command.c:1407
#: src/common/command.c:1129 src/common/command.c:1411
#: src/common/command.c:1552
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@ -1833,12 +1834,122 @@ msgstr ""
msgid "unloading all Perl scripts...\n"
msgstr ""
#: src/plugins/plugins.c:89
#: src/plugins/python/wee-python.c:61 src/plugins/python/wee-python.c:170
msgid ""
"Python error: wrong parameters for 'print_with_channel' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:81
#, c-format
msgid ""
"Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"
msgstr ""
#: src/plugins/python/wee-python.c:105
#, c-format
msgid "registered Python script: \"%s\", version %s (%s)\n"
msgstr ""
#: src/plugins/python/wee-python.c:112
#, c-format
msgid "%s unable to load Python script \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:137
msgid "Python error: wrong parameters for 'print' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:222
msgid "Python error: wrong parameters for 'print_infobar' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:249
msgid "Python error: wrong parameters for 'command' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:268
msgid "Python error: server not found for 'command' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:303
msgid ""
"Python error: wrong parameters for 'add_message_handler' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:332
msgid ""
"Python error: wrong parameters for 'add_command_handler' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:371
msgid "Python error: wrong parameters for 'get_info' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:390
msgid "Python error: server not found for 'get_info' Python function\n"
msgstr ""
#: src/plugins/python/wee-python.c:462
msgid "Python error: error while launching Python interpreter\n"
msgstr ""
#: src/plugins/python/wee-python.c:468
msgid "Loading Python module \"weechat\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:519 src/plugins/python/wee-python.c:547
#: src/plugins/python/wee-python.c:578
#, c-format
msgid ""
"Python error: unable to run function \"%s\"in Python script (not enough "
"memory)\n"
msgstr ""
#: src/plugins/python/wee-python.c:569
#, c-format
msgid "Python error: error while running function \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:599
#, c-format
msgid "loading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:601
#, c-format
msgid "Loading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:607
#, c-format
msgid "Python error: error while opening file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:615
#, c-format
msgid "Python error: error while parsing file \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:668
#, c-format
msgid "unloading Python script \"%s\"\n"
msgstr ""
#: src/plugins/python/wee-python.c:685
msgid "unloading all Python scripts...\n"
msgstr ""
#: src/plugins/python/wee-python.c:711
msgid "Python error: error while freeing Python interpreter\n"
msgstr ""
#: src/plugins/plugins.c:93
#, c-format
msgid "auto-loading %s script: %s%s%s\n"
msgstr ""
#: src/plugins/plugins.c:200
#: src/plugins/plugins.c:211
#, c-format
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
msgstr ""
@ -2020,7 +2131,7 @@ msgstr ""
msgid "list/load/unload Perl scripts"
msgstr ""
#: src/common/command.c:76
#: src/common/command.c:76 src/common/command.c:81
msgid "[load filename] | [autoload] | [unload]"
msgstr ""
@ -2031,17 +2142,27 @@ msgid ""
msgstr ""
#: src/common/command.c:80
msgid "list/load/unload Python scripts"
msgstr ""
#: src/common/command.c:82
msgid ""
"filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."
msgstr ""
#: src/common/command.c:85
msgid "list, add or remove servers"
msgstr ""
#: src/common/command.c:81
#: src/common/command.c:86
msgid ""
"[servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-"
"nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-"
"command command] [-autojoin channel[,channel]] ] | [del servername]"
msgstr ""
#: src/common/command.c:86
#: src/common/command.c:91
msgid ""
"servername: server name, for internal & display use\n"
"hostname: name or IP address of server\n"
@ -2054,53 +2175,53 @@ msgid ""
"realname: real name of user"
msgstr ""
#: src/common/command.c:96
#: src/common/command.c:101
msgid "save config to disk"
msgstr ""
#: src/common/command.c:97
#: src/common/command.c:102
msgid "[file]"
msgstr ""
#: src/common/command.c:97
#: src/common/command.c:102
msgid "file: filename for writing config"
msgstr ""
#: src/common/command.c:99
#: src/common/command.c:104
msgid "set config parameters"
msgstr ""
#: src/common/command.c:100
#: src/common/command.c:105
msgid "[option[=value]]"
msgstr ""
#: src/common/command.c:100
#: src/common/command.c:105
msgid ""
"option: name of an option\n"
"value: value for option"
msgstr ""
#: src/common/command.c:102
#: src/common/command.c:107
msgid "remove an alias"
msgstr ""
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name"
msgstr ""
#: src/common/command.c:103
#: src/common/command.c:108
msgid "alias_name: name of alias to remove"
msgstr ""
#: src/common/command.c:105
#: src/common/command.c:110
msgid "manage windows"
msgstr ""
#: src/common/command.c:106
#: src/common/command.c:111
msgid "[list | splith | splitv | [merge [down | up | left | right | all]]]"
msgstr ""
#: src/common/command.c:108
#: src/common/command.c:113
msgid ""
"list: list opened windows (no parameter implies this list)\n"
"splith: split current window horizontally\n"
@ -2108,355 +2229,390 @@ msgid ""
"merge: merge window with another"
msgstr ""
#: src/common/command.c:254
#: src/common/command.c:259
#, c-format
msgid "%s alias or command \"%s\" already exists!\n"
msgstr ""
#: src/common/command.c:264
#: src/common/command.c:269
#, c-format
msgid "%s alias cannot run another alias!\n"
msgstr ""
#: src/common/command.c:271
#: src/common/command.c:276
#, c-format
msgid "%s target command \"%s\" does not exist!\n"
msgstr ""
#: src/common/command.c:479
#: src/common/command.c:484
#, c-format
msgid "%s wrong argument count for %s command \"%s\" (expected: %d arg%s)\n"
msgstr ""
#: src/common/command.c:491
#: src/common/command.c:496
#, c-format
msgid ""
"%s wrong argument count for %s command \"%s\" (expected: between %d and %d "
"arg%s)\n"
msgstr ""
#: src/common/command.c:513 src/common/command.c:583
#: src/common/command.c:518 src/common/command.c:588
#, c-format
msgid "%s command \"%s\" failed\n"
msgstr ""
#: src/common/command.c:541
#: src/common/command.c:546
#, c-format
msgid "%s wrong argument count for IRC command \"%s\" (expected: %d arg%s)\n"
msgstr ""
#: src/common/command.c:553
#: src/common/command.c:558
#, c-format
msgid ""
"%s wrong argument count for IRC command \"%s\" (expected: between %d and %d "
"arg%s)\n"
msgstr ""
#: src/common/command.c:568
#: src/common/command.c:573
#, c-format
msgid "%s command \"%s\" needs a server connection!\n"
msgstr ""
#: src/common/command.c:632
#: src/common/command.c:637
#, c-format
msgid "%s unknown command \"%s\" (type /help for help)\n"
msgstr ""
#: src/common/command.c:711
#: src/common/command.c:716
#, c-format
msgid "%s cannot find nick for sending message\n"
msgstr ""
#: src/common/command.c:720
#: src/common/command.c:725
msgid "This window is not a channel!\n"
msgstr ""
#: src/common/command.c:748 src/common/command.c:772 src/common/command.c:876
#: src/common/command.c:753 src/common/command.c:777 src/common/command.c:881
#, c-format
msgid "%s missing arguments for \"%s\" command\n"
msgstr ""
#: src/common/command.c:757
#: src/common/command.c:762
#, c-format
msgid "Alias \"%s\" => \"%s\" created\n"
msgstr ""
#: src/common/command.c:763
#: src/common/command.c:768
#, c-format
msgid "Failed to create alias \"%s\" => \"%s\" (not enough memory)\n"
msgstr ""
#: src/common/command.c:783
#: src/common/command.c:788
msgid "List of aliases:\n"
msgstr ""
#: src/common/command.c:795
#: src/common/command.c:800
msgid "No alias defined.\n"
msgstr ""
#: src/common/command.c:818
#: src/common/command.c:823
msgid "Channel: "
msgstr ""
#: src/common/command.c:821 src/common/command.c:831
#: src/common/command.c:826 src/common/command.c:836
msgid " (server: "
msgstr ""
#: src/common/command.c:828
#: src/common/command.c:833
msgid "Private with: "
msgstr ""
#: src/common/command.c:856
#: src/common/command.c:861
msgid "Opened buffers:\n"
msgstr ""
#: src/common/command.c:899 src/common/command.c:1026
#: src/common/command.c:904 src/common/command.c:1031
#, c-format
msgid "%s incorrect buffer number\n"
msgstr ""
#: src/common/command.c:913
#: src/common/command.c:918
#, c-format
msgid "%s can not close the single buffer\n"
msgstr ""
#: src/common/command.c:923
#: src/common/command.c:928
#, c-format
msgid "%s can not close server buffer while channels are opened\n"
msgstr ""
#: src/common/command.c:962
#: src/common/command.c:967
msgid "Notify levels: "
msgstr ""
#: src/common/command.c:989 src/common/command.c:999
#: src/common/command.c:994 src/common/command.c:1004
#, c-format
msgid "%s incorrect notify level (must be between 0 and 3)\n"
msgstr ""
#: src/common/command.c:1017
#: src/common/command.c:1022
#, c-format
msgid "%s buffer \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1051
#: src/common/command.c:1056
#, c-format
msgid "unknown parameter \"%s\" for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1081
#: src/common/command.c:1086
#, c-format
msgid "%s already connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1089
#: src/common/command.c:1094
#, c-format
msgid "%s currently connecting to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1107 src/common/command.c:1182
#: src/common/command.c:1112 src/common/command.c:1187
#, c-format
msgid "%s server not found\n"
msgstr ""
#: src/common/command.c:1137 src/common/command.c:1400
#: src/common/command.c:2097 src/common/command.c:2109
#: src/common/command.c:1142 src/common/command.c:1404
#: src/common/command.c:1545 src/common/command.c:2236
#: src/common/command.c:2248
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1166
#: src/common/command.c:1171
#, c-format
msgid "%s not connected to server \"%s\"!\n"
msgstr ""
#: src/common/command.c:1174
#: src/common/command.c:1179
msgid "Auto-reconnection is cancelled\n"
msgstr ""
#: src/common/command.c:1200 src/common/weechat.c:265
#: src/common/command.c:1205 src/common/weechat.c:265
#, c-format
msgid "%s internal commands:\n"
msgstr ""
#: src/common/command.c:1209 src/common/weechat.c:285
#: src/common/command.c:1214 src/common/weechat.c:285
#, c-format
msgid "IRC commands:\n"
msgstr ""
#: src/common/command.c:1276
#: src/common/command.c:1281
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1301
#: src/common/command.c:1305
msgid "Registered Perl scripts:\n"
msgstr ""
#: src/common/command.c:1318 src/common/command.c:1340
#: src/common/command.c:1362
#: src/common/command.c:1322 src/common/command.c:1344
#: src/common/command.c:1366 src/common/command.c:1463
#: src/common/command.c:1485 src/common/command.c:1507
msgid " (none)\n"
msgstr ""
#: src/common/command.c:1323
#: src/common/command.c:1327
msgid "Perl message handlers:\n"
msgstr ""
#: src/common/command.c:1332
#: src/common/command.c:1336
#, c-format
msgid " IRC(%s) => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1345
#: src/common/command.c:1349
msgid "Perl command handlers:\n"
msgstr ""
#: src/common/command.c:1354
#: src/common/command.c:1358
#, c-format
msgid " Command /%s => Perl(%s)\n"
msgstr ""
#: src/common/command.c:1374
#: src/common/command.c:1378
msgid "Perl scripts unloaded\n"
msgstr ""
#: src/common/command.c:1413
#: src/common/command.c:1417
msgid ""
"WeeChat was build without Perl support.\n"
"Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n"
msgstr ""
#: src/common/command.c:1467
#: src/common/command.c:1446
msgid "Registered Python scripts:\n"
msgstr ""
#: src/common/command.c:1468
msgid "Python message handlers:\n"
msgstr ""
#: src/common/command.c:1477
#, c-format
msgid " IRC(%s) => Python(%s)\n"
msgstr ""
#: src/common/command.c:1490
msgid "Python command handlers:\n"
msgstr ""
#: src/common/command.c:1499
#, c-format
msgid " Command /%s => Python(%s)\n"
msgstr ""
#: src/common/command.c:1519
msgid "Python scripts unloaded\n"
msgstr ""
#: src/common/command.c:1558
msgid ""
"WeeChat was build without Python support.\n"
"Please rebuild WeeChat with \"--enable-python\" option for ./configure "
"script\n"
msgstr ""
#: src/common/command.c:1606
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1478
#: src/common/command.c:1617
#, c-format
msgid "Server '%s' not found.\n"
msgstr ""
#: src/common/command.c:1490
#: src/common/command.c:1629
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1498
#: src/common/command.c:1637
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1517
#: src/common/command.c:1656
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1525
#: src/common/command.c:1664
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
"disconnect %s before.\n"
msgstr ""
#: src/common/command.c:1541 src/common/command.c:1682
#: src/common/command.c:1680 src/common/command.c:1821
msgid "Server"
msgstr ""
#: src/common/command.c:1544
#: src/common/command.c:1683
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1559
#: src/common/command.c:1698
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1569
#: src/common/command.c:1708
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1594 src/common/command.c:1622
#: src/common/command.c:1635 src/common/command.c:1661
#: src/common/command.c:1733 src/common/command.c:1761
#: src/common/command.c:1774 src/common/command.c:1800
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1607
#: src/common/command.c:1746
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1648
#: src/common/command.c:1787
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1685
#: src/common/command.c:1824
msgid "created\n"
msgstr ""
#: src/common/command.c:1691
#: src/common/command.c:1830
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:1746
#: src/common/command.c:1885
msgid "(unknown)"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1908
msgid "(password hidden) "
msgstr ""
#: src/common/command.c:1833
#: src/common/command.c:1972
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1864 src/common/command.c:1910
#: src/common/command.c:2003 src/common/command.c:2049
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:1869 src/common/command.c:1902
#: src/common/command.c:2008 src/common/command.c:2041
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:1885
#: src/common/command.c:2024
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:1983
#: src/common/command.c:2122
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1986
#: src/common/command.c:2125
msgid "No config option found\n"
msgstr ""
#: src/common/command.c:1992
#: src/common/command.c:2131
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:1995
#: src/common/command.c:2134
msgid "config option(s) found\n"
msgstr ""
#: src/common/command.c:2015
#: src/common/command.c:2154
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2025
#: src/common/command.c:2164
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
#: src/common/command.c:2045
#: src/common/command.c:2184
msgid "Opened windows:\n"
msgstr ""

View File

@ -77,6 +77,11 @@ t_weechat_command weechat_commands[] =
N_("filename: Perl script (file) to load\n"
"Without argument, /perl command lists all loaded Perl scripts."),
0, 2, weechat_cmd_perl, NULL },
{ "python", N_("list/load/unload Python scripts"),
N_("[load filename] | [autoload] | [unload]"),
N_("filename: Python script (file) to load\n"
"Without argument, /python command lists all loaded Python scripts."),
0, 2, weechat_cmd_python, NULL },
{ "server", N_("list, add or remove servers"),
N_("[servername] | "
"[servername hostname port [-auto | -noauto] [-pwd password] [-nicks nick1 "
@ -1286,13 +1291,12 @@ weechat_cmd_help (int argc, char **argv)
int
weechat_cmd_perl (int argc, char **argv)
{
#ifdef PLUGINS
#ifdef PLUGIN_PERL
t_plugin_script *ptr_plugin_script;
t_plugin_handler *ptr_plugin_handler;
int handler_found, path_length;
char *path_script;
#ifdef PLUGIN_PERL
switch (argc)
{
case 0:
@ -1418,11 +1422,146 @@ weechat_cmd_perl (int argc, char **argv)
(void) argv;
#endif /* PLUGIN_PERL */
return 0;
}
/*
* weechat_cmd_python: list/load/unload Python scripts
*/
int
weechat_cmd_python (int argc, char **argv)
{
#ifdef PLUGIN_PYTHON
t_plugin_script *ptr_plugin_script;
t_plugin_handler *ptr_plugin_handler;
int handler_found, path_length;
char *path_script;
switch (argc)
{
case 0:
/* list registered Python scripts */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Registered Python scripts:\n"));
if (python_scripts)
{
for (ptr_plugin_script = python_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " %s v%s%s%s\n",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
}
}
else
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
/* list Python message handlers */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Python message handlers:\n"));
handler_found = 0;
for (ptr_plugin_handler = plugin_msg_handlers; ptr_plugin_handler;
ptr_plugin_handler = ptr_plugin_handler->next_handler)
{
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s) => Python(%s)\n"),
ptr_plugin_handler->name,
ptr_plugin_handler->function_name);
}
}
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
/* list Python command handlers */
gui_printf (NULL, "\n");
gui_printf (NULL, _("Python command handlers:\n"));
handler_found = 0;
for (ptr_plugin_handler = plugin_cmd_handlers; ptr_plugin_handler;
ptr_plugin_handler = ptr_plugin_handler->next_handler)
{
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" Command /%s => Python(%s)\n"),
ptr_plugin_handler->name,
ptr_plugin_handler->function_name);
}
}
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (none)\n"));
}
break;
case 1:
if (strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
if (strcasecmp (argv[0], "unload") == 0)
{
/* unload all Python scripts */
plugin_unload (PLUGIN_TYPE_PYTHON, NULL);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python scripts unloaded\n"));
}
break;
case 2:
if (strcasecmp (argv[0], "load") == 0)
{
/* load Python script */
if (strstr(argv[1], DIR_SEPARATOR))
path_script = NULL;
else
{
path_length = strlen (weechat_home) + strlen (argv[1]) + 7;
path_script = (char *) malloc (path_length * sizeof (char));
snprintf (path_script, path_length, "%s%s%s%s%s",
weechat_home, DIR_SEPARATOR, "python",
DIR_SEPARATOR, argv[1]);
}
plugin_load (PLUGIN_TYPE_PYTHON,
(path_script) ? path_script : argv[1]);
if (path_script)
free (path_script);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s unknown option for \"%s\" command\n"),
WEECHAT_ERROR, "python");
}
break;
default:
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "python");
}
#else
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("WeeChat was build without Python support.\n"
"Please rebuild WeeChat with "
"\"--enable-python\" option for ./configure script\n"));
/* make gcc happy */
(void) argc;
(void) argv;
#endif /* PLUGINS */
#endif /* PLUGIN_PYTHON */
return 0;
}

View File

@ -70,6 +70,7 @@ extern int weechat_cmd_debug (int, char **);
extern int weechat_cmd_disconnect (int, char **);
extern int weechat_cmd_help (int, char **);
extern int weechat_cmd_perl (int, char **);
extern int weechat_cmd_python (int, char **);
extern int weechat_cmd_save (int, char **);
extern int weechat_cmd_server (int, char **);
extern int weechat_cmd_set (char *);

View File

@ -207,6 +207,20 @@ completion_build_list (t_completion *completion, void *channel)
"unload");
return;
}
if ((strcasecmp (completion->base_command, "python") == 0)
&& (completion->base_command_arg == 1))
{
weelist_add (&completion->completion_list,
&completion->last_completion,
"load");
weelist_add (&completion->completion_list,
&completion->last_completion,
"autoload");
weelist_add (&completion->completion_list,
&completion->last_completion,
"unload");
return;
}
if ((strcasecmp (completion->base_command, "set") == 0)
&& (completion->base_command_arg == 1))
{

View File

@ -21,16 +21,16 @@ if PLUGIN_PERL
perl_dir = perl
endif
# if PLUGIN_PYTHON
# python_dir = python
# endif
if PLUGIN_PYTHON
python_dir = python
endif
# if PLUGIN_RUBY
# ruby_dir = ruby
# endif
# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir)
SUBDIRS = $(perl_dir)
SUBDIRS = $(perl_dir) $(python_dir)
noinst_LIBRARIES = lib_weechat_plugins.a

View File

@ -39,6 +39,10 @@
#include "perl/wee-perl.h"
#endif
#ifdef PLUGIN_PYTHON
#include "python/wee-python.h"
#endif
char *plugin_name[3] = { "Perl", "Python", "Ruby" };
@ -115,6 +119,11 @@ plugin_init ()
wee_perl_init();
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
#endif
#ifdef PLUGIN_PYTHON
wee_python_init();
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
#endif
}
/*
@ -133,7 +142,9 @@ plugin_load (int plugin_type, char *filename)
#endif
break;
case PLUGIN_TYPE_PYTHON:
/* TODO: load Python script */
#ifdef PLUGIN_PYTHON
wee_python_load (filename);
#endif
break;
case PLUGIN_TYPE_RUBY:
/* TODO: load Ruby script */
@ -292,6 +303,10 @@ plugin_event_msg (char *irc_command, char *arguments, char *server)
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
#ifdef PLUGIN_PYTHON
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
wee_python_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
}
}
#else
@ -321,6 +336,10 @@ plugin_exec_command (char *user_command, char *arguments, char *server)
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
#ifdef PLUGIN_PYTHON
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
wee_python_exec (ptr_plugin_handler->function_name, arguments, server);
#endif
/* command executed */
return 1;
@ -358,7 +377,10 @@ plugin_unload (int plugin_type, char *scriptname)
#endif
break;
case PLUGIN_TYPE_PYTHON:
/* TODO: unload Python scripts */
#ifdef PLUGIN_PYTHON
wee_python_end ();
wee_python_init ();
#endif
break;
case PLUGIN_TYPE_RUBY:
/* TODO: unload Ruby scripts */
@ -383,4 +405,8 @@ plugin_end ()
#ifdef PLUGIN_PERL
wee_perl_end();
#endif
#ifdef PLUGIN_PYTHON
wee_python_end();
#endif
}

View File

@ -0,0 +1,23 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
noinst_LIBRARIES = lib_weechat_python.a
lib_weechat_python_a_SOURCES = wee-python.h \
wee-python.c

View File

@ -0,0 +1,713 @@
/*
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* wee-python.c: Python plugin support for WeeChat */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <Python.h>
#include <stdlib.h>
#include <string.h>
#undef _
#include "../../common/weechat.h"
#include "../plugins.h"
#include "wee-python.h"
#include "../../common/command.h"
#include "../../irc/irc.h"
#include "../../gui/gui.h"
t_plugin_script *python_scripts = NULL;
t_plugin_script *last_python_script = NULL;
/*
* weechat.register(nom, version, fonction, description):
* startup function for all WeeChat Python scripts
*/
static PyObject *
wee_python_register (PyObject *self, PyObject *args)
{
char *name, *version, *shutdown_func, *description;
t_plugin_script *ptr_python_script, *python_script_found, *new_python_script;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ssss", &name, &version, &shutdown_func, &description))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_with_channel' Python function\n"));
return NULL;
}
python_script_found = NULL;
for (ptr_python_script = python_scripts; ptr_python_script;
ptr_python_script = ptr_python_script->next_script)
{
if (strcasecmp (ptr_python_script->name, name) == 0)
{
python_script_found = ptr_python_script;
break;
}
}
if (python_script_found)
{
/* error: another scripts already exists with this name! */
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to register Python script \"%s\" (another script "
"already exists with this name)\n"),
name);
}
else
{
/* registering script */
new_python_script = (t_plugin_script *)malloc (sizeof (t_plugin_script));
if (new_python_script)
{
new_python_script->name = strdup (name);
new_python_script->version = strdup (version);
new_python_script->shutdown_func = strdup (shutdown_func);
new_python_script->description = strdup (description);
/* add new script to list */
new_python_script->prev_script = last_python_script;
new_python_script->next_script = NULL;
if (python_scripts)
last_python_script->next_script = new_python_script;
else
python_scripts = new_python_script;
last_python_script = new_python_script;
wee_log_printf (_("registered Python script: \"%s\", version %s (%s)\n"),
name, version, description);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s unable to load Python script \"%s\" (not enough memory)\n"),
WEECHAT_ERROR, name);
}
}
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.print(message): print message to current buffer
*/
static PyObject *
wee_python_print (PyObject *self, PyObject *args)
{
char *message;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s", &message))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print' Python function\n"));
return NULL;
}
irc_display_prefix (gui_current_window->buffer, PREFIX_PLUGIN);
gui_printf (gui_current_window->buffer, "%s\n", message);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.print_with_channel(message, channel, server=None):
* print message to a specific channel/server
* (server is optional)
*/
static PyObject *
wee_python_print_with_channel (PyObject *self, PyObject *args)
{
char *message, *channel, *server = NULL;
int ret = 0;
t_gui_buffer *ptr_buffer;
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss|s", &message, &channel, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_with_channel' Python function\n"));
return NULL;
}
ptr_buffer = NULL;
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
if (!server || (strcasecmp (ptr_server->name, server)) == 0)
{
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
if (strcasecmp (ptr_channel->name, channel) == 0)
{
ptr_buffer = ptr_channel->buffer;
break;
}
}
}
if (ptr_buffer)
break;
}
/* buffer found => display message & return 1 ~= True */
if (ptr_buffer)
{
irc_display_prefix (ptr_buffer, PREFIX_PLUGIN);
gui_printf (ptr_buffer, "%s", message);
ret = 1;
}
return Py_BuildValue ("i", ret);
}
/*
* weechat.print_infobar(delay, message): print message to infobar
*/
static PyObject *
wee_python_print_infobar (PyObject *self, PyObject *args)
{
int delay;
char *message;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "is", &delay, &message))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'print_infobar' Python function\n"));
return NULL;
}
gui_infobar_printf (delay, COLOR_WIN_INFOBAR, message);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.command(command, server=None): send command to server
*/
static PyObject *
wee_python_command (PyObject *self, PyObject *args)
{
char *server = NULL, *command, *command2;
t_irc_server *ptr_server;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s|s", &command, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'command' Python function\n"));
return NULL;
}
if (server == NULL)
{
ptr_server = SERVER(gui_current_window->buffer);
}
else
{
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
{
if (strcasecmp (ptr_server->name, server) == 0)
break;
}
if (!ptr_server)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: server not found for 'command' Python function\n"));
}
}
if (ptr_server)
{
command2 = (char *) malloc (strlen (command) + 8);
strcpy (command2, command);
if (!strstr (command2, "\r\n"))
strcat (command2, "\r\n");
server_sendf (ptr_server, command2);
free (command2);
}
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.add_message_handler(message, function):
* add handler for messages
*/
static PyObject *
wee_python_add_message_handler (PyObject *self, PyObject *args)
{
char *message, *function;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss", &message, &function))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'add_message_handler' Python function\n"));
return NULL;
}
plugin_handler_add (&plugin_msg_handlers, &last_plugin_msg_handler,
PLUGIN_TYPE_PYTHON, message, function);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.add_command_handler(name, function):
* define/redefines commands
*/
static PyObject *
wee_python_add_command_handler(PyObject *self, PyObject *args)
{
char *name, *function;
t_plugin_handler *ptr_plugin_handler;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "ss", &name, &function))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'add_command_handler' Python function\n"));
return NULL;
}
if (!weelist_search (index_commands, name))
weelist_add (&index_commands, &last_index_command, name);
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, name);
if (ptr_plugin_handler)
{
free (ptr_plugin_handler->function_name);
ptr_plugin_handler->function_name = strdup (function);
}
else
plugin_handler_add (&plugin_cmd_handlers, &last_plugin_cmd_handler,
PLUGIN_TYPE_PYTHON, name, function);
Py_INCREF (Py_None);
return Py_None;
}
/*
* weechat.get_info(info, server=None):
* get various infos
*/
static PyObject *
wee_python_get_info (PyObject *self, PyObject *args)
{
char *arg, *info = NULL, *server = NULL;
t_irc_server *ptr_server;
/* make gcc happy */
(void) self;
if (!PyArg_ParseTuple (args, "s|s", &arg, &server))
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: wrong parameters for 'get_info' Python function\n"));
return NULL;
}
if (server == NULL)
{
ptr_server = SERVER(gui_current_window->buffer);
}
else
{
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
{
if (strcasecmp (ptr_server->name, server) == 0)
break;
}
if (!ptr_server)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: server not found for 'get_info' Python function\n"));
}
}
if (ptr_server && arg)
{
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
{
info = PACKAGE_STRING;
}
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
{
if (ptr_server->nick)
info = ptr_server->nick;
}
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
{
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
info = CHANNEL (gui_current_window->buffer)->name;
}
else if ( (strcasecmp (arg, "3") == 0) || (strcasecmp (arg, "server") == 0) )
{
if (ptr_server->name)
info = ptr_server->name;
}
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
{
info = weechat_home;
}
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
{
return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);
}
if (info)
return Py_BuildValue ("s", info);
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
}
/*
* initialize subroutines
*/
static
PyMethodDef weechat_funcs[] = {
{"register", wee_python_register, METH_VARARGS, ""},
{"prnt", wee_python_print, METH_VARARGS, ""},
{"print_with_channel", wee_python_print_with_channel, METH_VARARGS, ""},
{"print_infobar", wee_python_print_infobar, METH_VARARGS, ""},
{"command", wee_python_command, METH_VARARGS, ""},
{"add_message_handler", wee_python_add_message_handler, METH_VARARGS, ""},
{"add_command_handler", wee_python_add_command_handler, METH_VARARGS, ""},
{"get_info", wee_python_get_info, METH_VARARGS, ""},
{NULL, NULL, 0, NULL}
};
/*
* wee_python_init: initialize Python interface for WeeChat
*/
void
wee_python_init ()
{
Py_Initialize ();
if (Py_IsInitialized () == 0)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python error: error while launching Python interpreter\n"));
}
else
{
Py_InitModule ("weechat", weechat_funcs);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Loading Python module \"weechat\"\n"));
}
}
/*
* wee_python_search: search a (loaded) Python script by name
*/
t_plugin_script *
wee_python_search (char *name)
{
t_plugin_script *ptr_python_script;
for (ptr_python_script = python_scripts; ptr_python_script;
ptr_python_script = ptr_python_script->next_script)
{
if (strcmp (ptr_python_script->name, name) == 0)
return ptr_python_script;
}
/* script not found */
return NULL;
}
/*
* wee_python_exec: execute a Python script
*/
int
wee_python_exec (char *function, char *server, char *arguments)
{
int len, return_code, i, j, alen;
char *srv, *args, *runstring;
return_code = 1;
if (arguments == NULL)
{
alen = 0;
args = strdup ("");
}
else
{
alen = (int) strlen (arguments);
args = (char *) malloc ( 2 * alen * sizeof (*args));
}
if (!args)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
return 0;
}
// copy arguments in args to escape double quotes
j = 0;
for (i=0; i < alen; ++i)
{
if (arguments[i] == '"' || arguments[i] == '\\')
{
args[j] = '\\';
++j;
}
args[j] = arguments[i];
++j;
}
args[j] = 0;
if (server == NULL)
srv = strdup ("");
else
srv = strdup (server);
if (!srv)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
free (args);
return 0;
}
len = (int) strlen (function);
len += (int) strlen ("(\"\",\"\")");
len += (int) strlen (srv);
len += (int) strlen (args);
len += 1;
runstring = (char *) malloc ( len * sizeof (*runstring));
if (runstring)
{
sprintf (runstring, "%s(\"%s\",\"%s\")", function, srv, args);
if (PyRun_SimpleString (runstring) != 0)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while running function \"%s\"\n"), function);
return_code = 0;
}
free (runstring);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: unable to run function \"%s\"in Python script (not enough memory)\n"),
function);
return_code = 0;
}
free (args);
free (srv);
return return_code;
}
/*
* wee_python_load: load a Python script
*/
int
wee_python_load (char *filename)
{
FILE *fp;
/* execute Python script */
wee_log_printf (_("loading Python script \"%s\"\n"), filename);
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Loading Python script \"%s\"\n"), filename);
if ((fp = fopen (filename, "r")) == NULL)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while opening file \"%s\"\n"), filename);
return 1;
}
if (PyRun_SimpleFile (fp, filename) != 0)
{
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("Python error: error while parsing file \"%s\"\n"), filename);
return 1;
}
fclose (fp);
return 0;
}
/*
* wee_python_script_free: free a Python script
*/
void
wee_python_script_free (t_plugin_script *ptr_python_script)
{
t_plugin_script *new_python_scripts;
/* remove script from list */
if (last_python_script == ptr_python_script)
last_python_script = ptr_python_script->prev_script;
if (ptr_python_script->prev_script)
{
(ptr_python_script->prev_script)->next_script = ptr_python_script->next_script;
new_python_scripts = python_scripts;
}
else
new_python_scripts = ptr_python_script->next_script;
if (ptr_python_script->next_script)
(ptr_python_script->next_script)->prev_script = ptr_python_script->prev_script;
/* free data */
if (ptr_python_script->name)
free (ptr_python_script->name);
if (ptr_python_script->version)
free (ptr_python_script->version);
if (ptr_python_script->shutdown_func)
free (ptr_python_script->shutdown_func);
if (ptr_python_script->description)
free (ptr_python_script->description);
free (ptr_python_script);
python_scripts = new_python_scripts;
}
/*
* wee_python_unload: unload a Python script
*/
void
wee_python_unload (t_plugin_script *ptr_python_script)
{
if (ptr_python_script)
{
wee_log_printf (_("unloading Python script \"%s\"\n"),
ptr_python_script->name);
/* call shutdown callback function */
if (ptr_python_script->shutdown_func[0])
wee_python_exec (ptr_python_script->shutdown_func, "", "");
wee_python_script_free (ptr_python_script);
}
}
/*
* wee_python_unload_all: unload all Python scripts
*/
void
wee_python_unload_all ()
{
wee_log_printf (_("unloading all Python scripts...\n"));
while (python_scripts)
wee_python_unload (python_scripts);
}
/*
* wee_python_end: shutdown Python interface
*/
void
wee_python_end ()
{
/* unload all scripts */
wee_python_unload_all ();
/* free all handlers */
plugin_handler_free_all_type (&plugin_msg_handlers,
&last_plugin_msg_handler,
PLUGIN_TYPE_PYTHON);
plugin_handler_free_all_type (&plugin_cmd_handlers,
&last_plugin_cmd_handler,
PLUGIN_TYPE_PYTHON);
Py_Finalize ();
if (Py_IsInitialized () != 0) {
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _("Python error: error while freeing Python interpreter\n"));
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WEECHAT_PYTHON_H
#define __WEECHAT_PYTHON_H 1
#include "../plugins.h"
extern void wee_python_init ();
extern t_plugin_script *wee_python_search (char *);
extern int wee_python_exec (char *, char *, char *);
extern int wee_python_load (char *);
extern void wee_python_unload (t_plugin_script *);
extern void wee_python_unload_all ();
extern void wee_python_end ();
#endif /* wee-python.h */