[pacman-dev] [PATCH 01/11] checkupdates: streamline usage function
Dave Reisner
d at falconindy.com
Thu Sep 29 10:37:43 UTC 2016
On Sep 29, 2016 06:23, "Gordian Edenhofer" <gordian.edenhofer at gmail.com>
wrote:
Signed-off-by: Gordian Edenhofer <gordian.edenhofer at gmail.com>
---
contrib/checkupdates.sh.in | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in
index ff62891..8c04370 100644
--- a/contrib/checkupdates.sh.in
+++ b/contrib/checkupdates.sh.in
@@ -25,13 +25,14 @@ m4_include(../scripts/library/output_format.sh)
m4_include(../scripts/library/term_colors.sh)
if (( $# > 0 )); then
- echo "${myname} (pacman) v${myver}"
+ printf "%s (pacman) %s\n" "$myname" "$myver"
echo
- echo "Safely print a list of pending updates"
+ printf -- "$(gettext "Safely print a list of pending updates")\n"
echo
- echo "Usage: ${myname}"
+ printf -- "$(gettext "Usage: %s")\n" "$0"
+ echo
+ printf -- "$(gettext "Note: Export the "CHECKUPDATES_DB" variable
to change the path of the temporary database.")\n"
This is broken -- double quotes do not nest like this, and they're
effectively dropped. I also question the value of adding gettext support to
untranslated scripts and including flag/envvar names as part of the
translatable strings -- that won't end well as some translator *will* get
it wrong.
echo
- echo 'Note: Export the "CHECKUPDATES_DB" variable to change the
path of the temporary database.'
exit 0
fi
--
2.10.0
More information about the pacman-dev
mailing list