diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-05-23 17:12:52 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-05-23 17:25:41 +0200 |
commit | 7fa1f0e2aa70a610d6de76e2194857b2ddc36b18 (patch) | |
tree | 452f195d3b14941550306dfc7118a858a72e8ccd | |
parent | de114ce437d5f34db52a3acd7e17672ea6d76336 (diff) | |
download | calcurse-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>
-rw-r--r-- | po/POTFILES.in | 2 | ||||
-rw-r--r-- | scripts/Makefile.am | 12 | ||||
-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 |