summaryrefslogtreecommitdiff
path: root/tests/daemon
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-18 17:46:07 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-18 17:46:07 +0100
commitfa7d434b5a41d4c6ec128116c9e09c36881f1467 (patch)
treeb6a9bb71196c73dd40a03eb4f849526f93f5e301 /tests/daemon
parentfa863355cafc901612cbf18a8dda97cdcf9d502b (diff)
downloadwolfbones-fa7d434b5a41d4c6ec128116c9e09c36881f1467.tar.gz
wolfbones-fa7d434b5a41d4c6ec128116c9e09c36881f1467.tar.bz2
added gettext in testd, also added wolf gettext.c and initialization code
Diffstat (limited to 'tests/daemon')
-rw-r--r--tests/daemon/GNUmakefile8
-rw-r--r--tests/daemon/po/de.po56
-rw-r--r--tests/daemon/testd.c9
3 files changed, 65 insertions, 8 deletions
diff --git a/tests/daemon/GNUmakefile b/tests/daemon/GNUmakefile
index 1ec54b3..d352fbd 100644
--- a/tests/daemon/GNUmakefile
+++ b/tests/daemon/GNUmakefile
@@ -13,6 +13,14 @@ TEST_BINS = \
TEST_OBJS = \
testd_cmdline.o
+CATALOG_NAME = testd
+
+GETTEXT_LANGUAGES = de
+
+GETTEXT_FILES = $(TEST_OBJS:.o=.c) $(TEST_BINS:$(EXE)=.c)
+
+GETTEXT_TRIGGERS = _ gettext_noop gettext
+
-include $(TOPDIR)/makefiles/gmake/sub.mk
# ABa: currently a special rule for cmdline.c as gengetopt is not
diff --git a/tests/daemon/po/de.po b/tests/daemon/po/de.po
new file mode 100644
index 0000000..effbdbe
--- /dev/null
+++ b/tests/daemon/po/de.po
@@ -0,0 +1,56 @@
+# Copyright (C) 2008 Andreas Baumann <abaumann@yahoo.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+msgid ""
+msgstr ""
+"Project-Id-Version: libwolf 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-03-18 17:40+0100\n"
+"PO-Revision-Date: 2009-03-18 11:07+0100\n"
+"Last-Translator: Andreas Baumann <abaumann@yahoo.com>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: testd.c:50
+#, c-format
+msgid "Testing configuraton read from '%s'"
+msgstr "Teste die Konfiguration von '%s'"
+
+#: testd.c:145
+#, c-format
+msgid "Started %s daemon"
+msgstr "Prozess %s gestartet"
+
+#: testd.c:154
+#, c-format
+msgid "Suspending on UNIX signal resulted in an error %d!"
+msgstr "Fehler %d waehrend des Wartens auf ein UNIX signal!"
+
+#: testd.c:160
+msgid "Rereading configuration"
+msgstr "Lese Konfiguration erneut"
+
+#: testd.c:166
+msgid "Got termination signal, shutting down the daemon"
+msgstr "Signal zum Beenden empfangen, stoppe jetzt den Prozess"
+
+#: testd.c:177
+#, fuzzy, c-format
+msgid "Unexpected signal '%s' (%s, %d)"
+msgstr "Unerwartetes Signal '%s' (%s)"
+
+#: testd.c:184
+#, c-format
+msgid "Stopped %s daemon"
+msgstr "Process %s gestoppt"
diff --git a/tests/daemon/testd.c b/tests/daemon/testd.c
index 3f9f5d2..7530d97 100644
--- a/tests/daemon/testd.c
+++ b/tests/daemon/testd.c
@@ -72,12 +72,6 @@ static int read_config( const char *filename, struct gengetopt_args_info *args_i
return EXIT_SUCCESS;
}
-/* FIXME: coreutils set it to automake variables, see what postgres does and maybe
- * set it in platform.mk?
- */
-//#define LOCALEDIR "/usr/share/locale"
-#define LOCALEDIR "locale"
-
int main( int argc, char *argv[] ) {
struct gengetopt_args_info args_info;
wolf_error_t error;
@@ -85,8 +79,7 @@ int main( int argc, char *argv[] ) {
wolf_daemon_p demon = NULL;
int sig = 0;
- setlocale( LC_ALL, "" );
- bindtextdomain( CMDLINE_PARSER_PACKAGE, LOCALEDIR );
+ wolf_port_initialize_i18n( argv[0], CMDLINE_PARSER_PACKAGE );
if( parse_options_and_arguments( argc, argv, &args_info ) == EXIT_FAILURE ) {
exit( EXIT_FAILURE );