[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A few comments on recent changes

On Fri, 25 Aug 2000, treacy@debian.org wrote:

> Note that the file does not currently use slices. If you feel the
> current format for information in releases/info is not appropriate
> for your language we can easily change to using slices.

At least I would like to get release date formatted per language
basis.  As a finnish speaker, it would be much nicer to have
"14. elokuuta 2000" than "2000-08-14".

Maybe easier way than slices for this would be adding small perl code,
which would use glibc's locales.  I already made some experiments with
this, problem with this code is that it requires area part to locale

Here is my perl code:
#!/usr/bin/perl -w
#require 5.004;
# use strict;

use POSIX qw(locale_h);
use POSIX qw(strftime);
use Date::Parse;

setlocale(LC_TIME, "");

print strftime "%x\n", gmtime(str2time("2000-08-15"));

Here are the example commands to trigger problem mentioned above:

$ LC_TIME=fi perl time.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "fi",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
$ LC_TIME=fi_FI perl time.pl

And also to note, even this is suboptimal, I prefer "14. elokuuta
2000" to "14.08.2000", because it just sounds better inside sentence,
latter would appropriate when date is alone.

Tommi Vainikainen

Reply to: