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

Re: [LCFC] po-debconf://poker3d/fr.po



> Merci, un jour il faudra que j'apprenne à les faire tout seul.

Attention, script sale à l'horizon....



#!/bin/sh

if [ -z $1 ]
then
  echo Usage $0 fichier
  exit 1
fi
if [ ! -f $1 ]
then
  echo $1 not found.
  exit 1
fi

TEMPFILE=`tempfile`
cp $1 $1.save
sed ':a;N;$!ba;s/"\n"//g' $1 >$TEMPFILE && mv $TEMPFILE $1
cat $1 | \
  sed '/^msgstr/s/� /��/g' | \
  sed '/^msgstr/s/p\.ex\./p\.�ex\./g' | \
  sed '/^msgstr/s/par ex\./p\.�ex\./g' | \
  sed '/^msgstr/s/ �/��/g' | \
  sed '/^msgstr/s/ ?/�?/g' | \
  sed '/^msgstr/s/ !/�!/g' | \
  sed '/^msgstr/s/ :/�:/g' | \
  sed '/^msgstr/s/ ;/�;/g' | \
  sed '/^msgstr/s/ ko/�ko/g' | \
  msgcat - \
  > $TEMPFILE && mv $TEMPFILE $1

  echo -n "V�fication orthographique/typographique (O/n)? "
  read answer
  if [ "$answer" = "O" -o "$answer" = "o" -o "$answer" = "" ]
  then 
      acheck --spell --trans $1
  fi
msgfmt -o /dev/null --statistics $1
rm -f $TEMPFILE >/dev/null 2>&1
exit 0

Reply to: