Add new option weechat.look.time_format to customize default format for date/time displayed (localized date by default), add function weechat_util_get_time_string in plugin API (patch #6914)

v2.8-utf8proc
Sebastien Helleu 2010-02-09 17:19:14 +01:00
parent daee18621e
commit 7850668327
30 changed files with 507 additions and 217 deletions

View File

@ -12,6 +12,9 @@ Version 0.3.2 (under dev!)
weechat.look.buffer_time_format is set to empty value (bug #28751)
* core: add option "switch_active_buffer_previous" for command /input
(task #10141)
* core: add new option weechat.look.time_format to customize default format
for date/time displayed (localized date by default), add function
weechat_util_get_time_string in plugin API (patch #6914)
* gui: fix bug with global history, reset pointer to last entry after each user
input (bug #28754)
* api: add missing infos in functions buffer_get_integer / buffer_get_string

View File

@ -320,20 +320,22 @@
This command run again a WeeChat binary, so it should have been compiled or installed with a package manager before running this command.
........................................
• *`/uptime`* `[-o]`::
• *`/uptime`* `[-o | -ol]`::
........................................
show WeeChat uptime
-o: send uptime to current buffer as input
-o: send uptime to current buffer as input (english string)
-ol: send uptime to current buffer as input (translated string)
........................................
• *`/version`* `[-o]`::
• *`/version`* `[-o | -ol]`::
........................................
show WeeChat version and compilation date
-o: send version to current buffer as input
-o: send version to current buffer as input (english string)
-ol: send version to current buffer as input (translated string)
........................................
• *`/wait`* `number[unit] command`::

View File

@ -364,7 +364,7 @@
** values: none, highlight, message, all (default value: all)
* *weechat.look.buffer_time_format*
** description: time format for buffers
** description: time format for each line displayed in buffers
** type: string
** values: any string (default value: "%H:%M:%S")
@ -553,6 +553,11 @@
** type: boolean
** values: on, off (default value: on)
* *weechat.look.time_format*
** description: time format for dates converted to strings and displayed in messages
** type: string
** values: any string (default value: "%a, %d %b %Y %T")
* *weechat.network.gnutls_ca_file*
** description: file containing the certificate authorities
** type: string

View File

@ -1718,8 +1718,8 @@ Util
Some useful functions.
weechat_timeval_cmp
^^^^^^^^^^^^^^^^^^^
weechat_util_timeval_cmp
^^^^^^^^^^^^^^^^^^^^^^^^
Compare two "timeval" structures.
@ -1727,7 +1727,7 @@ Prototype:
[source,C]
----------------------------------------
int weechat_timeval_cmp (struct timeval *tv1, struct timeval *tv2);
int weechat_util_timeval_cmp (struct timeval *tv1, struct timeval *tv2);
----------------------------------------
Arguments:
@ -1745,14 +1745,14 @@ C example:
[source,C]
----------------------------------------
if (weechat_timeval_cmp (&tv1, &tv2) > 0)
if (weechat_util_timeval_cmp (&tv1, &tv2) > 0)
{
/* tv1 > tv2 */
}
----------------------------------------
weechat_timeval_diff
^^^^^^^^^^^^^^^^^^^^
weechat_util_timeval_diff
^^^^^^^^^^^^^^^^^^^^^^^^^
Return difference (in milliseconds) between two "timeval" structures.
@ -1760,7 +1760,7 @@ Prototype:
[source,C]
----------------------------------------
long weechat_timeval_diff (struct timeval *tv1, struct timeval *tv2);
long weechat_util_timeval_diff (struct timeval *tv1, struct timeval *tv2);
----------------------------------------
Arguments:
@ -1776,11 +1776,11 @@ C example:
[source,C]
----------------------------------------
long diff = weechat_timeval_diff (&tv1, &tv2);
long diff = weechat_util_timeval_diff (&tv1, &tv2);
----------------------------------------
weechat_timeval_add
^^^^^^^^^^^^^^^^^^^
weechat_util_timeval_add
^^^^^^^^^^^^^^^^^^^^^^^^
Add interval (in milliseconds) to a timeval structure.
@ -1788,7 +1788,7 @@ Prototype:
[source,C]
----------------------------------------
void weechat_timeval_add (struct timeval *tv, long interval);
void weechat_util_timeval_add (struct timeval *tv, long interval);
----------------------------------------
Arguments:
@ -1800,7 +1800,32 @@ C example:
[source,C]
----------------------------------------
weechat_timeval_add (&tv, 2000); /* add 2 seconds */
weechat_util_timeval_add (&tv, 2000); /* add 2 seconds */
----------------------------------------
weechat_util_get_time_string
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get date/time as a string built with "strftime".
Prototype:
[source,C]
----------------------------------------
char *weechat_util_get_time_string (const time_t *date);
----------------------------------------
Arguments:
* 'date': pointer to date
C example:
[source,C]
----------------------------------------
time_t date = time (NULL);
weechat_printf (NULL, "date: %s",
weechat_util_get_time_string (&date));
----------------------------------------
[[sorted_lists]]

View File

@ -320,20 +320,22 @@
Cette commande lance à nouveau un binaire WeeChat, il doit donc avoir été compilé ou installé via un gestionnaire de paquet avant de lancer cette commande.
........................................
• *`/uptime`* `[-o]`::
• *`/uptime`* `[-o | -ol]`::
........................................
montrer l'uptime de WeeChat
-o: envoyer l'uptime sur le tampon courant comme entrée
-o: envoyer l'uptime sur le tampon courant comme entrée (chaîne en anglais)
-ol: envoyer l'uptime sur le tampon courant comme entrée (chaîne traduite)
........................................
• *`/version`* `[-o]`::
• *`/version`* `[-o | -ol]`::
........................................
afficher la version de WeeChat et la date de compilation
-o: envoyer la version sur le tampon courant comme entrée
-o: envoyer la version sur le tampon courant comme entrée (chaîne en anglais)
-ol: envoyer la version sur le tampon courant comme entrée (chaîne traduite)
........................................
• *`/wait`* `nombre[unité] commande`::

View File

@ -364,7 +364,7 @@
** valeurs: none, highlight, message, all (valeur par défaut: all)
* *weechat.look.buffer_time_format*
** description: format de date/heure pour les tampons
** description: format de date/heure pour chaque ligne affichée dans les tampons
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: "%H:%M:%S")
@ -553,6 +553,11 @@
** type: booléen
** valeurs: on, off (valeur par défaut: on)
* *weechat.look.time_format*
** description: format de date/heure pour les dates converties en chaînes et affichées dans les messages
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: "%a, %d %b %Y %T")
* *weechat.network.gnutls_ca_file*
** description: fichier contenant les autorités de certification
** type: chaîne

View File

@ -1823,7 +1823,32 @@ Exemple en C :
[source,C]
----------------------------------------
weechat_timeval_add (&tv, 2000); /* add 2 seconds */
weechat_timeval_add (&tv, 2000); /* ajoute 2 secondes */
----------------------------------------
weechat_util_get_time_string
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Retourne la date/heure sous forme de chaîne construite avec "strftime".
Prototype :
[source,C]
----------------------------------------
char *weechat_util_get_time_string (const time_t *date);
----------------------------------------
Paramètres :
* 'date': pointeur vers la date
Exemple en C :
[source,C]
----------------------------------------
time_t date = time (NULL);
weechat_printf (NULL, "date: %s",
weechat_util_get_time_string (&date));
----------------------------------------
[[sorted_lists]]

View File

@ -320,20 +320,22 @@
Questo comando esegue nuovamente un binario WeeChat, perciò deve essere stato compilato o installato con un gestore di pacchetti prima di eseguire questo comando.
........................................
• *`/uptime`* `[-o]`::
• *`/uptime`* `[-o | -ol]`::
........................................
mostra l'uptime di WeeChat
-o: invia l'uptime al buffer corrente come input
-o: send uptime to current buffer as input (english string)
-ol: send uptime to current buffer as input (translated string)
........................................
• *`/version`* `[-o]`::
• *`/version`* `[-o | -ol]`::
........................................
mostra la versione e la data di compilazione di WeeChat
-o: invia versione al buffer corrente come input
-o: send version to current buffer as input (english string)
-ol: send version to current buffer as input (translated string)
........................................
• *`/wait`* `numero[unità] comando`::

View File

@ -364,7 +364,7 @@
** valori: none, highlight, message, all (valore predefinito: all)
* *weechat.look.buffer_time_format*
** descrizione: formato dell'ora per i buffer
** descrizione: time format for each line displayed in buffers
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: "%H:%M:%S")
@ -553,6 +553,11 @@
** tipo: bool
** valori: on, off (valore predefinito: on)
* *weechat.look.time_format*
** descrizione: time format for dates converted to strings and displayed in messages
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: "%a, %d %b %Y %T")
* *weechat.network.gnutls_ca_file*
** descrizione: file contenente le autorità dei certificati
** tipo: stringa

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:56+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -673,16 +673,16 @@ msgstr "%sChyba: nemohu uložit sezení do souboru"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "***** Chyba: exec selhal (program: \"%s\"), ukončuji WeeChat"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Čas běhu WeeChat: %d %s %02d:%02d:%02d, spuštěn %s"
msgid "day"
msgid_plural "days"
msgstr[0] "den"
msgstr[1] "dny"
msgstr[2] "dnů"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Čas běhu WeeChat: %d %s %02d:%02d:%02d, spuštěn %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr "Čas běhu WeeChat: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, spuštěn %s%s"
@ -1330,17 +1330,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "zobrazit jak dlouho WeeChat běží"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgstr "-o: poslat čas běhu na aktuální kanál jako vstup"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
msgid "show WeeChat version and compilation date"
msgstr "zobrazit verzi WeeChat a datum kompilace"
msgid "-o: send version to current buffer as input"
msgstr "-c: pošle verzi jako vstup pro aktuální buffer"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
msgstr "naplánovat spuštění příkazu v budoucnosti"
@ -1516,8 +1517,9 @@ msgstr ""
"výchozí upozorňovací úrovně pro buffery (používano WeeChatem pro určení "
"jestli má být buffer zobrazen v hotlistu nebo ne, podle důležitosti zprávy)"
msgid "time format for buffers"
msgstr "formát času pro buffer"
#, fuzzy
msgid "time format for each line displayed in buffers"
msgstr "formát času pro zobrazení dne při změně dne"
msgid "number of colors to use for nicks colors"
msgstr "počet barev použitých pro barvy přezdívek"
@ -1692,6 +1694,10 @@ msgstr "upozornit uživatele, když není hledaný text nalezen v bufferu"
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr "nastaví titulek okna (terminálu pro Cruses GUI) s jménem a verzí"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "formát času pro zobrazení dne při změně dne"
msgid "background color for window separators (when split)"
msgstr "barva pozadí děliče oken (při rozdělení)"
@ -5993,6 +5999,18 @@ msgstr "%s%s: nemohu nastavit \"neblokovaci\" volbu na soket"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: poslat čas běhu na aktuální kanál jako vstup"
#~ msgid "-o: send version to current buffer as input"
#~ msgstr "-c: pošle verzi jako vstup pro aktuální buffer"
#~ msgid "time format for buffers"
#~ msgstr "formát času pro buffer"
#~ msgid "%s%s: cannot find nick for sending message"
#~ msgstr "%s%s: nemohu najít přezdívku pro poslání zprávy"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-26 22:35+0100\n"
"Last-Translator: Nils G <weechatter@arcor.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -687,15 +687,15 @@ msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr ""
"***** Fehler: Ausführung schlug fehl (Programm: \"%s\"), WeeChat wird beendet"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat Uptime: %d %s %02d:%02d:%02d, gestartet am %s"
msgid "day"
msgid_plural "days"
msgstr[0] "Tag"
msgstr[1] "Tage"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat Uptime: %d %s %02d:%02d:%02d, gestartet am %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1385,18 +1385,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "Zeigt die Uptime von Weechat an"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
"-o: sendet die Weechat-Uptime, als Mitteilung, in den aktuellen Channel"
msgid "show WeeChat version and compilation date"
msgstr "Zeigt die WeeChat-Version und das Datum der Kompilierung an"
msgid "-o: send version to current buffer as input"
msgstr "-o: schickt Version in den aktuellen Buffer"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
msgstr "Terminiere einen Befehl der ausgeführt werden soll"
@ -1580,8 +1580,9 @@ msgstr ""
"genutzt um WeeChat mitzuteilen ob der Buffer in der Hotlist angezeigt werden "
"soll oder nicht, entsprechend der Wichtigkeit der Nachricht)"
msgid "time format for buffers"
msgstr "Zeitformatierung für Buffer"
#, fuzzy
msgid "time format for each line displayed in buffers"
msgstr "Zeitstempel für das Datum, das beim Tageswechsel angezeigt wird"
msgid "number of colors to use for nicks colors"
msgstr "Anzahl der für Nick-Namen zu benutzenden Farben"
@ -1762,6 +1763,10 @@ msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"Fenstertitel setzen (oder Terminal-Titel im Curses-GUI) mit Name und Version"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "Zeitstempel für das Datum, das beim Tageswechsel angezeigt wird"
msgid "background color for window separators (when split)"
msgstr ""
"Hintergrundfarbe der Fenster-Separatoren im Chatfenster (bei geteiltem "
@ -6217,3 +6222,16 @@ msgstr ""
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr ""
#~ "-o: sendet die Weechat-Uptime, als Mitteilung, in den aktuellen Channel"
#~ msgid "-o: send version to current buffer as input"
#~ msgstr "-o: schickt Version in den aktuellen Buffer"
#~ msgid "time format for buffers"
#~ msgstr "Zeitformatierung für Buffer"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:56+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -672,15 +672,15 @@ msgstr "%sError: no se pudo guardar la sesión"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "***** Error: el ejecutable falló (programa: \"%s\"), cerrando WeeChat"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime de WeeChat: %d %s %02d:%02d:%02d, iniciado en %s"
msgid "day"
msgid_plural "days"
msgstr[0] "día"
msgstr[1] "días"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime de WeeChat: %d %s %02d:%02d:%02d, iniciado en %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1348,17 +1348,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "muestra el tiempo de uso de WeeChat"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgstr "-o: envía el tiempo de uso al canal actual"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
msgid "show WeeChat version and compilation date"
msgstr "muestra la versión y la fecha de compilación de WeeChat"
msgid "-o: send version to current buffer as input"
msgstr "-o: envía la versión a la entrada del buffer actual"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
msgstr "agenda un comando para ejecutar en el futuro"
@ -1536,8 +1537,9 @@ msgstr ""
"buffer debe ser mostrado en la lista de actividad o no, según la importancia "
"del mensaje)"
msgid "time format for buffers"
msgstr "formato de hora para los buffers"
#, fuzzy
msgid "time format for each line displayed in buffers"
msgstr "formato para la fecha mostrada cuando el día cambió"
msgid "number of colors to use for nicks colors"
msgstr "número de colores para usar en los colores de nombres de usuario"
@ -1722,6 +1724,10 @@ msgstr ""
"define el título de la ventana (el terminal para la interfaz Curses) con el "
"nombre y la versión"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "formato para la fecha mostrada cuando el día cambió"
msgid "background color for window separators (when split)"
msgstr "color de fondo para los separadores de ventana (cuando se dividen)"
@ -6119,6 +6125,18 @@ msgstr "%s%s: no es posible configurar la opción \"nonblock\" para el socket"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: envía el tiempo de uso al canal actual"
#~ msgid "-o: send version to current buffer as input"
#~ msgstr "-o: envía la versión a la entrada del buffer actual"
#~ msgid "time format for buffers"
#~ msgstr "formato de hora para los buffers"
#~ msgid "%s%s: cannot find nick for sending message"
#~ msgstr "%s%s: no se pudo encontrar el apodo para enviarle el mensaje"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"PO-Revision-Date: 2010-02-09 13:16+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-02-09 16:36+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -673,15 +673,15 @@ msgstr "%sErreur: impossible de sauvegarder la session dans le ficheir"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "***** Error: exec a échoué (programme: \"%s\"), sortie de WeeChat"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime WeeChat: %d %s %02d:%02d:%02d, démarré le %s"
msgid "day"
msgid_plural "days"
msgstr[0] "jour"
msgstr[1] "jours"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime WeeChat: %d %s %02d:%02d:%02d, démarré le %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr "Uptime WeeChat: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, démarré le %s%s"
@ -1364,17 +1364,24 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "montrer l'uptime de WeeChat"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgstr "-o: envoyer l'uptime sur le tampon courant comme entrée"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
" -o: envoyer l'uptime sur le tampon courant comme entrée (chaîne en "
"anglais)\n"
"-ol: envoyer l'uptime sur le tampon courant comme entrée (chaîne traduite)"
msgid "show WeeChat version and compilation date"
msgstr "afficher la version de WeeChat et la date de compilation"
msgid "-o: send version to current buffer as input"
msgstr "-o: envoyer la version sur le tampon courant comme entrée"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
" -o: envoyer la version sur le tampon courant comme entrée (chaîne en "
"anglais)\n"
"-ol: envoyer la version sur le tampon courant comme entrée (chaîne traduite)"
msgid "schedule a command execution in future"
msgstr "planifie l'exécution d'une commande dans le futur"
@ -1554,8 +1561,8 @@ msgstr ""
"WeeChat si le tampon doit être affiché dans la hotlist ou non, selon "
"l'importance du message)"
msgid "time format for buffers"
msgstr "format de date/heure pour les tampons"
msgid "time format for each line displayed in buffers"
msgstr "format de date/heure pour chaque ligne affichée dans les tampons"
msgid "number of colors to use for nicks colors"
msgstr "nombre de couleurs à utiliser pour les couleurs des pseudos"
@ -1739,6 +1746,11 @@ msgstr ""
"définit le titre de la fenêtre (terminal pour l'interface Curses) avec le "
"nom et la version"
msgid "time format for dates converted to strings and displayed in messages"
msgstr ""
"format de date/heure pour les dates converties en chaînes et affichées dans "
"les messages"
msgid "background color for window separators (when split)"
msgstr "couleur du fond pour les séparateurs de fenêtres (quand divisé)"
@ -6157,9 +6169,3 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket"
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s"
#~ msgid "[-all | -current] command"
#~ msgstr "[-all | -current] commande"
#~ msgid "display message if CTCP is unknown"
#~ msgstr "afficher le message si le CTCP est inconnu"

View File

@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:57+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -726,15 +726,15 @@ msgstr "%s nem sikerült a folyamatot menteni\n"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "%s futtatási hiba (program: \"%s\"), a WeeChat kilép\n"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat futásidő: %d %s %02d:%02d:%02d, elindítva: %s"
msgid "day"
msgid_plural "days"
msgstr[0] "nap"
msgstr[1] "nap"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat futásidő: %d %s %02d:%02d:%02d, elindítva: %s"
#, fuzzy, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1247,18 +1247,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "a WeeChat futásidejének mutatása"
msgid "[-o]"
msgstr "[-o]"
#, fuzzy
msgid "-o: send uptime to current buffer as input"
msgstr "-o: a futásidő mint IRC üzenet elküldése az aktuális szobába"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
#, fuzzy
msgid "show WeeChat version and compilation date"
msgstr "Konfigurációs fájl elmentve\n"
msgid "-o: send version to current buffer as input"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
@ -1399,8 +1399,8 @@ msgid ""
msgstr ""
#, fuzzy
msgid "time format for buffers"
msgstr "a pufferek időbélyege"
msgid "time format for each line displayed in buffers"
msgstr "új nap kezdetével megjelenő időbélyeg"
msgid "number of colors to use for nicks colors"
msgstr "nevek színezéséhez használt színek száma"
@ -1561,6 +1561,10 @@ msgstr ""
"ablak címsorának beállítása (Curses GUI esetén a terminálé) a program nevére "
"és verziójára"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "új nap kezdetével megjelenő időbélyeg"
#, fuzzy
msgid "background color for window separators (when split)"
msgstr "ablakelválasztó színe (ha meg van osztva)"
@ -5926,6 +5930,17 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#, fuzzy
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: a futásidő mint IRC üzenet elküldése az aktuális szobába"
#, fuzzy
#~ msgid "time format for buffers"
#~ msgstr "a pufferek időbélyege"
#, fuzzy
#~ msgid "%s%s: cannot find nick for sending message"
#~ msgstr "%s nem található név az üzenet küldéséhez\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Weechat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:57+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -671,15 +671,15 @@ msgstr "%sErrore: impossibile salvare la sessione su file"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "***** Errore: exec fallito (programma: \"%s\"), chiusura di WeeChat"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime di WeeChat: %d %s %02d:%02d:%02d, avviato il %s"
msgid "day"
msgid_plural "days"
msgstr[0] "giorno"
msgstr[1] "giorni"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Uptime di WeeChat: %d %s %02d:%02d:%02d, avviato il %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1342,17 +1342,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "mostra l'uptime di WeeChat"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgstr "-o: invia l'uptime al buffer corrente come input"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
msgid "show WeeChat version and compilation date"
msgstr "mostra la versione e la data di compilazione di WeeChat"
msgid "-o: send version to current buffer as input"
msgstr "-o: invia versione al buffer corrente come input"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
msgstr "pianifica l'esecuzione di un comando"
@ -1535,8 +1536,9 @@ msgstr ""
"WeeChat se il buffer deve essere visualizzato nella hotlist oppure no, a "
"seconda dell'importanza del messaggio)"
msgid "time format for buffers"
msgstr "formato dell'ora per i buffer"
#, fuzzy
msgid "time format for each line displayed in buffers"
msgstr "formato dell'ora visualizzato al cambio di data"
msgid "number of colors to use for nicks colors"
msgstr "numero di colori da utilizzare per i colori dei nick"
@ -1719,6 +1721,10 @@ msgstr ""
"imposta titolo per la finestra (terminale per interfacce Curses) con nome e "
"versione"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "formato dell'ora visualizzato al cambio di data"
msgid "background color for window separators (when split)"
msgstr "colore di sfondo per i separatori delle finestre (quando divise)"
@ -6097,3 +6103,15 @@ msgstr "%s%s: impossibile impostare l'opzione \"nonblock\" per il socket"
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: timeout per \"%s\" con %s"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: invia l'uptime al buffer corrente come input"
#~ msgid "-o: send version to current buffer as input"
#~ msgstr "-o: invia versione al buffer corrente come input"
#~ msgid "time format for buffers"
#~ msgstr "formato dell'ora per i buffer"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:57+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: Polish\n"
@ -683,16 +683,16 @@ msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr ""
"***** Błąd: wykonanie nie powiodło się (program: \"%s\"), wyjście z WeeChat"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Czas działania WeeChat: %d %s %02d:%02d:%02d, uruchomiono %s"
msgid "day"
msgid_plural "days"
msgstr[0] "dzień"
msgstr[1] "dni"
msgstr[2] "dni"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "Czas działania WeeChat: %d %s %02d:%02d:%02d, uruchomiono %s"
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1357,17 +1357,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "pokazuje czas pracy WeeChat"
msgid "[-o]"
msgstr "[-o]"
msgid "-o: send uptime to current buffer as input"
msgstr "-o: wysyła czas pracy jako wejście do obecnego bufora"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
msgid "show WeeChat version and compilation date"
msgstr "pokazuje wersję i datę, kiedy skompilowano WeeChat"
msgid "-o: send version to current buffer as input"
msgstr "-o: wysyła wersję jako wejście do obecnego bufora"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
msgstr "kolejkuje komendę do wykonania w przyszłości"
@ -1547,8 +1548,9 @@ msgstr ""
"bufor musi byc wyświetlany na hotliście czy nie, w zależności od wagi "
"wiadomości)"
msgid "time format for buffers"
msgstr "format czasu dla buforów"
#, fuzzy
msgid "time format for each line displayed in buffers"
msgstr "format czasu wyświetlanej daty przy zmianie dnia"
msgid "number of colors to use for nicks colors"
msgstr "liczba kolorów do użycia dla kolorowania nicków"
@ -1729,6 +1731,10 @@ msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr "ustaw tytuł okna (terminal dla GUI w Curses) na nazwe i wersję"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "format czasu wyświetlanej daty przy zmianie dnia"
msgid "background color for window separators (when split)"
msgstr "kolor tła dla separatorów okna (kiedy podzielone)"
@ -6069,6 +6075,18 @@ msgstr "%s%s: nie można ustawić opcji \"nonblock\" dla gniazda"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: wysyła czas pracy jako wejście do obecnego bufora"
#~ msgid "-o: send version to current buffer as input"
#~ msgstr "-o: wysyła wersję jako wejście do obecnego bufora"
#~ msgid "time format for buffers"
#~ msgstr "format czasu dla buforów"
#~ msgid "%s%s: cannot find nick for sending message"
#~ msgstr "%s%s: nie można znaleźć nicku do wysłania wiadomości"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\n"
"PO-Revision-Date: 2010-01-23 11:57+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -727,16 +727,16 @@ msgstr "%s не могу сохранить сессию в файл\n"
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr "%s запуск не удался (программа: \"%s\"), выхожу из WeeChat\n"
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat работает: %d %s %02d:%02d:%02d, запущен %s"
msgid "day"
msgid_plural "days"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr "WeeChat работает: %d %s %02d:%02d:%02d, запущен %s"
#, fuzzy, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr "WeeChat работает: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, запущен %s%s"
@ -1251,18 +1251,18 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr "показать uptime WeeChat"
msgid "[-o]"
msgstr "[-o]"
#, fuzzy
msgid "-o: send uptime to current buffer as input"
msgstr "-o: отправить uptime сообщением в текущий канал"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
#, fuzzy
msgid "show WeeChat version and compilation date"
msgstr "Конфигурационный файл сохранён\n"
msgid "-o: send version to current buffer as input"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
@ -1403,8 +1403,8 @@ msgid ""
msgstr ""
#, fuzzy
msgid "time format for buffers"
msgstr "время в буферах"
msgid "time format for each line displayed in buffers"
msgstr "отображение маркера даты при смене дня"
msgid "number of colors to use for nicks colors"
msgstr "количество цветов для раскрашивания ников"
@ -1572,6 +1572,10 @@ msgstr ""
"устанавливать заголовок окна (терминала при интерфейсе Curses) с именем и "
"версией"
#, fuzzy
msgid "time format for dates converted to strings and displayed in messages"
msgstr "отображение маркера даты при смене дня"
#, fuzzy
msgid "background color for window separators (when split)"
msgstr "цвет разделителей окна (при разбитом экране)"
@ -5924,6 +5928,17 @@ msgstr "%s DCC: не могу установить неблокирующий р
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "[-o]"
#~ msgstr "[-o]"
#, fuzzy
#~ msgid "-o: send uptime to current buffer as input"
#~ msgstr "-o: отправить uptime сообщением в текущий канал"
#, fuzzy
#~ msgid "time format for buffers"
#~ msgstr "время в буферах"
#, fuzzy
#~ msgid "%s%s: cannot find nick for sending message"
#~ msgstr "%s не могу найти адресата сообщения\n"

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: 2010-02-09 13:15+0100\n"
"POT-Creation-Date: 2010-02-09 16:35+0100\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"
@ -642,15 +642,15 @@ msgstr ""
msgid "***** Error: exec failed (program: \"%s\"), exiting WeeChat"
msgstr ""
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr ""
msgid "day"
msgid_plural "days"
msgstr[0] ""
msgstr[1] ""
#, c-format
msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"
msgstr ""
#, c-format
msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s"
msgstr ""
@ -1077,16 +1077,17 @@ msgstr ""
msgid "show WeeChat uptime"
msgstr ""
msgid "[-o]"
msgstr ""
msgid "-o: send uptime to current buffer as input"
msgid ""
" -o: send uptime to current buffer as input (english string)\n"
"-ol: send uptime to current buffer as input (translated string)"
msgstr ""
msgid "show WeeChat version and compilation date"
msgstr ""
msgid "-o: send version to current buffer as input"
msgid ""
" -o: send version to current buffer as input (english string)\n"
"-ol: send version to current buffer as input (translated string)"
msgstr ""
msgid "schedule a command execution in future"
@ -1202,7 +1203,7 @@ msgid ""
"displayed in hotlist or not, according to importance of message)"
msgstr ""
msgid "time format for buffers"
msgid "time format for each line displayed in buffers"
msgstr ""
msgid "number of colors to use for nicks colors"
@ -1344,6 +1345,9 @@ msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
msgid "time format for dates converted to strings and displayed in messages"
msgstr ""
msgid "background color for window separators (when split)"
msgstr ""

View File

@ -38,12 +38,13 @@
#include "wee-debug.h"
#include "wee-hook.h"
#include "wee-input.h"
#include "wee-list.h"
#include "wee-log.h"
#include "wee-proxy.h"
#include "wee-string.h"
#include "wee-upgrade.h"
#include "wee-utf8.h"
#include "wee-list.h"
#include "wee-util.h"
#include "../gui/gui-bar.h"
#include "../gui/gui-bar-item.h"
#include "../gui/gui-buffer.h"
@ -3514,7 +3515,7 @@ command_uptime (void *data, struct t_gui_buffer *buffer,
if ((argc >= 2) && (string_strcasecmp (argv[1], "-o") == 0))
{
snprintf (string, sizeof (string),
_("WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"),
"WeeChat uptime: %d %s %02d:%02d:%02d, started on %s",
day,
NG_("day", "days", day),
hour,
@ -3524,6 +3525,18 @@ command_uptime (void *data, struct t_gui_buffer *buffer,
string[strlen (string) - 1] = '\0';
input_data (buffer, string);
}
else if ((argc >= 2) && (string_strcasecmp (argv[1], "-ol") == 0))
{
snprintf (string, sizeof (string),
_("WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"),
day,
NG_("day", "days", day),
hour,
min,
sec,
util_get_time_string (&weechat_start_time));
input_data (buffer, string);
}
else
{
gui_chat_printf (NULL,
@ -3544,7 +3557,7 @@ command_uptime (void *data, struct t_gui_buffer *buffer,
sec,
GUI_COLOR(GUI_COLOR_CHAT),
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
ctime (&weechat_start_time));
util_get_time_string (&weechat_start_time));
}
return WEECHAT_RC_OK;
@ -3556,28 +3569,52 @@ command_uptime (void *data, struct t_gui_buffer *buffer,
void
command_version_display (struct t_gui_buffer *buffer,
int send_to_buffer_as_input)
int send_to_buffer_as_input,
int translated_string)
{
char string[512];
if (send_to_buffer_as_input)
{
snprintf (string, sizeof (string),
"WeeChat %s [%s %s %s]",
PACKAGE_VERSION,
_("compiled on"),
__DATE__,
__TIME__);
input_data (buffer, string);
if (weechat_upgrade_count > 0)
if (translated_string)
{
snprintf (string, sizeof (string),
_("Upgraded %d %s, first start: %s"),
weechat_upgrade_count,
NG_("time", "times", weechat_upgrade_count),
ctime (&weechat_start_time));
string[strlen (string) - 1] = '\0';
"WeeChat %s [%s %s %s]",
PACKAGE_VERSION,
_("compiled on"),
__DATE__,
__TIME__);
input_data (buffer, string);
if (weechat_upgrade_count > 0)
{
snprintf (string, sizeof (string),
_("Upgraded %d %s, first start: %s"),
weechat_upgrade_count,
/* TRANSLATORS: text is: "upgraded xx times" */
NG_("time", "times", weechat_upgrade_count),
util_get_time_string (&weechat_start_time));
input_data (buffer, string);
}
}
else
{
snprintf (string, sizeof (string),
"WeeChat %s [%s %s %s]",
PACKAGE_VERSION,
"compiled on",
__DATE__,
__TIME__);
input_data (buffer, string);
if (weechat_upgrade_count > 0)
{
snprintf (string, sizeof (string),
"Upgraded %d %s, first start: %s",
weechat_upgrade_count,
(weechat_upgrade_count > 1) ? "times" : "time",
ctime (&weechat_start_time));
string[strlen (string) - 1] = '\0';
input_data (buffer, string);
}
}
}
else
@ -3598,7 +3635,7 @@ command_version_display (struct t_gui_buffer *buffer,
weechat_upgrade_count,
/* TRANSLATORS: text is: "upgraded xx times" */
NG_("time", "times", weechat_upgrade_count),
ctime (&weechat_start_time));
util_get_time_string (&weechat_start_time));
}
}
}
@ -3611,16 +3648,28 @@ int
command_version (void *data, struct t_gui_buffer *buffer,
int argc, char **argv, char **argv_eol)
{
int send_to_buffer_as_input;
int send_to_buffer_as_input, translated_string;
/* make C compiler happy */
(void) data;
(void) argv_eol;
send_to_buffer_as_input = 0;
translated_string = 0;
if (argc >= 2)
{
if (string_strcasecmp (argv[1], "-o") == 0)
send_to_buffer_as_input = 1;
else if (string_strcasecmp (argv[1], "-ol") == 0)
{
send_to_buffer_as_input = 1;
translated_string = 1;
}
}
send_to_buffer_as_input = ((argc >= 2)
&& (string_strcasecmp (argv[1], "-o") == 0));
command_version_display (buffer, send_to_buffer_as_input);
command_version_display (buffer, send_to_buffer_as_input,
translated_string);
return WEECHAT_RC_OK;
}
@ -4424,15 +4473,21 @@ command_init ()
&command_upgrade, NULL);
hook_command (NULL, "uptime",
N_("show WeeChat uptime"),
N_("[-o]"),
N_("-o: send uptime to current buffer as input"),
"-o",
"[-o | -ol]",
N_(" -o: send uptime to current buffer as input (english "
"string)\n"
"-ol: send uptime to current buffer as input (translated "
"string)"),
"-o|-ol",
&command_uptime, NULL);
hook_command (NULL, "version",
N_("show WeeChat version and compilation date"),
N_("[-o]"),
N_("-o: send version to current buffer as input"),
"-o",
"[-o | -ol]",
N_(" -o: send version to current buffer as input (english "
"string)\n"
"-ol: send version to current buffer as input (translated "
"string)"),
"-o|-ol",
&command_version, NULL);
hook_command (NULL, "wait",
N_("schedule a command execution in future"),

View File

@ -27,6 +27,7 @@ extern int command_reload (void *data, struct t_gui_buffer *buffer,
extern void command_init ();
extern void command_startup (int plugins_looaded);
extern void command_version_display (struct t_gui_buffer *buffer,
int send_to_buffer_as_input);
int send_to_buffer_as_input,
int translated_string);
#endif /* wee-command.h */

View File

@ -105,6 +105,7 @@ struct t_config_option *config_look_scroll_amount;
struct t_config_option *config_look_scroll_page_percent;
struct t_config_option *config_look_search_text_not_found_alert;
struct t_config_option *config_look_set_title;
struct t_config_option *config_look_time_format;
/* config, colors section */
@ -1217,7 +1218,7 @@ config_weechat_init_options ()
config_look_buffer_time_format = config_file_new_option (
weechat_config_file, ptr_section,
"buffer_time_format", "string",
N_("time format for buffers"),
N_("time format for each line displayed in buffers"),
NULL, 0, 0, "%H:%M:%S", NULL, 0, NULL, NULL, &config_change_buffer_time_format, NULL, NULL, NULL);
config_look_color_nicks_number = config_file_new_option (
weechat_config_file, ptr_section,
@ -1430,6 +1431,12 @@ config_weechat_init_options ()
N_("set title for window (terminal for Curses GUI) with "
"name and version"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_title, NULL, NULL, NULL);
config_look_time_format = config_file_new_option (
weechat_config_file, ptr_section,
"time_format", "string",
N_("time format for dates converted to strings and displayed in "
"messages"),
NULL, 0, 0, "%a, %d %b %Y %T", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
/* colors */
ptr_section = config_file_new_section (weechat_config_file, "color",

View File

@ -120,6 +120,7 @@ extern struct t_config_option *config_look_scroll_amount;
extern struct t_config_option *config_look_scroll_page_percent;
extern struct t_config_option *config_look_search_text_not_found_alert;
extern struct t_config_option *config_look_set_title;
extern struct t_config_option *config_look_time_format;
extern struct t_config_option *config_color_separator;
extern struct t_config_option *config_color_bar_more;

View File

@ -123,6 +123,24 @@ util_get_time_length (const char *time_format)
return strlen (text_time);
}
/*
* util_get_time_string: converts date to a string, using format of option
* weechat.look.time_format (can be localized)
*/
char *
util_get_time_string (const time_t *date)
{
struct tm *local_time;
static char text_time[128];
local_time = localtime (date);
strftime (text_time, sizeof (text_time),
CONFIG_STRING(config_look_time_format), local_time);
return text_time;
}
/*
* util_catch_signal: catch a signal
*/

View File

@ -24,6 +24,7 @@ extern int util_timeval_cmp (struct timeval *tv1, struct timeval *tv2);
extern long util_timeval_diff (struct timeval *tv1, struct timeval *tv2);
extern void util_timeval_add (struct timeval *tv, long interval);
extern int util_get_time_length (const char *time_format);
extern char *util_get_time_string (const time_t *date);
extern void util_catch_signal (int signum, void (*handler)(int));
extern int util_mkdir_home (const char *directory, int mode);
extern int util_mkdir (const char *directory, int mode);

View File

@ -323,7 +323,7 @@ weechat_welcome_message ()
}
if (CONFIG_BOOLEAN(config_startup_display_version))
{
command_version_display (NULL, 0);
command_version_display (NULL, 0, 0);
}
if (CONFIG_BOOLEAN(config_startup_display_logo) ||
(CONFIG_STRING(config_startup_weechat_slogan)

View File

@ -338,8 +338,7 @@ irc_ctcp_replace_variables (struct t_irc_server *server, const char *format)
/* time */
now = time (NULL);
snprintf (buf, sizeof (buf), "%s",
ctime (&now));
snprintf (buf, sizeof (buf), "%s", ctime (&now));
buf[strlen (buf) - 1] = '\0';
temp = weechat_string_replace (res, "$time", buf);
free (res);

View File

@ -1095,8 +1095,8 @@ irc_protocol_cmd_pong (struct t_irc_server *server, const char *command,
/* calculate lag (time diff with lag check) */
old_lag = server->lag;
gettimeofday (&tv, NULL);
server->lag = (int) weechat_timeval_diff (&(server->lag_check_time),
&tv);
server->lag = (int) weechat_util_timeval_diff (&(server->lag_check_time),
&tv);
if (old_lag != server->lag)
weechat_bar_item_update ("lag");
@ -2122,7 +2122,7 @@ irc_protocol_cmd_317 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT,
NG_("second", "seconds", sec),
IRC_COLOR_CHAT_CHANNEL,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
else
{
@ -2150,7 +2150,7 @@ irc_protocol_cmd_317 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT,
NG_("second", "seconds", sec),
IRC_COLOR_CHAT_CHANNEL,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@ -2422,7 +2422,7 @@ irc_protocol_cmd_329 (struct t_irc_server *server, const char *command,
irc_protocol_tags (command, "irc_numeric"),
_("%sChannel created on %s"),
weechat_prefix ("network"),
ctime (&datetime));
weechat_util_get_time_string (&datetime));
ptr_channel->display_creation_date = 0;
}
}
@ -2435,7 +2435,7 @@ irc_protocol_cmd_329 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT_CHANNEL,
argv[3],
IRC_COLOR_CHAT,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@ -2587,7 +2587,7 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command,
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
argv[4],
IRC_COLOR_CHAT,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
else
{
@ -2601,7 +2601,7 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command,
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
argv[4],
IRC_COLOR_CHAT,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@ -2776,7 +2776,7 @@ irc_protocol_cmd_348 (struct t_irc_server *server, const char *command,
irc_protocol_get_address_from_host (argv[5]),
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
else
{
@ -3279,7 +3279,7 @@ irc_protocol_cmd_367 (struct t_irc_server *server, const char *command,
irc_protocol_get_address_from_host (argv[5]),
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT,
ctime (&datetime));
weechat_util_get_time_string (&datetime));
}
else
{

View File

@ -1751,8 +1751,8 @@ irc_server_timer_cb (void *data, int remaining_calls)
&& (weechat_config_integer (irc_config_network_lag_disconnect) > 0))
{
gettimeofday (&tv, NULL);
diff = (int) weechat_timeval_diff (&(ptr_server->lag_check_time),
&tv);
diff = (int) weechat_util_timeval_diff (&(ptr_server->lag_check_time),
&tv);
if (diff / 1000 > weechat_config_integer (irc_config_network_lag_disconnect) * 60)
{
weechat_printf (ptr_server->buffer,

View File

@ -409,9 +409,10 @@ plugin_load (const char *filename)
new_plugin->exec_on_files = &util_exec_on_files;
new_plugin->file_get_content = &util_file_get_content;
new_plugin->timeval_cmp = &util_timeval_cmp;
new_plugin->timeval_diff = &util_timeval_diff;
new_plugin->timeval_add = &util_timeval_add;
new_plugin->util_timeval_cmp = &util_timeval_cmp;
new_plugin->util_timeval_diff = &util_timeval_diff;
new_plugin->util_timeval_add = &util_timeval_add;
new_plugin->util_get_time_string = &util_get_time_string;
new_plugin->list_new = &weelist_new;
new_plugin->list_add = &weelist_add;

View File

@ -34,7 +34,7 @@ struct t_weelist;
struct timeval;
/* API version (used to check that plugin has same API and can be loaded) */
#define WEECHAT_PLUGIN_API_VERSION "20091218-01"
#define WEECHAT_PLUGIN_API_VERSION "20100209-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@ -199,9 +199,10 @@ struct t_weechat_plugin
char *(*file_get_content) (const char *filename);
/* util */
int (*timeval_cmp) (struct timeval *tv1, struct timeval *tv2);
long (*timeval_diff) (struct timeval *tv1, struct timeval *tv2);
void (*timeval_add) (struct timeval *tv, long interval);
int (*util_timeval_cmp) (struct timeval *tv1, struct timeval *tv2);
long (*util_timeval_diff) (struct timeval *tv1, struct timeval *tv2);
void (*util_timeval_add) (struct timeval *tv, long interval);
char *(*util_get_time_string) (const time_t *date);
/* sorted lists */
struct t_weelist *(*list_new) ();
@ -765,12 +766,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->file_get_content(__filename)
/* util */
#define weechat_timeval_cmp(__time1, __time2) \
weechat_plugin->timeval_cmp(__time1, __time2)
#define weechat_timeval_diff(__time1, __time2) \
weechat_plugin->timeval_diff(__time1, __time2)
#define weechat_timeval_add(__time, __interval) \
weechat_plugin->timeval_add(__time, __interval)
#define weechat_util_timeval_cmp(__time1, __time2) \
weechat_plugin->util_timeval_cmp(__time1, __time2)
#define weechat_util_timeval_diff(__time1, __time2) \
weechat_plugin->util_timeval_diff(__time1, __time2)
#define weechat_util_timeval_add(__time, __interval) \
weechat_plugin->util_timeval_add(__time, __interval)
#define weechat_util_get_time_string(__date) \
weechat_plugin->util_get_time_string(__date)
/* sorted list */
#define weechat_list_new() \