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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -31,36 +31,29 @@ myver='@PACKAGE_VERSION@'
# functions # functions
usage() { usage() {
printf "updatesync (pacman) %s\n" "$myver" printf "updatesync (pacman) %s\n\n" "$myver"
echo printf "$(gettext "Usage: %s <action> <destfile> <option> [package_directory]")\n\n" "$0"
printf "$(gettext "Usage: %s <action> <destfile> <option> [package_directory]")\n" "$0" printf "$(gettext "\
echo updatesync will update a sync database by reading a PKGBUILD and\n\
echo "$(gettext "updatesync will update a sync database by reading a PKGBUILD and")" modifying the destfile. updatesync updates the database in a temporary\n\
echo "$(gettext "modifying the destfile. updatesync updates the database in a temporary")" directory and then compresses it to <destfile>.\n\n")"
echo "$(gettext "directory and then compresses it to <destfile>.")" printf "$(gettext "There are two types of actions:\n\n")"
echo 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")"
echo "$(gettext "There are two types of actions:")" printf "$(gettext "del - Will remove a package's entry from the db. It takes the package's\n name as an option.\n")"
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")"
echo 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 exit 0
} }
version() { version() {
printf "updatesync (pacman) %s\n" "$myver" printf "updatesync (pacman) %s\n" "$myver"
printf "Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n" printf "$(gettext "\
echo Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n\n\
printf "This is free software; see the source for copying conditions.\n" This is free software; see the source for copying conditions.\n\
printf "There is NO WARRANTY, to the extent permitted by law.\n" There is NO WARRANTY, to the extent permitted by law.\n")"
echo
} }
error () { error () {