From a501b72e40062c9e606a787657582d1859c35d35 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 6 Jul 2007 19:35:32 -0400 Subject: 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 --- scripts/abs.sh.in | 26 ++++++++++++------------- scripts/gensync.sh.in | 44 ++++++++++++++++++++----------------------- scripts/makepkg.sh.in | 13 +++++-------- scripts/makeworld.sh.in | 9 ++++----- scripts/pacman-optimize.sh.in | 35 ++++++++++++++++------------------ scripts/rankmirrors.py.in | 8 +++++--- scripts/repo-add.sh.in | 33 ++++++++++++++------------------ scripts/repo-remove.sh.in | 29 ++++++++++++---------------- scripts/updatesync.sh.in | 41 +++++++++++++++++----------------------- 9 files changed, 105 insertions(+), 133 deletions(-) (limited to 'scripts') diff --git a/scripts/abs.sh.in b/scripts/abs.sh.in index 491b965a..5ceb433e 100644 --- a/scripts/abs.sh.in +++ b/scripts/abs.sh.in @@ -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 ").\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 .\n\n\ +This is free software; see the source for copying conditions.\n\ +There is NO WARRANTY, to the extent permitted by law.\n")" } diff --git a/scripts/gensync.sh.in b/scripts/gensync.sh.in index ca83c17b..d98915f4 100644 --- a/scripts/gensync.sh.in +++ b/scripts/gensync.sh.in @@ -30,35 +30,31 @@ myver='@PACKAGE_VERSION@' # functions usage() { - printf "gensync (pacman) %s\n" "$myver" - echo - printf "$(gettext "Usage: %s [package_directory]")\n" "$0" - echo - echo "$(gettext "gensync will generate a sync database by reading all PKGBUILD files")" - echo "$(gettext "from . gensync builds the database in a temporary directory")" - echo "$(gettext "and then compresses it to .")" - echo - echo "$(gettext "gensync will calculate md5sums of packages in the same directory as")" - echo "$(gettext ", unless an alternate [package_directory] is specified.")" - echo - echo "$(gettext "note: The 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 [package_directory]")\n\n" "$0" + printf "$(gettext "\ +gensync will generate a sync database by reading all PKGBUILD files\n\ +from . gensync builds the database in a temporary directory\n\ +and then compresses it to .\n\n")" + printf "$(gettext "\ +gensync will calculate md5sums of packages in the same directory as\n\ +, unless an alternate [package_directory] is specified.\n\n")" + printf "$(gettext "\ +note: The 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 .\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 .\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 () { diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 8be44c65..30e6b711 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -961,12 +961,11 @@ usage() { } version() { - printf "$(gettext "makepkg (pacman) %s")\n" "$myver" - echo "$(gettext "Copyright (C) 2002-2007 Judd Vinet .")" - 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 .\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" diff --git a/scripts/makeworld.sh.in b/scripts/makeworld.sh.in index 23976b5e..728e00eb 100644 --- a/scripts/makeworld.sh.in +++ b/scripts/makeworld.sh.in @@ -56,11 +56,10 @@ usage() { version() { printf "makeworld (pacman) %s\n" "$myver" - printf "Copyright (C) 2002-2007 Judd Vinet .\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 .\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= diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index d4c926d8..fe59e661 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -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 .\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 .\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() { diff --git a/scripts/rankmirrors.py.in b/scripts/rankmirrors.py.in index 2b284efe..b68bc548 100644 --- a/scripts/rankmirrors.py.in +++ b/scripts/rankmirrors.py.in @@ -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. -# Modified 2006 by Dan McGee +# Copyright (c) 2002-2007 by Judd Vinet # # 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 .\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." diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 3f009af8..1df650bd 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -32,29 +32,24 @@ TMP_DIR="" # print usage instructions usage() { - printf "repo-add (pacman) %s\n" "$myver" - echo - echo "$(gettext "usage: repo-add [--force] ...")" - 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 [--force] ...\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 .\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 .\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 diff --git a/scripts/repo-remove.sh.in b/scripts/repo-remove.sh.in index 02021f33..63209728 100644 --- a/scripts/repo-remove.sh.in +++ b/scripts/repo-remove.sh.in @@ -3,7 +3,7 @@ # repo-remove - remove a package entry from a given repo database file # @configure_input@ # -# Copyright (c) 2007 Dan McGee +# Copyright (c) 2002-2007 by Judd Vinet # # 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 ...")" - 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 ...\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 .\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 .\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 diff --git a/scripts/updatesync.sh.in b/scripts/updatesync.sh.in index 1526e285..7f6636cc 100644 --- a/scripts/updatesync.sh.in +++ b/scripts/updatesync.sh.in @@ -31,36 +31,29 @@ myver='@PACKAGE_VERSION@' # functions usage() { - printf "updatesync (pacman) %s\n" "$myver" - echo - printf "$(gettext "Usage: %s