diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-01 09:27:57 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-01 09:27:57 +0000 |
commit | 691bd529e512097f427d230c947ff4cf0adb8a38 (patch) | |
tree | 3bdaff6c2d27ecf7d4f1ddc78d1eef87089d33ed /pop.c | |
parent | dea307bbc2b8cf7639af5a148c6146e21644e6e4 (diff) |
Adding gettext support, based on the patch by Marco d'Itri.
Diffstat (limited to 'pop.c')
-rw-r--r-- | pop.c | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -63,7 +63,7 @@ static int getPass (void) { char tmp[SHORT_STRING]; tmp[0] = '\0'; - if (mutt_get_password ("POP Password: ", tmp, sizeof (tmp)) != 0 + if (mutt_get_password (_("POP Password: "), tmp, sizeof (tmp)) != 0 || *tmp == '\0') return 0; PopPass = safe_strdup (tmp); @@ -88,13 +88,13 @@ void mutt_fetchPopMail (void) if (!PopHost) { - mutt_error ("POP host is not defined."); + mutt_error _("POP host is not defined."); return; } if (!PopUser) { - mutt_error ("No POP username is defined."); + mutt_error _("No POP username is defined."); return; } @@ -111,7 +111,7 @@ void mutt_fetchPopMail (void) /* Must be a DNS name */ if ((he = gethostbyname (NONULL(PopHost))) == NULL) { - mutt_error ("Could not find address for host %s.", PopHost); + mutt_error (_("Could not find address for host %s."), PopHost); return; } memcpy ((void *)&sin.sin_addr, *(he->h_addr_list), he->h_length); @@ -119,7 +119,7 @@ void mutt_fetchPopMail (void) else memcpy ((void *)&sin.sin_addr, (void *)&n, sizeof(n)); - mutt_message ("Connecting to %s", inet_ntoa (sin.sin_addr)); + mutt_message (_("Connecting to %s"), inet_ntoa (sin.sin_addr)); if (connect (s, (struct sockaddr *) &sin, sizeof (struct sockaddr_in)) == -1) { @@ -163,7 +163,7 @@ void mutt_fetchPopMail (void) safe_free((void **) &PopPass); /* void the given password */ mutt_remove_trailing_ws (buffer); - mutt_error (buffer[0] ? buffer : "Server closed connection!"); + mutt_error (buffer[0] ? buffer : _("Server closed connection!")); goto finish; } @@ -184,7 +184,7 @@ void mutt_fetchPopMail (void) if (msgs == 0) { - mutt_message ("No new mail in POP mailbox."); + mutt_message _("No new mail in POP mailbox."); goto finish; } @@ -192,7 +192,8 @@ void mutt_fetchPopMail (void) goto finish; snprintf (msgbuf, sizeof (msgbuf), - "Reading %d new message%s (%d bytes)...", msgs, msgs > 1 ? "s" : "", bytes); + msgs > 1 ? "_(Reading %d new message (%d bytes)...") : + ("Reading %d new messages (%d bytes)..."), msgs, bytes); mutt_message (msgbuf); for (i = 1 ; i <= msgs ; i++) @@ -227,7 +228,7 @@ void mutt_fetchPopMail (void) if ((chunk = getLine (s, buffer, sizeof (buffer))) == -1) { - mutt_error ("Error reading message!"); + mutt_error _("Error reading message!"); err = 1; break; } @@ -263,7 +264,7 @@ void mutt_fetchPopMail (void) if (mx_close_message (&msg) != 0) { - mutt_error ("Error while writing mailbox!"); + mutt_error _("Error while writing mailbox!"); err = 1; } @@ -287,7 +288,7 @@ void mutt_fetchPopMail (void) } } - mutt_message ("%s [%d messages read]", msgbuf, i); + mutt_message (_("%s [%d messages read]"), msgbuf, i); } if (msg) @@ -313,6 +314,6 @@ finish: fail: - mutt_error ("Server closed connection!"); + mutt_error _("Server closed connection!"); close (s); } |