summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/POTFILES.in2
-rw-r--r--scripts/Makefile.am12
-rw-r--r--scripts/calcurse-upgrade.sh (renamed from scripts/calcurse-upgrade)10
3 files changed, 19 insertions, 5 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c588c5..62b460b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,3 +16,5 @@ src/utils.c
src/vars.c
src/wins.c
src/dmon.c
+
+scripts/calcurse-upgrade.sh
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 408de30..5502cfd 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,3 +1,13 @@
AUTOMAKE_OPTIONS = foreign
-dist_bin_SCRIPTS = calcurse-upgrade
+dist_bin_SCRIPTS = \
+ calcurse-upgrade
+
+EXTRA_DIST = \
+ calcurse-upgrade.sh
+
+CLEANFILES = \
+ calcurse-upgrade
+
+calcurse-upgrade: calcurse-upgrade.sh
+ $(AM_V_GEN) $(INSTALL) $< $@
diff --git a/scripts/calcurse-upgrade b/scripts/calcurse-upgrade.sh
index 271ade4..ffe110a 100644
--- a/scripts/calcurse-upgrade
+++ b/scripts/calcurse-upgrade.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+export TEXTDOMAIN='calcurse'
+
set -e
if [ "$1" = "--config" ]; then
@@ -9,7 +11,7 @@ else
fi
if [ ! -e "$CONFFILE" ]; then
- echo "Configuration file not found: $CONFFILE" >&2
+ echo "$(gettext "Configuration file not found:") $CONFFILE" >&2
exit 1
fi
@@ -22,12 +24,12 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '^notify-all=' -e '^output_datefmt=' -e '^input_datefmt=' \
-e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then
- echo "Pre-3.0.0 configuration file format detected..."
+ echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!"
[ -e "$tmpfile" ] && exit 1
- echo -n "Upgrade configuration directives..."
+ echo -n "$(gettext "Upgrade configuration directives...")"
sed -e 's/^auto_save=/general.autosave=/' \
-e 's/^auto_gc=/general.autogc=/' \
@@ -89,6 +91,6 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
mv "$tmpfile" "$CONFFILE"
echo -n ' '
- echo 'done'
+ echo "$(gettext 'done')"
fi