Applied patches from Recai

SVN revision: 1639
This commit is contained in:
Stefan Ritt 2006-01-27 08:00:19 +00:00
parent a6d201e650
commit 2c4bd8fa44
17 changed files with 2947 additions and 3090 deletions

View File

@ -89,23 +89,15 @@ debug: src/elogd.c regex.o mxml.o strlcpy.o
$(CC) $(CFLAGS) -o $@ $< $(LIBS) $(CC) $(CFLAGS) -o $@ $< $(LIBS)
indent: indent:
indent $(IFLAGS) src/elogd.c for src in src/*.c; do \
indent $(IFLAGS) src/elog.c indent $(IFLAGS) $$src; \
indent $(IFLAGS) src/elconv.c done
indent $(IFLAGS) src/locext.c
loc: locext: src/locext.c
locext src\elogd.c resources\eloglang.brazilian loc: locext
locext src\elogd.c resources\eloglang.bulgarian @for lang in resources/eloglang*; do \
locext src\elogd.c resources\eloglang.dutch ./locext src/elogd.c $$lang; echo locext src/elogd.c $$lang;\
locext src\elogd.c resources\eloglang.french done
locext src\elogd.c resources\eloglang.german
locext src\elogd.c resources\eloglang.spanish
locext src\elogd.c resources\eloglang.italian
locext src\elogd.c resources\eloglang.japanese
locext src\elogd.c resources\eloglang.danish
locext src\elogd.c resources\eloglang.zh_CN-GB2312
locext src\elogd.c resources\eloglang.zh_CN-UTF8
update: $(EXECS) update: $(EXECS)
@$(INSTALL) -v -m 0755 -o ${BINOWNER} -g ${BINGROUP} elogd $(SDESTDIR) @$(INSTALL) -v -m 0755 -o ${BINOWNER} -g ${BINGROUP} elogd $(SDESTDIR)
@ -146,5 +138,5 @@ install: $(EXECS)
restart: restart:
$(RCDIR)/elogd restart $(RCDIR)/elogd restart
clean: clean:
-$(RM) *~ $(EXECS) regex.o mxml.o strlcpy.o -$(RM) *~ $(EXECS) regex.o mxml.o strlcpy.o locext

View File

@ -2,7 +2,7 @@
Name: elog Name: elog
Summary: elog is a standalone electronic web logbook Summary: elog is a standalone electronic web logbook
Version: 2.6.0 Version: 2.6.1
Release: 1 Release: 1
Copyright: GPL Copyright: GPL
Group: Applications/Networking Group: Applications/Networking

View File

@ -405,3 +405,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -407,3 +407,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -405,3 +405,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -408,3 +408,6 @@ Enable email notifications =
text = text =
From = From =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -401,3 +401,10 @@ Entry size too large for email notification = La taille de l'entr
Please specify a valid email address = Merci de spécifier une adresse mél valide Please specify a valid email address = Merci de spécifier une adresse mél valide
Cannot send email notification to "%s" = Impossible d'adresser la notification par mél à l'adresse "%s" Cannot send email notification to "%s" = Impossible d'adresser la notification par mél à l'adresse "%s"
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Erreur : la commande "<b>%s</b>" n'est pas autorisée pour l'utilisateur "<b>%s</b>" Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Erreur : la commande "<b>%s</b>" n'est pas autorisée pour l'utilisateur "<b>%s</b>"
#
#---- please translate following items and then remove this comment ----#
#
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -400,3 +400,10 @@ Entry size too large for email notification = Eintrag zu gro
Please specify a valid email address = Bitte eine gültige Email-Adresse eingeben Please specify a valid email address = Bitte eine gültige Email-Adresse eingeben
Cannot send email notification to "%s" = Kann Email-Benachrichtigung nicht an "%s" senden Cannot send email notification to "%s" = Kann Email-Benachrichtigung nicht an "%s" senden
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Fehler: Kommando "<b>%s</b>" ist nicht erlaubt für Benutzer "<b>%s</b>" Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Fehler: Kommando "<b>%s</b>" ist nicht erlaubt für Benutzer "<b>%s</b>"
#
#---- please translate following items and then remove this comment ----#
#
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -403,3 +403,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -403,3 +403,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -405,3 +405,6 @@ Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -32,7 +32,6 @@ Copy to = Kopyala
Move to = Taşı Move to = Taşı
Save = Kaydet Save = Kaydet
Cancel = Çık Cancel = Çık
Go to = Git
Wrong password = Yanlış parola Wrong password = Yanlış parola
Please login = Lütfen oturum açın Please login = Lütfen oturum açın
Username = Kullanıcı adı Username = Kullanıcı adı
@ -54,11 +53,9 @@ This is the first entry = Bu ilk girdidir
Email sent to = E-posta gönder Email sent to = E-posta gönder
Email notification suppressed = E-posta bildirimi kesildi Email notification suppressed = E-posta bildirimi kesildi
please select = lütfen seçin please select = lütfen seçin
Submit as HTML text = HTML metin olarak onayla
Suppress Email notification = E-posta bildirimini kes Suppress Email notification = E-posta bildirimini kes
Resubmit as new entry = Yeni kayıt olarak tekrar gönder Resubmit as new entry = Yeni kayıt olarak tekrar gönder
Attachment = Ek Attachment = Ek
Attachments = Ekler
Reply to this = Bunu yanıtla Reply to this = Bunu yanıtla
In reply to = Cevapla In reply to = Cevapla
Fields marked with = İşaretlenmiş alanlar Fields marked with = İşaretlenmiş alanlar
@ -86,7 +83,6 @@ Last %d entries = Son %d girdi
No entries found = Kayıt bulunamadı No entries found = Kayıt bulunamadı
A new entry has been submitted on %s = Yeni kayıt %s tarihinde onaylanmış A new entry has been submitted on %s = Yeni kayıt %s tarihinde onaylanmış
Logbook = Kayıt defteri Logbook = Kayıt defteri
Copy ELog entry = Elog kaydını kopyala
Yes = Evet Yes = Evet
No = Hayır No = Hayır
Error deleting message: status = Mesajı silerken hata: durum Error deleting message: status = Mesajı silerken hata: durum
@ -154,16 +150,8 @@ Upload = Yükle
Requested = İstenmiş Requested = İstenmiş
Registration request on logbook "%s" = "%s" kayıt defterinde kayıt isteği Registration request on logbook "%s" = "%s" kayıt defterinde kayıt isteği
A new ELOG user wants to register on "%s" = Yeni ELOG kullanıcısı "%s"'na kayıt olmak istiyor A new ELOG user wants to register on "%s" = Yeni ELOG kullanıcısı "%s"'na kayıt olmak istiyor
%d messages = %d mesaj
and its replies = ve onun cevapları
and their replies = ve onların cevapları
moved successfully from "%s" to "%s" = "%s"'dan "%s"'ya başarıyla taşındı
copied successfully from "%s" to "%s" = "%s"'dan "%s"'ya başarıyla kopyalandı
Only user <i>%s</i> can delete this entry = Yalnızca <i>%s</i> kullanıcısı bu girdiyi silebilir Only user <i>%s</i> can delete this entry = Yalnızca <i>%s</i> kullanıcısı bu girdiyi silebilir
Search text also in attributes = Metni özellikler içinde de ara Search text also in attributes = Metni özellikler içinde de ara
Goto logbook selection page = Kayıt defteri sayfa seçime git
Login as different user = Farklı kullanıcı olarak oturum aç
User <i>"%s"</i> has no access to logbook <i>"%s"</i> = <i>"%s"</i> kullanıcısının, <i>"%s"</i> kayıt defteri erişim yetkisi yoktur
Date = Tarih Date = Tarih
ID = ID ID = ID
Remember me on this computer = Bu bilgisayarda beni hatırla Remember me on this computer = Bu bilgisayarda beni hatırla
@ -182,7 +170,6 @@ Password recovery for ELOG %s = ELOG %s için parola yenileme
Host = Makine (Host) Host = Makine (Host)
Your ELOG account has been activated = ELOG hesabınız etkinleştirildi Your ELOG account has been activated = ELOG hesabınız etkinleştirildi
Maximum number of attachments reached = Ekler için azami sayıya ulaşıldı Maximum number of attachments reached = Ekler için azami sayıya ulaşıldı
Invalid user name <i>"%s"</i> = <i>"%s"</i> geçersiz kullanıcı adı
on = üstünde on = üstünde
Entry is currently edited by = Girdi şu an düzenlendi Entry is currently edited by = Girdi şu an düzenlendi
recipients = alıcılar recipients = alıcılar
@ -221,15 +208,11 @@ Local entry submitted = Yerel girdi onaylandı
Error deleting remote entry = Uzaktaki girdiyi silerken hata Error deleting remote entry = Uzaktaki girdiyi silerken hata
New entry cannot be written to directory "%s" = Yeni girdi, "%s" klasörüne yazılamaz New entry cannot be written to directory "%s" = Yeni girdi, "%s" klasörüne yazılamaz
Entry %s cannot be read from logbook "%s" = Girdi, "%s" kayıt defterinden okunamaz Entry %s cannot be read from logbook "%s" = Girdi, "%s" kayıt defterinden okunamaz
No entry selected = Girdi seçilmedi
One entry = Bir girdi
This entry has been deleted = Bu girdi silindi This entry has been deleted = Bu girdi silindi
Entries = Girdi Entries = Girdi
Cannot connect to remote server "%s" = "%s" uzak sunucusuna bağlanılamadı Cannot connect to remote server "%s" = "%s" uzak sunucusuna bağlanılamadı
Remote server is not an ELOG server = Uzak sunucu ELOG sunucusu değil Remote server is not an ELOG server = Uzak sunucu ELOG sunucusu değil
Incorrect remote ELOG server version %s = Hatalı uzak ELOG sunucu sürümü %s Incorrect remote ELOG server version %s = Hatalı uzak ELOG sunucu sürümü %s
User "%s" has no access to remote logbook = "%s" kullanıcısının uzak kayıt defterine erişim hakkı yok
Passwords for user "%s" do not match locally and remotely = Yerel ve uzaktaki "%s" kullanıcısı için parolalar uyuşmuyor
Error accessing remote logbook = Uzak kayıt defterine erişirken hata Error accessing remote logbook = Uzak kayıt defterine erişirken hata
Invalid HTTP header = Geçersiz HTTP başlığı Invalid HTTP header = Geçersiz HTTP başlığı
No user name supplied to access remote logbook = Uzak kayıt defterine erişim için kullanıcı adı mevcut değil No user name supplied to access remote logbook = Uzak kayıt defterine erişim için kullanıcı adı mevcut değil
@ -337,7 +320,6 @@ Hide all = Tümünü sakla
Show all = Tümünü göster Show all = Tümünü göster
This logbook requires authentication = Bu kayıt defteri kimlik denetimi gerektiriyor This logbook requires authentication = Bu kayıt defteri kimlik denetimi gerektiriyor
Attachment file <b>"%s"</b> empty or not found = <b>"%s"</b> ek dosyası boş veya bulunamadı Attachment file <b>"%s"</b> empty or not found = <b>"%s"</b> ek dosyası boş veya bulunamadı
Text fields may contain regular expressions = Metin alanları kurallara uygun ifadeler içermeli
Case sensitive = Büyük, küçük harf duyarlı Case sensitive = Büyük, küçük harf duyarlı
List = Liste List = Liste
Date must be between 1970 and 2037 = Tarih 1970 - 2037 arasında olmalı Date must be between 1970 and 2037 = Tarih 1970 - 2037 arasında olmalı
@ -346,3 +328,85 @@ down = aşağı
stop = dur stop = dur
Entry = Girdi Entry = Girdi
name may not contain blanks = isim boşluk içermemeli name may not contain blanks = isim boşluk içermemeli
#
#---- please translate following items and then remove this comment ----#
#
Shell execution not enabled via -x flag =
Cannot lookup server name =
Cannot connect to server =
Entry size too large for email notification =
%s wrote =
Quote =
Insert current time =
Please enter hour for attribute '%s' =
Please enter minute for attribute '%s' =
Please enter second for attribute '%s' =
Please enter numeric value for year of attribute '%s' =
Enter name of hyperlink =
Enter URL of hyperlink =
Enter heading level (1, 2 or 3) =
Preview =
bold text =
italics text =
underlined text =
centered text =
insert hyperlink =
insert email =
insert image =
insert quote =
insert list =
insert heading =
insert code =
hide the smiley bar =
show the smiley bar =
FONT =
SIZE =
COLOR =
smiling =
happy =
winking =
big grin =
crying =
cool =
frowning =
confused =
astonished =
mad =
pleased =
tongue =
yawn =
Encoding =
regular expressions =
Text fields are treated as %s =
Please specify a valid email address =
Cannot send email notification to "%s" =
No admin user has been defined in configuration file =
User "%s" not found in password file =
Cannot write to file <b>%s</b> =
Really remove user %s? =
Subscribe to logbooks =
enable automatic email notifications =
Set all =
Set none =
Invalid user name "%s" or password for remote logbook =
Hide attachments =
Show only new entries =
Show all entries =
Error in regular expression "%s" =
New entries since =
A old ELOG entry has been updated =
A new ELOG entry has been submitted =
Cannot open file "%s" =
Invalid user name or password =
Upload image =
Please enter filename or URL =
Maximum allowed file size is =
Enter filename or URL =
Image uploaded successfully =
Image "%s" uploaded successfully =
Duplicate =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
HelpELCode =
Cannot retrieve file from URL "%s" =
File not found at URL "%s" =

View File

@ -401,7 +401,10 @@ Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" = File not found at URL "%s" =
Entry size too large for email notification = Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -401,7 +401,10 @@ Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" = File not found at URL "%s" =
Entry size too large for email notification = Entry size too large for email notification =
Please specify a valid email address = Please specify a valid email address =
Cannot send email notification to "%s" = Cannot send email notification to "%s" =
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" =
Shell execution not enabled via -x flag =
Enter heading level (1, 2 or 3) =
insert heading =

View File

@ -206,7 +206,7 @@ int _attachment_size;
int _max_content_length = MAX_CONTENT_LENGTH; int _max_content_length = MAX_CONTENT_LENGTH;
struct in_addr rem_addr; struct in_addr rem_addr;
char rem_host[256]; char rem_host[256];
char rem_host_ip[256]; char rem_host_ip[256];
int _sock; int _sock;
BOOL verbose, use_keepalive, enable_execute = FALSE; BOOL verbose, use_keepalive, enable_execute = FALSE;
int _current_message_id; int _current_message_id;
@ -1435,7 +1435,7 @@ void base64_encode(unsigned char *s, unsigned char *d, int size)
*(d + 0) = map[t & 63]; *(d + 0) = map[t & 63];
d += 4; d += 4;
if (d-p >= size-3) if (d - p >= size - 3)
return; return;
} }
*d = 0; *d = 0;
@ -1986,8 +1986,8 @@ void compose_email_header(LOGBOOK * lbs, char *subject, char *from, char *to,
strlcat(subject_enc, "=?", sizeof(subject_enc)); strlcat(subject_enc, "=?", sizeof(subject_enc));
strlcat(subject_enc, charset, sizeof(subject_enc)); strlcat(subject_enc, charset, sizeof(subject_enc));
strlcat(subject_enc, "?B?", sizeof(subject_enc)); strlcat(subject_enc, "?B?", sizeof(subject_enc));
base64_encode((unsigned char *) buffer, (unsigned char *) (subject_enc + strlen(subject_enc)), base64_encode((unsigned char *) buffer, (unsigned char *) (subject_enc + strlen(subject_enc)),
sizeof(subject_enc)-strlen(subject_enc)); sizeof(subject_enc) - strlen(subject_enc));
strlcat(subject_enc, "?=", sizeof(subject_enc)); strlcat(subject_enc, "?=", sizeof(subject_enc));
if (strlen(subject + i) < 40) if (strlen(subject + i) < 40)
break; break;
@ -8197,7 +8197,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
attrib[MAX_N_ATTR][NAME_LENGTH], *text, orig_tag[80], reply_tag[MAX_REPLY_TO * 10], attrib[MAX_N_ATTR][NAME_LENGTH], *text, orig_tag[80], reply_tag[MAX_REPLY_TO * 10],
att[MAX_ATTACHMENTS][256], encoding[80], slist[MAX_N_ATTR + 10][NAME_LENGTH], att[MAX_ATTACHMENTS][256], encoding[80], slist[MAX_N_ATTR + 10][NAME_LENGTH],
svalue[MAX_N_ATTR + 10][NAME_LENGTH], owner[256], locked_by[256], class_value[80], class_name[80], svalue[MAX_N_ATTR + 10][NAME_LENGTH], owner[256], locked_by[256], class_value[80], class_name[80],
ua[NAME_LENGTH], mid[80], title[256], login_name[256], cookie[256], orig_author[256], ua[NAME_LENGTH], mid[80], title[256], login_name[256], cookie[256], orig_author[256],
attr_moptions[MAX_N_LIST][NAME_LENGTH]; attr_moptions[MAX_N_LIST][NAME_LENGTH];
time_t now, ltime; time_t now, ltime;
char fl[8][NAME_LENGTH]; char fl[8][NAME_LENGTH];
@ -9111,7 +9111,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("<span style=\"white-space:nowrap;\">\n"); rsprintf("<span style=\"white-space:nowrap;\">\n");
for (j=0 ; j<n_moptions ; j++) for (j = 0; j < n_moptions; j++)
if (strcmp(attr_moptions[j], attr_options[index][i]) == 0) if (strcmp(attr_moptions[j], attr_options[index][i]) == 0)
break; break;
@ -18447,13 +18447,13 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id,
status = sendmail(lbs, smtp_host, mail_from, mail_to, mail_text, error, sizeof(error)); status = sendmail(lbs, smtp_host, mail_from, mail_to, mail_text, error, sizeof(error));
/* /*
{ {
int fh; int fh;
fh = open("mail.html", O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, 0644); fh = open("mail.html", O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, 0644);
write(fh, mail_text, strlen(mail_text)); write(fh, mail_text, strlen(mail_text));
close(fh); close(fh);
} }
*/ */
if (status < 0) { if (status < 0) {
sprintf(str, loc("Error sending Email via <i>\"%s\"</i>"), smtp_host); sprintf(str, loc("Error sending Email via <i>\"%s\"</i>"), smtp_host);

View File

@ -35,6 +35,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <ctype.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#include <windows.h> #include <windows.h>
@ -76,7 +77,7 @@ int scan_file(char *infile, char *outfile)
read_buf(infile, &buf); read_buf(infile, &buf);
p = buf; p = buf;
first = TRUE; first = 1;
do { do {
p = strstr(p, "loc(\""); p = strstr(p, "loc(\"");
@ -98,14 +99,14 @@ int scan_file(char *infile, char *outfile)
} }
size = (int) p2 - (int) p; size = (int) p2 - (int) p;
if (size >= sizeof(str)) { if (size >= (int)sizeof(str)) {
printf("Error: string too long\n"); printf("Error: string too long\n");
free(buf); free(buf);
return 1; return 1;
} }
memset(str, 0, sizeof(str)); memset(str, 0, sizeof(str));
memcpy(str, p, min(size, sizeof(str))); memcpy(str, p, size < (int)sizeof(str) ? size : (int)sizeof(str));
/* convert \" to " */ /* convert \" to " */
for (p2 = str; *p2; p2++) for (p2 = str; *p2; p2++)
@ -130,7 +131,7 @@ int scan_file(char *infile, char *outfile)
"\r\n#\r\n#---- please translate following items and then remove this comment ----#\r\n#\r\n"); "\r\n#\r\n#---- please translate following items and then remove this comment ----#\r\n#\r\n");
write(fho, line, strlen(line)); write(fho, line, strlen(line));
first = FALSE; first = 0;
} }
sprintf(line, "%s = \r\n", str); sprintf(line, "%s = \r\n", str);

File diff suppressed because it is too large Load Diff