SOURCES: elinks-date-format.patch (NEW) - date format is locale-de...
qboosh
qboosh at pld-linux.org
Sun Dec 2 02:11:46 CET 2007
Author: qboosh Date: Sun Dec 2 01:11:46 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- date format is locale-dependent - so allow to localize it
---- Files affected:
SOURCES:
elinks-date-format.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/elinks-date-format.patch
diff -u /dev/null SOURCES/elinks-date-format.patch:1.1
--- /dev/null Sun Dec 2 02:11:46 2007
+++ SOURCES/elinks-date-format.patch Sun Dec 2 02:11:41 2007
@@ -0,0 +1,84 @@
+--- elinks-0.11.3/src/util/file.c.orig 2007-12-02 01:03:26.631355000 +0100
++++ elinks-0.11.3/src/util/file.c 2007-12-02 01:19:06.416911036 +0100
+@@ -461,16 +461,16 @@ stat_date(struct string *string, struct
+
+ if (current_time > when + 6L * 30L * 24L * 60L * 60L
+ || current_time < when - 60L * 60L)
+- fmt = "%b %e %Y";
++ fmt = gettext("%b %e %Y");
+ else
+- fmt = "%b %e %H:%M";
++ fmt = gettext("%b %e %H:%M");
+
+ add_date_to_string(string, fmt, &when);
+ add_char_to_string(string, ' ');
+ return;
+ }
+ #endif
+- add_to_string(string, " ");
++ add_to_string(string, gettext(" "));
+ }
+
+
+--- elinks-0.11.3/src/protocol/ftp/ftp.c.orig 2007-12-02 01:03:26.739361000 +0100
++++ elinks-0.11.3/src/protocol/ftp/ftp.c 2007-12-02 01:23:34.644196437 +0100
+@@ -1147,7 +1147,7 @@ display_dir_entry(struct cache_entry *ca
+ time_t when = ftp_info->mtime;
+ struct tm *when_tm;
+ unsigned char *fmt;
+- unsigned char date[13];
++ unsigned char date[MAX_STR_LEN];
+ int wr;
+
+ if (ftp_info->local_time_zone)
+@@ -1157,20 +1157,19 @@ display_dir_entry(struct cache_entry *ca
+
+ if (current_time > when + 6L * 30L * 24L * 60L * 60L
+ || current_time < when - 60L * 60L)
+- fmt = "%b %e %Y";
++ fmt = gettext("%b %e %Y");
+ else
+- fmt = "%b %e %H:%M";
++ fmt = gettext("%b %e %H:%M");
+
+- wr = strftime(date, sizeof(date), fmt, when_tm);
+-
+- while (wr < sizeof(date) - 1) date[wr++] = ' ';
+- date[sizeof(date) - 1] = '\0';
+- add_to_string(&string, date);
++ if (strftime(date, sizeof(date), fmt, when_tm) <= 0)
++ add_to_string(&string, gettext(" "));
++ else {
++ add_to_string(&string, date);
++ add_char_to_string(&string, ' ');
++ }
+ } else
+ #endif
+- add_to_string(&string, " ");
+-
+- add_char_to_string(&string, ' ');
++ add_to_string(&string, gettext(" "));
+
+ if (ftp_info->type == FTP_FILE_DIRECTORY && colorize_dir) {
+ add_to_string(&string, "<font color=\"");
+--- elinks-0.11.3/po/pl.po.orig 2007-04-15 22:51:02.000000000 +0200
++++ elinks-0.11.3/po/pl.po 2007-12-02 01:29:45.701341779 +0100
+@@ -7428,6 +7428,18 @@
+ msgid "Use EPSV instead of EPRT (passive vs active mode, IPv6 only)."
+ msgstr "U¿ywaj EPSV zamiast EPRT (tryb pasywny kontra aktywny, tylko IPv6)."
+
++#: src/protocol/ftp/ftp.c:1160 src/util/file.c:464
++msgid "%b %e %Y"
++msgstr "%e.%m.%Y "
++
++#: src/protocol/ftp/ftp.c:1162 src/util/file.c:466
++msgid "%b %e %H:%M"
++msgstr "%e.%m %H:%M"
++
++#: src/protocol/ftp/ftp.c:1165 src/protocol/ftp/ftp.c:1172 src/util/file.c:473
++msgid " "
++msgstr " "
++
+ #. name:
+ #: src/protocol/gopher/gopher.c:46
+ msgid "Gopher"
================================================================
More information about the pld-cvs-commit
mailing list