summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-05-23 17:12:52 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-05-23 17:25:41 +0200
commit7fa1f0e2aa70a610d6de76e2194857b2ddc36b18 (patch)
tree452f195d3b14941550306dfc7118a858a72e8ccd /scripts
parentde114ce437d5f34db52a3acd7e17672ea6d76336 (diff)
downloadcalcurse-7fa1f0e2aa70a610d6de76e2194857b2ddc36b18.zip
Add localization to calcurse-upgrade
* Use gettext in "scripts/calcurse-upgrade". * Add "scripts/calcurse-upgrade" to "po/POTFILES.in". * Rename "scripts/calcurse-upgrade" to "scripts/calcurse-upgrade.sh" to make sure xgettext(1) detects the correct input file format. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am12
-rw-r--r--scripts/calcurse-upgrade.sh (renamed from scripts/calcurse-upgrade)10
2 files changed, 17 insertions, 5 deletions
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