Make paragraph text in scripts single strings

It is much easier for translators to deal with paragraphs as strings rather
than by lines. Take all usage and version information and convert it to this
format.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-07-06 19:35:32 -04:00
parent b5f8a44beb
commit a501b72e40
9 changed files with 105 additions and 133 deletions

View File

@ -62,31 +62,29 @@ error() {
usage() {
printf "$(gettext "abs (pacman) %s - download a PKGBUILD tree from a CVS repository")\n" "$myver"
echo
printf "$(gettext "Usage %s [options] [repository...]")\n" "$0"
echo
printf "$(gettext "abs (pacman) %s - download a PKGBUILD tree from a CVS repository")\n\n" "$myver"
printf "$(gettext "Usage %s [options] [repository...]")\n\n" "$0"
printf "$(gettext "Options:")\n"
printf "$(gettext " -p, --passive The connection is opened in passive mode.")\n"
echo
printf "$(gettext " -h, --help Display this help message then exit.")\n"
printf "$(gettext " -V, --version Display version information then exit.")\n"
echo
printf "$(gettext "abs will synchronize build scripts from the CVS repository")\n"
printf "$(gettext "into %s. You can follow different package trees by")\n" "$ABSROOT"
printf "$(gettext "editing %s files. If no argument is given, abs")\n" "$CONFDIR/supfile.*"
printf "$(gettext "will synchronize from supfiles specified in %s.")\n" "$CONFDIR/abs.conf"
echo
printf "$(gettext "\
abs will synchronize build scripts from the CVS repository\n\
into %s. You can follow different package trees by\n\
editing %s files. If no argument is given, abs\n\
will synchronize from supfiles specified in %s.\n\n")" \
"$ABSROOT" "$CONFDIR/supfile.*" "$CONFDIR/abs.conf"
printf "$(gettext "Report bugs to <%s>.")\n" "$BUG_REPORT_EMAIL"
}
version() {
printf "abs (pacman) %s\n" "$myver"
printf "$(gettext "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>").\n"
echo
printf "$(gettext "This is free software; see the source for copying conditions.")\n"
printf "$(gettext "There is NO WARRANTY, to the extent permitted by law.")\n"
echo
printf "$(gettext "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}

View File

@ -30,35 +30,31 @@ myver='@PACKAGE_VERSION@'
# functions
usage() {
printf "gensync (pacman) %s\n" "$myver"
echo
printf "$(gettext "Usage: %s <root> <destfile> [package_directory]")\n" "$0"
echo
echo "$(gettext "gensync will generate a sync database by reading all PKGBUILD files")"
echo "$(gettext "from <root>. gensync builds the database in a temporary directory")"
echo "$(gettext "and then compresses it to <destfile>.")"
echo
echo "$(gettext "gensync will calculate md5sums of packages in the same directory as")"
echo "$(gettext "<destfile>, unless an alternate [package_directory] is specified.")"
echo
echo "$(gettext "note: The <destfile> name is important. It must be of the form")"
echo "$(gettext " {treename}.db.tar.gz where {treename} is the name of the custom")"
echo "$(gettext " package repository you configured in /etc/pacman.conf. The")"
echo "$(gettext " generated database must reside in the same directory as your")"
echo "$(gettext " custom packages (also configured in /etc/pacman.conf)")"
echo
echo "$(gettext "example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz")"
echo
printf "gensync (pacman) %s\n\n" "$myver"
printf "$(gettext "Usage: %s <root> <destfile> [package_directory]")\n\n" "$0"
printf "$(gettext "\
gensync will generate a sync database by reading all PKGBUILD files\n\
from <root>. gensync builds the database in a temporary directory\n\
and then compresses it to <destfile>.\n\n")"
printf "$(gettext "\
gensync will calculate md5sums of packages in the same directory as\n\
<destfile>, unless an alternate [package_directory] is specified.\n\n")"
printf "$(gettext "\
note: The <destfile> name is important. It must be of the form\n\
{treename}.db.tar.gz where {treename} is the name of the custom\n\
package repository you configured in /etc/pacman.conf. The\n\
generated database must reside in the same directory as your\n\
custom packages (also configured in /etc/pacman.conf)\n\n")"
echo "$(gettext "Example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz")"
exit 0
}
version() {
printf "gensync (pacman) %s\n" "$myver"
printf "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "$(gettext "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
error () {

View File

@ -961,12 +961,11 @@ usage() {
}
version() {
printf "$(gettext "makepkg (pacman) %s")\n" "$myver"
echo "$(gettext "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.")"
echo
echo "$(gettext "This is free software; see the source for copying conditions.")"
echo "$(gettext "There is NO WARRANTY, to the extent permitted by law.")"
echo
printf "makepkg (pacman) %s\n" "$myver"
printf "$(gettext "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
ARGLIST=$@
@ -1006,8 +1005,6 @@ if [ -z "$SRCROOT" ]; then
SRCROOT=$ABSROOT
fi
# Parse Command Line Options.
OPT_SHORT="bcCdefFghiLmop:rRsSV"
OPT_LONG="asroot,builddeps,clean,cleancache,nodeps,noextract,force,geninteg,help,install,log"

View File

@ -56,11 +56,10 @@ usage() {
version() {
printf "makeworld (pacman) %s\n" "$myver"
printf "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n"
}
MAKEPKG_OPTS=

View File

@ -40,29 +40,26 @@ error () {
}
usage() {
printf "pacman-optimize (pacman) %s\n" "$myver"
echo
printf "$(gettext "Usage: %s[pacman_db_root]")\n" "$0"
echo
echo "$(gettext "pacman-optimize is a little hack that should improve the performance")"
echo "$(gettext "of pacman when reading/writing to its filesystem-based database.")"
echo
echo "$(gettext "Because pacman uses many small files to keep track of packages,")"
echo "$(gettext "there is a tendency for these files to become fragmented over time.")"
echo "$(gettext "This script attempts to relocate these small files into one")"
echo "$(gettext "continuous location on your hard drive. The result is that the hard")"
echo "$(gettext "drive should be able to read them faster, since the hard drive head")"
echo "$(gettext "does not have to move around the disk as much.")"
echo
printf "pacman-optimize (pacman) %s\n\n" "$myver"
printf "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0"
printf "$(gettext "\
pacman-optimize is a little hack that should improve the performance\n\
of pacman when reading/writing to its filesystem-based database.\n\n")"
printf "$(gettext "\
Because pacman uses many small files to keep track of packages,\n\
there is a tendency for these files to become fragmented over time.\n\
This script attempts to relocate these small files into one\n\
continuous location on your hard drive. The result is that the hard\n\
drive should be able to read them faster, since the hard drive head\n\
does not have to move around the disk as much.\n")"
}
version() {
printf "pacman-optimize (pacman) %s\n" "$myver"
printf "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "$(gettext "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
die() {

View File

@ -3,8 +3,7 @@
# rankmirrors - read a list of mirrors from a file and rank them by speed
# @configure_input@
#
# Original Idea copyright (c) 2006 R.G. <chesercat>
# Modified 2006 by Dan McGee <dan@archlinux.org>
# Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -26,7 +25,10 @@ from optparse import OptionParser
def createOptParser():
usage = "usage: %prog [options] MIRRORFILE | URL"
version = '%prog (pacman) @PACKAGE_VERSION@'
version = "%prog (pacman) @PACKAGE_VERSION@\n" \
"Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n" \
"This is free software; see the source for copying conditions.\n" \
"There is NO WARRANTY, to the extent permitted by law."
description = "Ranks pacman mirrors by their connection and opening " \
"speed. Pacman mirror files are located in /etc/pacman.d/. It " \
"can also rank one mirror if the URL is provided."

View File

@ -32,29 +32,24 @@ TMP_DIR=""
# print usage instructions
usage() {
printf "repo-add (pacman) %s\n" "$myver"
echo
echo "$(gettext "usage: repo-add <path-to-db> [--force] <package> ...")"
echo
echo "$(gettext "repo-add will update a package database by reading a package file.")"
echo "$(gettext "Multiple packages to add can be specified on the command line.")"
echo
echo "$(gettext "The --force flag will add a 'force' entry to the sync database, which")"
echo "$(gettext "tells pacman to skip its internal version number checking and update")"
echo "$(gettext "the package regardless.")"
echo
echo "$(gettext "Example:")"
echo "$(gettext " repo-add /path/to/repo.db.tar.gz pacman-3.0.0.pkg.tar.gz")"
echo
printf "repo-add (pacman) %s\n\n" "$myver"
printf "$(gettext "Usage: %s <path-to-db> [--force] <package> ...\n\n")" "$0"
printf "$(gettext "\
repo-add will update a package database by reading a package file.\n\
Multiple packages to add can be specified on the command line.\n\n")"
printf "$(gettext "\
The --force flag will add a 'force' entry to the sync database, which\n\
tells pacman to skip its internal version number checking and update\n\
the package regardless.\n\n")"
echo "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0.pkg.tar.gz")"
}
version() {
printf "repo-add (pacman) %s\n" "$myver"
printf "Copyright (C) 2006 Aaron Griffin <aaron@archlinux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "$(gettext "\
Copyright (C) 2006 Aaron Griffin <aaron@archlinux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
# return calculated checksum of package

View File

@ -3,7 +3,7 @@
# repo-remove - remove a package entry from a given repo database file
# @configure_input@
#
# Copyright (c) 2007 Dan McGee <dan@archlinux.org>
# Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -32,26 +32,21 @@ TMP_DIR=""
# print usage instructions
usage() {
echo "$(gettext "repo-remove %s")" $myver
echo
echo "$(gettext "usage: repo-remove <path-to-db> <packagename> ...")"
echo
echo "$(gettext "repo-remove will update a package database by removing the package name")"
echo "$(gettext "specified on the command line from the given repo database. Multiple")"
echo "$(gettext "packages to remove can be specified on the command line.")"
echo
echo "$(gettext "Example:")"
echo "$(gettext " repo-remove /path/to/repo.db.tar.gz kernel26")"
echo
printf "$(gettext "repo-remove %s\n\n")" $myver
printf "$(gettext "usage: %s <path-to-db> <packagename> ...\n\n")" "$0"
printf "$(gettext "\
repo-remove will update a package database by removing the package name\n\
specified on the command line from the given repo database. Multiple\n\
packages to remove can be specified on the command line.\n\n")"
echo "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26")"
}
version() {
printf "repo-remove (pacman) %s\n" "$myver"
printf "Copyright (C) 2007 Dan McGee <dan@archlinux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "$(gettext "\
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
# test if a file is a repository DB

View File

@ -31,36 +31,29 @@ myver='@PACKAGE_VERSION@'
# functions
usage() {
printf "updatesync (pacman) %s\n" "$myver"
echo
printf "$(gettext "Usage: %s <action> <destfile> <option> [package_directory]")\n" "$0"
echo
echo "$(gettext "updatesync will update a sync database by reading a PKGBUILD and")"
echo "$(gettext "modifying the destfile. updatesync updates the database in a temporary")"
echo "$(gettext "directory and then compresses it to <destfile>.")"
echo
echo "$(gettext "There are two types of actions:")"
echo
echo "$(gettext "upd - Will update a package's entry or create it if it doesn't exist.")"
echo "$(gettext " It takes the package's PKGBUILD as an option.")"
echo "$(gettext "del - Will remove a package's entry from the db.")"
echo "$(gettext " It takes the package's name as an option.")"
echo
echo "$(gettext "updatesync will calculate md5sums of packages in the same directory as")"
echo "$(gettext "<destfile>, unless an alternate [package_directory] is specified.")"
echo
echo "$(gettext "example: updatesync upd /home/mypkgs/custom.db.tar.gz PKGBUILD")"
printf "updatesync (pacman) %s\n\n" "$myver"
printf "$(gettext "Usage: %s <action> <destfile> <option> [package_directory]")\n\n" "$0"
printf "$(gettext "\
updatesync will update a sync database by reading a PKGBUILD and\n\
modifying the destfile. updatesync updates the database in a temporary\n\
directory and then compresses it to <destfile>.\n\n")"
printf "$(gettext "There are two types of actions:\n\n")"
printf "$(gettext "upd - Will update a package's entry or create it if it doesn't exist.\n It takes the package's PKGBUILD as an option.\n")"
printf "$(gettext "del - Will remove a package's entry from the db. It takes the package's\n name as an option.\n")"
echo
printf "$(gettext "\
updatesync will calculate md5sums of packages in the same directory as\n\
<destfile>, unless an alternate [package_directory] is specified.\n\n")"
echo "$(gettext "Example: updatesync upd /home/mypkgs/custom.db.tar.gz PKGBUILD")"
exit 0
}
version() {
printf "updatesync (pacman) %s\n" "$myver"
printf "Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n"
echo
printf "This is free software; see the source for copying conditions.\n"
printf "There is NO WARRANTY, to the extent permitted by law.\n"
echo
printf "$(gettext "\
Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"
}
error () {