#!/bin/sh
# Usage: po_header lang
# This file uses GNU ls option `--full-time'

if [ $# != 1 ] ; then
  echo "Usage: $0 lang" 1>&2
  exit 1
fi

lang="$1"

case "$lang" in
  t)  lang="xx"
      language="Template"
      authors="Bruno Haible, Michael Stoll, Marcus Daniels, Sam Steingold"
      ;;
  en) language="English"
      authors="Bruno Haible, Marcus Daniels, Sam Steingold"
      ;;
  *) echo "Language $lang is not built-in." 1>&2
     exit 1
     ;;
esac

version=`cat ../VERSION`
date_now=`date +'%Y-%m-%d %T %Z'`
year=`date +'%Y'`;
if test $lang = xx; then
  date_pot="$date_now"
else
  date_pot=`LC_ALL=C ls -l --full-time clisp.pot | head -1 | awk '{ print $6" "$7" "$8" "$9" "$10 }'`
  date_pot=`date +'%Y-%m-%d %T %Z' -d "$date_pot"`
fi

cat << EOF
# ${language} messages for CLISP
# Copyright (C) 1992-${year} ${authors}
#
msgid ""
msgstr ""
"Project-Id-Version: clisp ${version}\n"
"POT-Creation-Date: ${date_pot}\n"
"PO-Revision-Date: ${date_now}\n"
"Last-Translator: Automatically generated <${LOGNAME}@`hostname`>\n"
"Language-Team: ${language} <${lang}@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
EOF

