Skip to content

Commit

Permalink
i18n strings and gettext stuff
Browse files Browse the repository at this point in the history
Author: jgg
Date: 2002-10-16 05:21:53 GMT
i18n strings and gettext stuff
  • Loading branch information
Arch Librarian committed Sep 20, 2004
1 parent 8c4bad4 commit a8c2695
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
27 changes: 15 additions & 12 deletions dselect/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
#!/bin/bash

# Set the textdomain for the translations using $"..."
TEXTDOMAIN="apt"

# Get the configuration from /etc/apt/apt.conf
CLEAN="prompt"
Expand Down Expand Up @@ -26,7 +29,7 @@ yesno() {
case $2 in
Y|y) defp="[Y/n]" def=y;;
N|n) defp="[y/N]" def=n;;
*) echo "Bad default setting!" 1>&2; exit 1;;
*) echo $"Bad default setting!" 1>&2; exit 1;;
esac
else
defp="[y/N]" def=n
Expand All @@ -45,7 +48,7 @@ yesno() {

if [ x$WAIT = "xtrue" ]; then
$APTGET $OPTS "$APT_OPT0" "$APT_OPT1" -d dselect-upgrade
echo "Press enter to continue." && read RES
echo $"Press enter to continue." && read RES
$APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect-upgrade
RES=$?
else
Expand Down Expand Up @@ -77,28 +80,28 @@ if [ $RES -eq 0 ]; then
case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in
auto)
$APTGET "$APT_OPT0" "$APT_OPT1" autoclean &&
echo "Press enter to continue." && read RES && exit 0;
echo $"Press enter to continue." && read RES && exit 0;
;;
always)
$APTGET "$APT_OPT0" "$APT_OPT1" clean &&
echo "Press enter to continue." && read RES && exit 0;
echo $"Press enter to continue." && read RES && exit 0;
;;
prompt)
exec 3>&1
if [ `yesno "Do you want to erase any previously downloaded .deb files?" y` = y ]; then
if [ `yesno $"Do you want to erase any previously downloaded .deb files?" y` = y ]; then
$APTGET "$APT_OPT0" "$APT_OPT1" clean &&
echo "Press enter to continue." && read RES && exit 0;
echo $"Press enter to continue." && read RES && exit 0;
fi
;;
*)
;;
esac
else
echo "Some errors occurred while unpacking. I'm going to configure the"
echo "packages that were installed. This may result in duplicate errors"
echo "or errors caused by missing dependencies. This is OK, only the errors"
echo "above this message are important. Please fix them and run [I]nstall again"
echo "Press enter to continue."
echo $"Some errors occurred while unpacking. I'm going to configure the"
echo $"packages that were installed. This may result in duplicate errors"
echo $"or errors caused by missing dependencies. This is OK, only the errors"
echo $"above this message are important. Please fix them and run [I]nstall again"
echo $"Press enter to continue."
read RES && $DPKG "$DPKG_OPTS" --configure -a
exit 100
fi
Expand Down
6 changes: 5 additions & 1 deletion dselect/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ include ../buildlib/defaults.mak
SOURCE = desc.apt install names setup update
TO = $(BUILD)/scripts/dselect
include $(COPY_H)


LOCAL = dselect
SOURCE = install update
TYPE = sh
include $(PODOMAIN_H)
9 changes: 6 additions & 3 deletions dselect/update
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh
#!/bin/bash
set -e

# Set the textdomain for the translations using $"..."
TEXTDOMAIN="apt"

# Get the configuration from /etc/apt/apt.conf
CLEAN="prompt"
OPTS="-f"
Expand All @@ -24,7 +27,7 @@ CACHEDIR=`echo $CACHEDIR | sed -e "s|/$||"`
STATUS=1
if $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update
then
echo "Merging Available information"
echo $"Merging Available information"
rm -f $CACHEDIR/available
$APTCACHE dumpavail > $CACHEDIR/available
$DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available
Expand All @@ -39,7 +42,7 @@ then
fi

if [ x$PROMPT = "xtrue" ]; then
echo "Press enter to continue." && read RES;
echo $"Press enter to continue." && read RES;
fi

exit $STATUS

0 comments on commit a8c2695

Please sign in to comment.