Article View: news.software.readers
Article #39096Slrn: customizing dates in attributions with slang
From: he... Heikki Kantola
Date: Wed, 25 Feb 1998 00:00
Date: Wed, 25 Feb 1998 00:00
26 lines
1971 bytes
1971 bytes
As unfortunately Slrn and slang don't support locales and especially formatting localized dates with strftime(), I've been trying to write macros to translate the dates. Writing the code to do the actual conversion has been easy (just extract parts of date with strchopr() and then construct new date string by changing what is needed). But getting this function to insert correct date into attributions has proven to be quite a problem. First I tried to change attribution within article_mode_hook() as the change has to be group specific, I don't want Finnish dates into English-language newsgroups and vice versa. I found out that didn't work except for the first article of the group as that hook is executed just once per group. So, tried moving the code into followup_hook(), which appears to work fine in some places, but rather often I also get a stack overflow... So, any hints how to get nice localized dates in attributions? I don't feel like trying to snitch locale code from Mutt mail reader and patching Slrn with it just now... -- Heikki "Hezu" Kantola, <Heikki...@IKI.FI> Lähettämällä mainoksia tai muuta asiatonta sähköpostia yllä olevaan osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta tunnilta.
Technical Details
Message-ID:
<slrn6f7o9a.61p.hezu@tuuri.ling.helsinki.fi>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <slrn6f7o9a.61p.hezu@tuuri.ling.helsinki.fi> Subject: Slrn: customizing dates in attributions with slang Date: Wed, 25 Feb 1998 00:00:00 +0000 From: he...@iki.fi (Heikki Kantola) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 328651083 Content-Transfer-Encoding: 8bit Mail-Copies-To: never Content-Type: text/plain; charset=iso-8859-1 Organization: Department of General Wizardry, Unseen University, Ankh-Morpork Mime-Version: 1.0 Newsgroups: news.software.readers,alt.lang.s-lang