]> git.pld-linux.org Git - packages/elinks.git/commitdiff
- date format is locale-dependent - so allow to localize it
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 2 Dec 2007 01:11:41 +0000 (01:11 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    elinks-date-format.patch -> 1.1

elinks-date-format.patch [new file with mode: 0644]

diff --git a/elinks-date-format.patch b/elinks-date-format.patch
new file mode 100644 (file)
index 0000000..48d3941
--- /dev/null
@@ -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"
This page took 0.137375 seconds and 4 git commands to generate.