Merge branch 'upstream'
[debian/amanda] / changer-src / chg-lib.sh.in
index 791154c70243ce2cb8ea3b4d8ff9d09a73c18c77..0e383e67b8358e7d50227e703d2b0af68bfaac91 100644 (file)
@@ -17,12 +17,31 @@ MTF=@MT_FILE_FLAG@
 # No user-level customization should be required beyond this point.
 ################################################################################
 
+####
+# Set up paths, including PATH for finding amanda executables
+
+PATH="$PATH:@sbindir@:@libexecdir@"
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 sbindir="@sbindir@"
 libexecdir="@libexecdir@"
-amlibexecdir="@amlibexecdir@"
-. "${amlibexecdir}/amanda-sh-lib.sh"
+
+####
+# Gettext
+
+#+
+# Function to:
+#    Simplify gettext usage by allowing printf format
+#    strings for translators, use _() identifier for
+#    xgettext extraction similar to "C" usage and
+#    collapsing "printf `gettext fmt` ...", which is
+#    used everywhere, into one function.
+#-
+_() {
+       fmt=`gettext -d amanda "$1"`
+       shift
+       printf "$fmt" $*
+}
 
 ####
 # Eponymous functions to access various amanda apps