mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 10:43:13 +02:00
Fixed log file when channel name contains "/" (bug #20072)
This commit is contained in:
@@ -5,6 +5,7 @@ ChangeLog - 2007-06-12
|
||||
|
||||
|
||||
Version 0.2.6 (under dev!):
|
||||
* fixed log file when channel name contains "/" (bug #20072)
|
||||
* command /away allowed when not connected to server (internally stored
|
||||
and AWAY command is sent when connecting to server) (task #7003)
|
||||
* added argument for /upgrade command (path to binary), check that
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2597,19 +2597,22 @@ msgstr "%s nemohu napojit kalávesu \"%s\" (nevalidní jméno funkce: \"%s\")\n"
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nedostatek paměti pro klávesovou zkratku\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Nedostatek paměti pro zapsání log sourobru bufferu\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Nemůžu zapsat log soubor bufferu\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Beginning of log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** End of log "
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2609,20 +2609,23 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nicht genügend Speicher für Tastenzuordnung\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
"Nicht genügend Speicher, um das Logfile für einen Puffer zu schreiben\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Kann das Logfile nicht schreiben\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Beginning of log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** End of log "
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2648,20 +2648,23 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s no hay suficiente memoria para atar la clave\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
"No hay suficiente memoria para escribir un fichero de log para un búfer\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "No es posible escribir un fichero de log para un búfer\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Comienzo del log (registro) "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Fin del log "
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"PO-Revision-Date: 2007-06-12 12:13+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-12 15:00+0200\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -2623,19 +2623,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s pas assez de mémoire pour la touche\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
msgstr "Pas assez de mémoire pour écrire un fichier log de tampon\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Pas assez de mémoire pour écrire le fichier log \"%s\"\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
msgstr "Impossible d'écrire le fichier log pour un tampon\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Impossible d'écrire le fichier log \"%s\"\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Début du log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Fin du log "
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2608,19 +2608,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nincs elég memória a billentyűhozzárendeléshez\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Nincs elegendő memória a puffer naplójának írásához\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Nem sikerült naplófájlt írni a puffernek\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Naplófájl kezdete "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Naplófájl vége "
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2588,19 +2588,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s недостаточно памяти для установки клавиши\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Недостаточно памяти для записи лог-файла буфера\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Не могу записать журнал буфера\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Начало log-файла"
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Конец log-файла"
|
||||
|
||||
|
||||
+10
-7
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+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"
|
||||
@@ -2455,19 +2455,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr ""
|
||||
|
||||
|
||||
+58
-16
@@ -108,46 +108,73 @@ gui_log_start (t_gui_buffer *buffer)
|
||||
{
|
||||
int length;
|
||||
char *log_path, *log_path2;
|
||||
char *server_name, *channel_name;
|
||||
|
||||
log_path = weechat_strreplace (cfg_log_path, "~", getenv ("HOME"));
|
||||
log_path2 = weechat_strreplace (log_path, "%h", weechat_home);
|
||||
if (!log_path || !log_path2)
|
||||
|
||||
if (SERVER(buffer))
|
||||
server_name = weechat_strreplace (SERVER(buffer)->name, DIR_SEPARATOR, "_");
|
||||
else
|
||||
server_name = NULL;
|
||||
if (CHANNEL(buffer))
|
||||
channel_name = weechat_strreplace (CHANNEL(buffer)->name, DIR_SEPARATOR, "_");
|
||||
else
|
||||
channel_name = NULL;
|
||||
|
||||
if (!log_path || !log_path2 || (SERVER(buffer) && !server_name) ||
|
||||
(CHANNEL(buffer) && !channel_name))
|
||||
{
|
||||
weechat_log_printf (_("Not enough memory to write log file for a buffer\n"));
|
||||
weechat_log_printf (_("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf_nolog (NULL, _("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
return;
|
||||
}
|
||||
|
||||
length = strlen (log_path2) + 128;
|
||||
if (SERVER(buffer))
|
||||
length += strlen (SERVER(buffer)->name);
|
||||
length += strlen (server_name);
|
||||
if (CHANNEL(buffer))
|
||||
length += strlen (CHANNEL(buffer)->name);
|
||||
length += strlen (channel_name);
|
||||
|
||||
buffer->log_filename = (char *) malloc (length);
|
||||
if (!buffer->log_filename)
|
||||
{
|
||||
weechat_log_printf (_("Not enough memory to write log file for a buffer\n"));
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
weechat_log_printf (_("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf_nolog (NULL, _("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
free (log_path);
|
||||
free (log_path2);
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy (buffer->log_filename, log_path2);
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
|
||||
free (log_path);
|
||||
free (log_path2);
|
||||
|
||||
if (buffer->log_filename[strlen (buffer->log_filename) - 1] != DIR_SEPARATOR_CHAR)
|
||||
strcat (buffer->log_filename, DIR_SEPARATOR);
|
||||
|
||||
if (SERVER(buffer))
|
||||
{
|
||||
strcat (buffer->log_filename, SERVER(buffer)->name);
|
||||
strcat (buffer->log_filename, server_name);
|
||||
strcat (buffer->log_filename, ".");
|
||||
}
|
||||
if (CHANNEL(buffer)
|
||||
@@ -157,21 +184,33 @@ gui_log_start (t_gui_buffer *buffer)
|
||||
}
|
||||
if (CHANNEL(buffer))
|
||||
{
|
||||
strcat (buffer->log_filename, CHANNEL(buffer)->name);
|
||||
strcat (buffer->log_filename, channel_name);
|
||||
strcat (buffer->log_filename, ".");
|
||||
}
|
||||
strcat (buffer->log_filename, "weechatlog");
|
||||
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
|
||||
buffer->log_file = fopen (buffer->log_filename, "a");
|
||||
if (!buffer->log_file)
|
||||
{
|
||||
weechat_log_printf (_("Unable to write log file for a buffer\n"));
|
||||
weechat_log_printf (_("Unable to write log file \"%s\"\n"),
|
||||
buffer->log_filename);
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("Unable to write log file \"%s\"\n"),
|
||||
buffer->log_filename);
|
||||
free (buffer->log_filename);
|
||||
return;
|
||||
}
|
||||
|
||||
gui_log_write (buffer, _("**** Beginning of log "));
|
||||
gui_log_write_date (buffer);
|
||||
gui_log_write (buffer, "****\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -190,5 +229,8 @@ gui_log_end (t_gui_buffer *buffer)
|
||||
buffer->log_file = NULL;
|
||||
}
|
||||
if (buffer->log_filename)
|
||||
{
|
||||
free (buffer->log_filename);
|
||||
buffer->log_filename = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ ChangeLog - 2007-06-12
|
||||
|
||||
|
||||
Version 0.2.6 (under dev!):
|
||||
* fixed log file when channel name contains "/" (bug #20072)
|
||||
* command /away allowed when not connected to server (internally stored
|
||||
and AWAY command is sent when connecting to server) (task #7003)
|
||||
* added argument for /upgrade command (path to binary), check that
|
||||
|
||||
+10
-7
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2597,19 +2597,22 @@ msgstr "%s nemohu napojit kalávesu \"%s\" (nevalidní jméno funkce: \"%s\")\n"
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nedostatek paměti pro klávesovou zkratku\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Nedostatek paměti pro zapsání log sourobru bufferu\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Nemůžu zapsat log soubor bufferu\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Beginning of log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** End of log "
|
||||
|
||||
|
||||
+10
-7
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2609,20 +2609,23 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nicht genügend Speicher für Tastenzuordnung\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
"Nicht genügend Speicher, um das Logfile für einen Puffer zu schreiben\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Kann das Logfile nicht schreiben\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Beginning of log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** End of log "
|
||||
|
||||
|
||||
+10
-7
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2648,20 +2648,23 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s no hay suficiente memoria para atar la clave\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
"No hay suficiente memoria para escribir un fichero de log para un búfer\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "No es posible escribir un fichero de log para un búfer\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Comienzo del log (registro) "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Fin del log "
|
||||
|
||||
|
||||
+13
-10
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"PO-Revision-Date: 2007-06-12 12:13+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-12 15:00+0200\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -2623,19 +2623,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s pas assez de mémoire pour la touche\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
msgstr "Pas assez de mémoire pour écrire un fichier log de tampon\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Pas assez de mémoire pour écrire le fichier log \"%s\"\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
msgstr "Impossible d'écrire le fichier log pour un tampon\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Impossible d'écrire le fichier log \"%s\"\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Début du log "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Fin du log "
|
||||
|
||||
|
||||
+10
-7
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2608,19 +2608,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s nincs elég memória a billentyűhozzárendeléshez\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Nincs elegendő memória a puffer naplójának írásához\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Nem sikerült naplófájlt írni a puffernek\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Naplófájl kezdete "
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Naplófájl vége "
|
||||
|
||||
|
||||
+10
-7
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.6-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+0200\n"
|
||||
"PO-Revision-Date: 2007-06-07 18:02+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2588,19 +2588,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr "%s недостаточно памяти для установки клавиши\n"
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, fuzzy, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr "Недостаточно памяти для записи лог-файла буфера\n"
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, fuzzy, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr "Не могу записать журнал буфера\n"
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr "**** Начало log-файла"
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr "**** Конец log-файла"
|
||||
|
||||
|
||||
+10
-7
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2007-06-12 12:11+0200\n"
|
||||
"POT-Creation-Date: 2007-06-12 14:59+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"
|
||||
@@ -2455,19 +2455,22 @@ msgstr ""
|
||||
msgid "%s not enough memory for key binding\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:116 src/gui/gui-log.c:132
|
||||
msgid "Not enough memory to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:128 src/gui/gui-log.c:131 src/gui/gui-log.c:153
|
||||
#: src/gui/gui-log.c:156
|
||||
#, c-format
|
||||
msgid "Not enough memory to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:168
|
||||
msgid "Unable to write log file for a buffer\n"
|
||||
#: src/gui/gui-log.c:200 src/gui/gui-log.c:203
|
||||
#, c-format
|
||||
msgid "Unable to write log file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:172
|
||||
#: src/gui/gui-log.c:209
|
||||
msgid "**** Beginning of log "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/gui-log.c:186
|
||||
#: src/gui/gui-log.c:225
|
||||
msgid "**** End of log "
|
||||
msgstr ""
|
||||
|
||||
|
||||
+58
-16
@@ -108,46 +108,73 @@ gui_log_start (t_gui_buffer *buffer)
|
||||
{
|
||||
int length;
|
||||
char *log_path, *log_path2;
|
||||
char *server_name, *channel_name;
|
||||
|
||||
log_path = weechat_strreplace (cfg_log_path, "~", getenv ("HOME"));
|
||||
log_path2 = weechat_strreplace (log_path, "%h", weechat_home);
|
||||
if (!log_path || !log_path2)
|
||||
|
||||
if (SERVER(buffer))
|
||||
server_name = weechat_strreplace (SERVER(buffer)->name, DIR_SEPARATOR, "_");
|
||||
else
|
||||
server_name = NULL;
|
||||
if (CHANNEL(buffer))
|
||||
channel_name = weechat_strreplace (CHANNEL(buffer)->name, DIR_SEPARATOR, "_");
|
||||
else
|
||||
channel_name = NULL;
|
||||
|
||||
if (!log_path || !log_path2 || (SERVER(buffer) && !server_name) ||
|
||||
(CHANNEL(buffer) && !channel_name))
|
||||
{
|
||||
weechat_log_printf (_("Not enough memory to write log file for a buffer\n"));
|
||||
weechat_log_printf (_("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf_nolog (NULL, _("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
return;
|
||||
}
|
||||
|
||||
length = strlen (log_path2) + 128;
|
||||
if (SERVER(buffer))
|
||||
length += strlen (SERVER(buffer)->name);
|
||||
length += strlen (server_name);
|
||||
if (CHANNEL(buffer))
|
||||
length += strlen (CHANNEL(buffer)->name);
|
||||
length += strlen (channel_name);
|
||||
|
||||
buffer->log_filename = (char *) malloc (length);
|
||||
if (!buffer->log_filename)
|
||||
{
|
||||
weechat_log_printf (_("Not enough memory to write log file for a buffer\n"));
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
weechat_log_printf (_("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf_nolog (NULL, _("Not enough memory to write log file \"%s\"\n"),
|
||||
(log_path2) ? log_path2 : ((log_path) ? log_path : cfg_log_path));
|
||||
free (log_path);
|
||||
free (log_path2);
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy (buffer->log_filename, log_path2);
|
||||
if (log_path)
|
||||
free (log_path);
|
||||
if (log_path2)
|
||||
free (log_path2);
|
||||
|
||||
free (log_path);
|
||||
free (log_path2);
|
||||
|
||||
if (buffer->log_filename[strlen (buffer->log_filename) - 1] != DIR_SEPARATOR_CHAR)
|
||||
strcat (buffer->log_filename, DIR_SEPARATOR);
|
||||
|
||||
if (SERVER(buffer))
|
||||
{
|
||||
strcat (buffer->log_filename, SERVER(buffer)->name);
|
||||
strcat (buffer->log_filename, server_name);
|
||||
strcat (buffer->log_filename, ".");
|
||||
}
|
||||
if (CHANNEL(buffer)
|
||||
@@ -157,21 +184,33 @@ gui_log_start (t_gui_buffer *buffer)
|
||||
}
|
||||
if (CHANNEL(buffer))
|
||||
{
|
||||
strcat (buffer->log_filename, CHANNEL(buffer)->name);
|
||||
strcat (buffer->log_filename, channel_name);
|
||||
strcat (buffer->log_filename, ".");
|
||||
}
|
||||
strcat (buffer->log_filename, "weechatlog");
|
||||
|
||||
if (server_name)
|
||||
free (server_name);
|
||||
if (channel_name)
|
||||
free (channel_name);
|
||||
|
||||
buffer->log_file = fopen (buffer->log_filename, "a");
|
||||
if (!buffer->log_file)
|
||||
{
|
||||
weechat_log_printf (_("Unable to write log file for a buffer\n"));
|
||||
weechat_log_printf (_("Unable to write log file \"%s\"\n"),
|
||||
buffer->log_filename);
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("Unable to write log file \"%s\"\n"),
|
||||
buffer->log_filename);
|
||||
free (buffer->log_filename);
|
||||
return;
|
||||
}
|
||||
|
||||
gui_log_write (buffer, _("**** Beginning of log "));
|
||||
gui_log_write_date (buffer);
|
||||
gui_log_write (buffer, "****\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -190,5 +229,8 @@ gui_log_end (t_gui_buffer *buffer)
|
||||
buffer->log_file = NULL;
|
||||
}
|
||||
if (buffer->log_filename)
|
||||
{
|
||||
free (buffer->log_filename);
|
||||
buffer->log_filename = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user