From 9a241af241ee2722a66881a4608bc32490407e16 Mon Sep 17 00:00:00 2001 From: kytv Date: Sat, 22 Dec 2012 15:10:57 +0000 Subject: [PATCH] enable translations for 'i2prouter' --- .tx/config | 5 + build.xml | 5 +- installer/resources/i2prouter | 300 +++++++-------- installer/resources/locale/po/messages_de.po | 361 ++++-------------- installer/resources/locale/po/messages_en.po | 382 ++++--------------- 5 files changed, 290 insertions(+), 763 deletions(-) diff --git a/.tx/config b/.tx/config index 53c23f058..a00fdcf47 100644 --- a/.tx/config +++ b/.tx/config @@ -131,6 +131,11 @@ trans.ru = debian/po/ru.po trans.sv_SE = debian/po/sv.po trans.uk_UA = debian/po/uk.po +[I2P.i2prouter-script] +source_file = installer/resources/locale/messages_en.po +source_lang = en +trans.de = installer/resources/locale/po/messages_de.po + [main] host = http://www.transifex.net diff --git a/build.xml b/build.xml index c3fd6fe65..78c67b9a6 100644 --- a/build.xml +++ b/build.xml @@ -396,14 +396,11 @@ - - - ---> diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index bb66c9c35..6d5104e87 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -113,12 +113,6 @@ WAIT_FOR_STARTED_TIMEOUT=120 # state information on the Wrapper and Java processes. #DETAIL_STATUS=true -# If set, the 'pause' and 'resume' commands will be enabled. These make it -# possible to pause the JVM or Java application without completely stopping -# the Wrapper. See the wrapper.pausable and wrapper.pausable.stop_jvm -# properties for more information. -#PAUSABLE=true - # By default we show a detailed usage block. Uncomment to show brief usage. #BRIEF_USAGE=true @@ -198,7 +192,7 @@ unsupported() { } failed() { - echo "**Failed to load the wrapper**" + echo "**`gettext 'Failed to load the wrapper'`**" case `uname -s` in FreeBSD) echo @@ -319,8 +313,8 @@ PSEXE="/usr/ucb/ps" PSEXE="/bin/ps" if [ ! -x "$PSEXE" ] then - eval echo `gettext 'Unable to locate "ps".'` - eval echo `gettext 'Please report this message along with the location of the command on your system.'` + echo 'Unable to locate "ps".' + echo 'Please report this message along with the location of the command on your system.' exit 1 fi fi @@ -332,8 +326,8 @@ then TREXE="/bin/tr" if [ ! -x "$TREXE" ] then - eval echo `gettext 'Unable to locate "tr".'` - eval echo `gettext 'Please report this message along with the location of the command on your system.'` + echo 'Unable to locate "tr".' + echo 'Please report this message along with the location of the command on your system.' exit 1 fi fi @@ -499,7 +493,7 @@ gettext() { outputFile() { if [ -f "$1" ] then - eval echo `gettext ' $1 Found but not executable.'`; + echo ' $1 Found but not executable.'; else echo " $1" fi @@ -558,7 +552,7 @@ then fi if [ -z "$WRAPPER_TEST_CMD" ] then - eval echo `gettext 'Unable to locate any of the following binaries:'` + echo 'Unable to locate any of the following binaries:' outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-$DIST_BITS" if [ ! "$DIST_BITS" = "32" ] then @@ -604,12 +598,7 @@ else fi # Build the command file clause. -if [ -n "$PAUSABLE" ] -then - COMMANDPROP="wrapper.commandfile=\"$COMMANDFILE\" wrapper.pausable=TRUE" -else - COMMANDPROP= -fi +COMMANDPROP= # Build the log file clause. LOGPROP="wrapper.logfile=\"$LOGFILE\"" @@ -660,8 +649,8 @@ checkUser() { IDEXE="/usr/bin/id" if [ ! -x "$IDEXE" ] then - eval echo `gettext 'Unable to locate "id".'` - eval echo `gettext 'Please report this message along with the location of the command on your system.'` + echo 'Unable to locate "id".' + echo 'Please report this message along with the location of the command on your system.' exit 1 fi fi @@ -805,12 +794,12 @@ getpid() { then # This is a stale pid file. rm -f "$PIDFILE" - eval echo `gettext 'Removed stale pid file: $PIDFILE'` + echo 'Removed stale pid file: $PIDFILE' pid="" fi fi else - eval echo `gettext 'Cannot read $PIDFILE.'` + echo 'Cannot read $PIDFILE.' exit 1 fi fi @@ -911,7 +900,7 @@ launchdinternal() { } console() { - eval echo `gettext 'Running $APP_LONG_NAME...'` + eval echo "`gettext 'Running $APP_LONG_NAME'`..." getpid if [ "X$pid" = "X" ] then @@ -934,7 +923,7 @@ console() { waitforjavastartup() { getstatus - eval echo $ECHOOPT `gettext 'Waiting for $APP_LONG_NAME...'` + eval echo $ECHOOPT "`gettext 'Waiting for $APP_LONG_NAME'`..." # Wait until the timeout or we have something besides Unknown. counter=15 @@ -981,10 +970,10 @@ startwait() { getpid if [ "X$pid" = "X" ] then - eval echo `gettext ' WARNING: $APP_LONG_NAME may have failed to start.'` + eval echo " `gettext 'WARNING: $APP_LONG_NAME may have failed to start.'`" exit 1 else - eval echo `gettext ' running: PID:$pid'` + eval echo ' running: PID:$pid' fi else echo "" @@ -993,7 +982,7 @@ startwait() { macosxstart() { # The daemon has been installed. - eval echo `gettext 'Starting $APP_LONG_NAME. Detected Mac OSX and installed launchd daemon.'` + echo 'Starting $APP_LONG_NAME. Detected Mac OSX and installed launchd daemon.' if [ `id | sed 's/^uid=//;s/(.*$//'` != "0" ] ; then eval echo `gettext 'Must be root to perform this action.'` exit 1 @@ -1021,7 +1010,7 @@ macosxstart() { upstartstart() { # The daemon has been installed. - eval echo `gettext 'Starting $APP_LONG_NAME. Detected Linux and installed upstart.'` + echo 'Starting $APP_LONG_NAME. Detected Linux and installed upstart.' if [ `id | sed 's/^uid=//;s/(.*$//'` != "0" ] ; then eval echo `gettext 'Must be root to perform this action.'` exit 1 @@ -1039,7 +1028,7 @@ upstartstart() { } start() { - eval echo `gettext 'Starting $APP_LONG_NAME...'` + eval echo "`gettext 'Starting $APP_LONG_NAME'`..." getpid if [ "X$pid" = "X" ] then @@ -1064,7 +1053,7 @@ start() { stopit() { # $1 exit if down flag - eval echo `gettext 'Stopping $APP_LONG_NAME...'` + eval echo "`gettext 'Stopping $APP_LONG_NAME'`..." getpid if [ "X$pid" = "X" ] then @@ -1107,7 +1096,7 @@ stopit() { then CNT=`expr $CNT + 1` else - eval echo `gettext 'Waiting for $APP_LONG_NAME to exit...'` + eval echo "`gettext 'Waiting for $APP_LONG_NAME to exit'`..." CNT=0 fi TOTCNT=`expr $TOTCNT + 1` @@ -1132,7 +1121,7 @@ stopit() { graceful() { # $1 exit if down flag - eval echo `gettext 'Stopping $APP_LONG_NAME gracefully...'` + eval echo "`gettext 'Stopping $APP_LONG_NAME gracefully'`..." getpid if [ "X$pid" = "X" ] then @@ -1167,11 +1156,11 @@ graceful() { } pause() { - eval echo `gettext 'Pausing $APP_LONG_NAME.'` + echo 'Pausing $APP_LONG_NAME.' } resume() { - eval echo `gettext 'Resuming $APP_LONG_NAME.'` + echo 'Resuming $APP_LONG_NAME.' } status() { @@ -1193,12 +1182,12 @@ status() { } installUpstart() { - eval echo `gettext ' Installing the $APP_LONG_NAME daemon using upstart..'` + echo ' Installing the $APP_LONG_NAME daemon using upstart..' if [ -f "${APP_NAME}.conf" ] ; then - eval echo `gettext ' a custom upstart conf file ${APP_NAME}.conf found'` + echo ' a custom upstart conf file ${APP_NAME}.conf found' cp "${REALDIR}/${APP_NAME}.install" "/etc/init/${APP_NAME}.conf" else - eval echo `gettext ' creating default upstart conf file..'` + echo ' creating default upstart conf file..' echo "# ${APP_NAME} - ${APP_LONG_NAME}" > "/etc/init/${APP_NAME}.conf" echo "description \"${APP_LONG_NAME}\"" >> "/etc/init/${APP_NAME}.conf" echo "author \"Tanuki Software Ltd. \"" >> "/etc/init/${APP_NAME}.conf" @@ -1237,40 +1226,40 @@ installdaemon() { else APP_NAME_LOWER=`echo "$APP_NAME" | $TREXE "[A-Z]" "[a-z]"` if [ "$DIST_OS" = "solaris" ] ; then - eval echo `gettext 'Detected Solaris:'` + echo 'Detected Solaris:' if [ -f /etc/init.d/$APP_NAME ] ; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already installed.'`" exit 1 else - eval echo `gettext ' Installing the $APP_LONG_NAME daemon..'` + eval echo " `gettext 'Installing the $APP_LONG_NAME daemon'`.." ln -s "$REALPATH" "/etc/init.d/$APP_NAME" ln -s "/etc/init.d/$APP_NAME" "/etc/rc3.d/K20$APP_NAME_LOWER" ln -s "/etc/init.d/$APP_NAME" "/etc/rc3.d/S20$APP_NAME_LOWER" fi elif [ "$DIST_OS" = "linux" ] ; then if [ -f /etc/redhat-release -o -f /etc/redhat_version -o -f /etc/fedora-release ] ; then - eval echo `gettext 'Detected RHEL or Fedora:'` + echo 'Detected RHEL or Fedora:' if [ -f "/etc/init.d/$APP_NAME" -o -f "/etc/init/${APP_NAME}.conf" ] ; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already installed.'`" exit 1 else if [ -n "$USE_UPSTART" -a -d "/etc/init" ] ; then installUpstart else - eval echo `gettext ' Installing the $APP_LONG_NAME daemon..'` + eval echo " `gettext 'Installing the $APP_LONG_NAME daemon'`.." ln -s "$REALPATH" "/etc/init.d/$APP_NAME" /sbin/chkconfig --add "$APP_NAME" /sbin/chkconfig "$APP_NAME" on fi fi elif [ -f /etc/slackware-version ]; then - eval echo `gettext 'Detected Slackware Linux:'` + echo 'Detected Slackware Linux:' if [ -e "/etc/rc.d/rc.i2p" -o -f "/etc/rc.d/rc.i2p.new" ]; then echo "Found initscript from I2P Slackpkg. Aborting." >&2 exit 1 else if grep -q ${APP_NAME}router /etc/rc.d/rc.local > /dev/null 2>&1; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already installed.'`" exit 1 else echo "${REALDIR}/${APP_NAME}router start" >> /etc/rc.d/rc.local @@ -1282,12 +1271,12 @@ installdaemon() { fi fi elif [ -f /etc/arch-release ]; then - eval echo `gettext 'Detected Arch Linux:'` + echo 'Detected Arch Linux:' if [ -f "/etc/rc.d/i2prouter" -o -f "/usr/lib/systemd/system/i2prouter.service" ]; then - eval echo `gettext 'AUR package found. Refusing to continue.'` + echo 'AUR package found. Refusing to continue.' exit 1 elif [ -f /etc/rc.d/i2p -a ! "$USE_SYSTEMD" = "1" ] || [ -f "$SYSTEMD_SERVICE" -a "$USE_SYSTEMD" = "1" ]; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already installed.'`" exit 1 else if [ ! -f "/etc/init.d/i2p" ]; then @@ -1339,8 +1328,8 @@ installdaemon() { echo "esac" >> /etc/rc.d/${APP_NAME} chmod 755 /etc/rc.d/${APP_NAME} chown root:root /etc/rc.d/${APP_NAME} - eval echo `gettext ' The $APP_LONG_NAME daemon has been installed.'` - eval echo `gettext ' Add \"i2p\" to the DAEMONS variable in /etc/rc.conf to enable.'` + echo ' The $APP_LONG_NAME daemon has been installed.' + echo ' Add \"i2p\" to the DAEMONS variable in /etc/rc.conf to enable.' else # We'll end up here if systemd is enabled. # If systemd is enabled we don't need the initscript @@ -1352,14 +1341,14 @@ installdaemon() { fi fi elif [ -f /etc/SuSE-release ] ; then - eval echo `gettext 'Detected SuSE or SLES:'` + echo 'Detected SuSE or SLES:' if [ -f /etc/rc.d/${APP_NAME} -a ! "$USE_SYSTEMD" = "1" ] || [ -f "$SYSTEMD_SERVICE" -a "$USE_SYSTEMD" = "1" ]; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already installed.'`" exit 1 else if [ ! -f "/etc/init.d/$APP_NAME" ]; then if [ "$USE_SYSTEMD" != "1" ]; then - eval echo `gettext ' Installing the $APP_LONG_NAME daemon..'` + eval echo " `gettext 'Installing the $APP_LONG_NAME daemon'`.." ln -s "$REALPATH" "/etc/init.d/$APP_NAME" sed -i "s/Default-Start: 2 3 4 5/Default-Start: 5/" $0 insserv "/etc/init.d/$APP_NAME" @@ -1372,26 +1361,26 @@ installdaemon() { fi fi elif [ -f /etc/lsb-release -o -f /etc/debian_version ] ; then - eval echo `gettext 'Detected Debian-based distribution:'` + echo 'Detected Debian-based distribution:' if [ -f "/etc/init.d/$APP_NAME" -o -f "/etc/init/${APP_NAME}.conf" ] ; then - eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` + eval echo " `gettext 'The $APP_LONG_NAME daemon is already install