summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-26 04:17:17 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-26 04:17:17 (GMT)
commit33a6787f51503d1b24f42e57cf365a48378dd56e (patch)
treeed1f566f37269e6928ad733301b9529022f9c4cd
parent35d8e3500946289de2638596bc0f93b044acc42c (diff)
downloadmonitoring-plugins-33a6787f51503d1b24f42e57cf365a48378dd56e.tar.gz
checkins for internationalization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@598 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--.cvsignore1
-rw-r--r--ABOUT-NLS432
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am12
-rw-r--r--configure.in22
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/gettext.h69
-rw-r--r--nagios-plugins.spec.in124
-rw-r--r--plugins/Makefile.am8
-rw-r--r--plugins/check_tcp.c123
-rw-r--r--plugins/common.h15
-rw-r--r--plugins/utils.c4
-rw-r--r--po/LINGUAS1
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/de.po79
-rw-r--r--po/fr.po115
-rwxr-xr-xtools/setup1
17 files changed, 873 insertions, 142 deletions
diff --git a/.cvsignore b/.cvsignore
index 82001b7..75dae47 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -7,6 +7,7 @@ test.pl
7command.cfg 7command.cfg
8Cache.pm 8Cache.pm
9build-* 9build-*
10intl
10aclocal.m4 11aclocal.m4
11autom4te*.cache 12autom4te*.cache
12install-sh 13install-sh
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..57e4b67
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,432 @@
1Notes on the Free Translation Project
2*************************************
3
4 Free software is going international! The Free Translation Project
5is a way to get maintainers of free software, translators, and users all
6together, so that will gradually become able to speak many languages.
7A few packages already provide translations for their messages.
8
9 If you found this `ABOUT-NLS' file inside a distribution, you may
10assume that the distributed package does use GNU `gettext' internally,
11itself available at your nearest GNU archive site. But you do _not_
12need to install GNU `gettext' prior to configuring, installing or using
13this package with messages translated.
14
15 Installers will find here some useful hints. These notes also
16explain how users should proceed for getting the programs to use the
17available translations. They tell how people wanting to contribute and
18work at translations should contact the appropriate team.
19
20 When reporting bugs in the `intl/' directory or bugs which may be
21related to internationalization, you should tell about the version of
22`gettext' which is used. The information can be found in the
23`intl/VERSION' file, in internationalized packages.
24
25Quick configuration advice
26==========================
27
28 If you want to exploit the full power of internationalization, you
29should configure it using
30
31 ./configure --with-included-gettext
32
33to force usage of internationalizing routines provided within this
34package, despite the existence of internationalizing capabilities in the
35operating system where this package is being installed. So far, only
36the `gettext' implementation in the GNU C library version 2 provides as
37many features (such as locale alias, message inheritance, automatic
38charset conversion or plural form handling) as the implementation here.
39It is also not possible to offer this additional functionality on top
40of a `catgets' implementation. Future versions of GNU `gettext' will
41very likely convey even more functionality. So it might be a good idea
42to change to GNU `gettext' as soon as possible.
43
44 So you need _not_ provide this option if you are using GNU libc 2 or
45you have installed a recent copy of the GNU gettext package with the
46included `libintl'.
47
48INSTALL Matters
49===============
50
51 Some packages are "localizable" when properly installed; the
52programs they contain can be made to speak your own native language.
53Most such packages use GNU `gettext'. Other packages have their own
54ways to internationalization, predating GNU `gettext'.
55
56 By default, this package will be installed to allow translation of
57messages. It will automatically detect whether the system already
58provides the GNU `gettext' functions. If not, the GNU `gettext' own
59library will be used. This library is wholly contained within this
60package, usually in the `intl/' subdirectory, so prior installation of
61the GNU `gettext' package is _not_ required. Installers may use
62special options at configuration time for changing the default
63behaviour. The commands:
64
65 ./configure --with-included-gettext
66 ./configure --disable-nls
67
68will respectively bypass any pre-existing `gettext' to use the
69internationalizing routines provided within this package, or else,
70_totally_ disable translation of messages.
71
72 When you already have GNU `gettext' installed on your system and run
73configure without an option for your new package, `configure' will
74probably detect the previously built and installed `libintl.a' file and
75will decide to use this. This might be not what is desirable. You
76should use the more recent version of the GNU `gettext' library. I.e.
77if the file `intl/VERSION' shows that the library which comes with this
78package is more recent, you should use
79
80 ./configure --with-included-gettext
81
82to prevent auto-detection.
83
84 The configuration process will not test for the `catgets' function
85and therefore it will not be used. The reason is that even an
86emulation of `gettext' on top of `catgets' could not provide all the
87extensions of the GNU `gettext' library.
88
89 Internationalized packages have usually many `po/LL.po' files, where
90LL gives an ISO 639 two-letter code identifying the language. Unless
91translations have been forbidden at `configure' time by using the
92`--disable-nls' switch, all available translations are installed
93together with the package. However, the environment variable `LINGUAS'
94may be set, prior to configuration, to limit the installed set.
95`LINGUAS' should then contain a space separated list of two-letter
96codes, stating which languages are allowed.
97
98Using This Package
99==================
100
101 As a user, if your language has been installed for this package, you
102only have to set the `LANG' environment variable to the appropriate
103`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
104and `CC' is an ISO 3166 two-letter country code. For example, let's
105suppose that you speak German and live in Germany. At the shell
106prompt, merely execute `setenv LANG de_DE' (in `csh'),
107`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
108This can be done from your `.login' or `.profile' file, once and for
109all.
110
111 You might think that the country code specification is redundant.
112But in fact, some languages have dialects in different countries. For
113example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
114country code serves to distinguish the dialects.
115
116 The locale naming convention of `LL_CC', with `LL' denoting the
117language and `CC' denoting the country, is the one use on systems based
118on GNU libc. On other systems, some variations of this scheme are
119used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
120locales supported by your system for your country by running the command
121`locale -a | grep '^LL''.
122
123 Not all programs have translations for all languages. By default, an
124English message is shown in place of a nonexistent translation. If you
125understand other languages, you can set up a priority list of languages.
126This is done through a different environment variable, called
127`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
128for the purpose of message handling, but you still need to have `LANG'
129set to the primary language; this is required by other parts of the
130system libraries. For example, some Swedish users who would rather
131read translations in German than English for when Swedish is not
132available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
133
134 In the `LANGUAGE' environment variable, but not in the `LANG'
135environment variable, `LL_CC' combinations can be abbreviated as `LL'
136to denote the language's main dialect. For example, `de' is equivalent
137to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
138(Portuguese as spoken in Portugal) in this context.
139
140Translating Teams
141=================
142
143 For the Free Translation Project to be a success, we need interested
144people who like their own language and write it well, and who are also
145able to synergize with other translators speaking the same language.
146Each translation team has its own mailing list. The up-to-date list of
147teams can be found at the Free Translation Project's homepage,
148`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
149area.
150
151 If you'd like to volunteer to _work_ at translating messages, you
152should become a member of the translating team for your own language.
153The subscribing address is _not_ the same as the list itself, it has
154`-request' appended. For example, speakers of Swedish can send a
155message to `sv-request@li.org', having this message body:
156
157 subscribe
158
159 Keep in mind that team members are expected to participate
160_actively_ in translations, or at solving translational difficulties,
161rather than merely lurking around. If your team does not exist yet and
162you want to start one, or if you are unsure about what to do or how to
163get started, please write to `translation@iro.umontreal.ca' to reach the
164coordinator for all translator teams.
165
166 The English team is special. It works at improving and uniformizing
167the terminology in use. Proven linguistic skill are praised more than
168programming skill, here.
169
170Available Packages
171==================
172
173 Languages are not equally supported in all packages. The following
174matrix shows the current state of internationalization, as of July
1752002. The matrix shows, in regard of each package, for which languages
176PO files have been submitted to translation coordination, with a
177translation percentage of at least 50%.
178
179 Ready PO files be bg ca cs da de el en eo es et fi fr
180 +----------------------------------------+
181 a2ps | [] [] [] [] |
182 bash | [] [] [] [] |
183 bfd | [] [] |
184 binutils | [] [] |
185 bison | [] [] [] [] |
186 clisp | [] [] [] [] |
187 clisp | |
188 clisplow | |
189 cpio | [] [] [] [] |
190 darkstat | () |
191 diffutils | [] [] [] [] [] [] |
192 enscript | [] [] |
193 error | [] [] [] |
194 fetchmail | [] () [] [] [] () |
195 fileutils | [] [] [] [] [] |
196 findutils | [] [] [] [] [] [] |
197 flex | [] [] [] [] [] |
198 gas | [] [] |
199 gawk | [] [] [] |
200 gcal | [] [] |
201 gcc | [] [] |
202 gettext | [] [] [] [] [] |
203 gnupg | [] [] [] [] [] [] [] |
204 gprof | [] [] |
205 gpsdrive | () () () () () |
206 grep | [] [] [] [] [] [] [] |
207 gretl | [] |
208 gthumb | () () () |
209 hello | [] [] [] [] [] [] [] [] [] |
210 id-utils | [] [] [] |
211 indent | [] [] [] [] [] |
212 jpilot | () [] [] [] |
213 jwhois | [] [] |
214 kbd | [] [] [] |
215 ld | [] [] |
216 libc | [] [] [] [] [] [] [] |
217 libiconv | [] [] [] [] |
218 lifelines | () () |
219 lilypond | [] [] [] |
220 lingoteach | [] [] |
221 lingoteach_lessons| () () |
222 lynx | [] [] [] [] [] |
223 m4 | [] [] [] [] [] |
224 make | [] [] [] [] |
225 man-db | [] () () [] () () |
226 mysecretdiary | [] [] [] |
227 nano | [] () [] [] [] [] |
228 nano_1_0 | [] () [] [] [] [] |
229 opcodes | [] [] [] |
230 parted | [] [] [] [] [] |
231 ptx | [] [] [] [] [] [] [] |
232 python | |
233 recode | [] [] [] [] [] [] |
234 sed | [] [] [] [] [] [] [] [] [] |
235 sh-utils | [] [] [] [] |
236 sharutils | [] [] [] [] [] [] |
237 sketch | () [] () |
238 soundtracker | [] [] [] |
239 sp | [] |
240 tar | [] [] [] [] [] [] |
241 texinfo | [] [] [] [] [] |
242 textutils | [] [] [] [] [] |
243 util-linux | [] [] [] [] [] [] |
244 vorbis-tools | [] |
245 wastesedge | |
246 wdiff | [] [] [] [] [] [] |
247 wget | [] [] [] [] [] [] [] [] [] [] |
248 +----------------------------------------+
249 be bg ca cs da de el en eo es et fi fr
250 0 2 19 10 30 44 9 1 12 45 16 3 53
251
252 gl he hr hu id it ja ko lv nb nl nn
253 +-------------------------------------+
254 a2ps | () () [] |
255 bash | [] |
256 bfd | [] |
257 binutils | [] |
258 bison | [] [] [] [] |
259 clisp | [] |
260 clisp | |
261 clisplow | |
262 cpio | [] [] [] [] |
263 darkstat | () |
264 diffutils | [] [] [] [] [] |
265 enscript | [] [] |
266 error | [] |
267 fetchmail | [] |
268 fileutils | [] [] [] |
269 findutils | [] [] [] [] [] [] [] [] |
270 flex | [] |
271 gas | |
272 gawk | [] |
273 gcal | |
274 gcc | [] |
275 gettext | [] [] |
276 gnupg | [] [] [] [] |
277 gprof | |
278 gpsdrive | [] () () |
279 grep | [] [] [] [] [] [] [] |
280 gretl | |
281 gthumb | () () |
282 hello | [] [] [] [] [] [] [] [] [] [] [] [] |
283 id-utils | [] [] |
284 indent | [] [] [] [] |
285 jpilot | () () |
286 jwhois | [] [] |
287 kbd | |
288 ld | |
289 libc | [] [] [] [] |
290 libiconv | [] [] [] |
291 lifelines | |
292 lilypond | [] [] |
293 lingoteach | [] |
294 lingoteach_lessons| |
295 lynx | [] [] [] [] |
296 m4 | [] [] [] [] |
297 make | [] [] [] [] [] [] |
298 man-db | () () |
299 mysecretdiary | [] |
300 nano | [] [] [] [] [] [] |
301 nano_1_0 | [] [] [] [] [] |
302 opcodes | [] [] |
303 parted | [] [] [] |
304 ptx | [] [] [] [] [] |
305 python | |
306 recode | [] [] [] |
307 sed | [] [] [] [] [] [] [] [] |
308 sh-utils | [] [] [] |
309 sharutils | [] [] [] |
310 sketch | () |
311 soundtracker | [] [] |
312 sp | |
313 tar | [] [] [] [] [] |
314 texinfo | [] [] [] |
315 textutils | [] [] [] |
316 util-linux | () [] |
317 vorbis-tools | |
318 wastesedge | |
319 wdiff | [] [] [] |
320 wget | [] [] [] [] [] [] |
321 +-------------------------------------+
322 gl he hr hu id it ja ko lv nb nl nn
323 23 9 12 18 14 13 26 9 1 8 19 4
324
325 no pl pt pt_BR ru sk sl sv tr uk zh_TW
326 +----------------------------------------+
327 a2ps | () () () [] [] [] [] [] | 10
328 bash | [] | 6
329 bfd | [] [] | 5
330 binutils | [] [] | 5
331 bison | [] [] [] | 11
332 clisp | | 5
333 clisp | | 0
334 clisplow | | 0
335 cpio | [] [] [] [] | 12
336 darkstat | [] () | 1
337 diffutils | [] [] [] [] [] [] | 17
338 enscript | [] [] [] [] | 8
339 error | [] [] [] | 7
340 fetchmail | () () [] | 6
341 fileutils | [] [] [] [] [] | 13
342 findutils | [] [] [] [] [] [] [] | 21
343 flex | [] [] [] | 9
344 gas | [] | 3
345 gawk | [] [] | 6
346 gcal | [] [] | 4
347 gcc | [] | 4
348 gettext | [] [] [] [] [] [] | 13
349 gnupg | [] [] [] | 14
350 gprof | [] [] | 4
351 gpsdrive | [] [] () | 3
352 grep | [] [] [] [] | 18
353 gretl | | 1
354 gthumb | () () [] | 1
355 hello | [] [] [] [] [] [] [] | 28
356 id-utils | [] [] [] [] | 9
357 indent | [] [] [] [] [] | 14
358 jpilot | () () [] | 4
359 jwhois | [] () () [] [] | 7
360 kbd | [] [] | 5
361 ld | [] [] | 4
362 libc | [] [] [] [] [] [] | 17
363 libiconv | [] [] [] [] | 11
364 lifelines | [] | 1
365 lilypond | [] | 6
366 lingoteach | [] [] | 5
367 lingoteach_lessons| | 0
368 lynx | [] [] [] [] | 13
369 m4 | [] [] [] | 12
370 make | [] [] [] [] | 14
371 man-db | | 3
372 mysecretdiary | [] [] [] | 7
373 nano | [] [] [] [] | 15
374 nano_1_0 | [] [] [] [] | 14
375 opcodes | [] [] | 7
376 parted | [] [] [] | 11
377 ptx | [] [] [] [] [] [] [] | 19
378 python | | 0
379 recode | [] [] [] [] [] [] | 15
380 sed | [] [] [] [] [] [] | 23
381 sh-utils | [] | 8
382 sharutils | [] [] [] [] | 13
383 sketch | [] () [] | 4
384 soundtracker | [] | 6
385 sp | | 1
386 tar | [] [] [] [] [] [] [] | 18
387 texinfo | [] [] | 10
388 textutils | [] [] [] [] [] | 13
389 util-linux | [] [] [] | 10
390 vorbis-tools | [] | 2
391 wastesedge | | 0
392 wdiff | [] [] [] [] [] | 14
393 wget | [] [] [] [] [] [] [] [] | 24
394 +----------------------------------------+
395 36 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW
396 67 domains 4 15 2 24 26 12 10 47 42 4 8 594
397
398 Some counters in the preceding matrix are higher than the number of
399visible blocks let us expect. This is because a few extra PO files are
400used for implementing regional variants of languages, or language
401dialects.
402
403 For a PO file in the matrix above to be effective, the package to
404which it applies should also have been internationalized and
405distributed as such by its maintainer. There might be an observable
406lag between the mere existence a PO file and its wide availability in a
407distribution.
408
409 If July 2002 seems to be old, you may fetch a more recent copy of
410this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
411matrix with full percentage details can be found at
412`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
413
414Using `gettext' in new packages
415===============================
416
417 If you are writing a freely available program and want to
418internationalize it you are welcome to use GNU `gettext' in your
419package. Of course you have to respect the GNU Library General Public
420License which covers the use of the GNU `gettext' library. This means
421in particular that even non-free programs can use `libintl' as a shared
422library, whereas only free software can use `libintl' as a static
423library or use modified versions of `libintl'.
424
425 Once the sources are changed appropriately and the setup can handle
426to use of `gettext' the only thing missing are the translations. The
427Free Translation Project is also available for packages which are not
428developed inside the GNU project. Therefore the information given above
429applies also for every other Free Software Project. Contact
430`translation@iro.umontreal.ca' to make the `.pot' files available to
431the translation teams.
432
diff --git a/ChangeLog b/ChangeLog
index 92b63df..965d436 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12003-07-02 gettextize <bug-gnu-gettext@gnu.org>
2
3 * Makefile.am (SUBDIRS): Add intl.
4 (EXTRA_DIST): Add config.rpath.
5 * configure.in (AC_OUTPUT): Add intl/Makefile,
6
12003-03-02 kdebisschop@alert.infoplease.com <kdebisschop> 72003-03-02 kdebisschop@alert.infoplease.com <kdebisschop>
2 8
3 * configure.in, nagios-plugins.spec.in: 9 * configure.in, nagios-plugins.spec.in:
diff --git a/Makefile.am b/Makefile.am
index 02514aa..20d5590 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,21 +1,25 @@
1## Process this file with automake to produce Makefile.in 1## Process this file with automake to produce Makefile.in
2 2
3SUBDIRS = lib plugins plugins-scripts 3SUBDIRS = intl lib plugins plugins-scripts po
4 4
5EXTRA_DIST = CODING FAQ LEGAL REQUIREMENTS SUPPORT \ 5EXTRA_DIST = config.rpath \
6 ABOUT-NLS CODING FAQ LEGAL REQUIREMENTS SUPPORT \
6 Helper.pm contrib pkg nagios-plugins.spec.in 7 Helper.pm contrib pkg nagios-plugins.spec.in
7 8
8ACLOCAL_AMFLAGS = -I lib 9ACLOCAL_AMFLAGS = -I lib
9 10
11localedir = $(datadir)/locale
12DEFS = -DLOCALEDIR=\"$(localedir)\"
13
10dist-hook: 14dist-hook:
11 sed "s/%%{VER}/${VER}/;s/%%{REL}/${REL}/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec 15 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec
12 16
13test: 17test:
14 cd plugins; $(MAKE) test 18 cd plugins; $(MAKE) test
15 cd plugins-scripts; $(MAKE) test 19 cd plugins-scripts; $(MAKE) test
16 20
17nagios-plugins.spec: nagios-plugins.spec.in 21nagios-plugins.spec: nagios-plugins.spec.in
18 sed "s/%%{VER}/${VER}/;s/%%{REL}/${REL}/;" $? > $@ 22 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;" $? > $@
19 23
20# Solaris pkgmk 24# Solaris pkgmk
21BUILDDIR = build-solaris 25BUILDDIR = build-solaris
diff --git a/configure.in b/configure.in
index a6261c6..5c067b4 100644
--- a/configure.in
+++ b/configure.in
@@ -1,23 +1,18 @@
1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2AC_REVISION ($Revision$) 2AC_REVISION ($Revision$)
3AC_PREREQ(2.50) 3AC_PREREQ(2.50)
4AC_INIT(Helper.pm) 4AC_INIT(nagios-plugins,1.3.99)
5VER=1.3.99 5AC_CONFIG_SRCDIR(Helper.pm)
6REL=1 6AM_INIT_AUTOMAKE
7AC_SUBST(VER)
8AC_SUBST(REL)
9PACKAGE_VERSION="${VER}"
10AC_SUBST(PACKAGE_VERSION)
11PACKAGE_RELEASE="${REL}"
12AC_SUBST(PACKAGE_RELEASE)
13AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
14AM_CONFIG_HEADER(plugins/config.h) 7AM_CONFIG_HEADER(plugins/config.h)
15AC_CANONICAL_HOST 8AC_CANONICAL_HOST
16 9
10RELEASE=1
11AC_SUBST(RELEASE)
12
17AC_PREFIX_DEFAULT(/usr/local/nagios) 13AC_PREFIX_DEFAULT(/usr/local/nagios)
18 14
19dnl Figure out how to invoke "install" and what install options to use. 15dnl Figure out how to invoke "install" and what install options to use.
20
21AC_PROG_INSTALL 16AC_PROG_INSTALL
22AC_SUBST(INSTALL) 17AC_SUBST(INSTALL)
23 18
@@ -1394,9 +1389,10 @@ AC_SUBST(EXTRAS)
1394AC_SUBST(EXTRA_NETOBJS) 1389AC_SUBST(EXTRA_NETOBJS)
1395AC_SUBST(DEPLIBS) 1390AC_SUBST(DEPLIBS)
1396 1391
1397AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}",[package version]) 1392GETTEXT_VERSION=0.11.4
1393AM_GNU_GETTEXT
1398 1394
1399AC_OUTPUT(Makefile lib/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo) 1395AC_OUTPUT(Makefile lib/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo intl/Makefile po/Makefile.in )
1400 1396
1401ACX_FEATURE([with],[cgiurl]) 1397ACX_FEATURE([with],[cgiurl])
1402ACX_FEATURE([with],[nagios-user]) 1398ACX_FEATURE([with],[nagios-user])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4c99944..da8f678 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -6,6 +6,6 @@ noinst_HEADERS = getopt.h fsusage.h mountlist.h
6 6
7libnagiosplug_a_SOURCES = getopt.c getopt1.c getloadavg.c snprintf.c fsusage.c mountlist.c 7libnagiosplug_a_SOURCES = getopt.c getopt1.c getloadavg.c snprintf.c fsusage.c mountlist.c
8 8
9EXTRA_DIST = afs.m4 fstypename.m4 fsusage.m4 ls-mntd-fs.m4 9EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 afs.m4 fstypename.m4 fsusage.m4 ls-mntd-fs.m4
10 10
11INCLUDES = -I$(srcdir) 11INCLUDES = -I$(srcdir)
diff --git a/lib/gettext.h b/lib/gettext.h
new file mode 100644
index 0000000..8b262f4
--- /dev/null
+++ b/lib/gettext.h
@@ -0,0 +1,69 @@
1/* Convenience header for conditional use of GNU <libintl.h>.
2 Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19#ifndef _LIBGETTEXT_H
20#define _LIBGETTEXT_H 1
21
22/* NLS can be disabled through the configure --disable-nls option. */
23#if ENABLE_NLS
24
25/* Get declarations of GNU message catalog functions. */
26# include <libintl.h>
27
28#else
29
30/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
31 chokes if dcgettext is defined as a macro. So include it now, to make
32 later inclusions of <locale.h> a NOP. We don't include <libintl.h>
33 as well because people using "gettext.h" will not include <libintl.h>,
34 and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
35 is OK. */
36#if defined(__sun)
37# include <locale.h>
38#endif
39
40/* Disabled NLS.
41 The casts to 'const char *' serve the purpose of producing warnings
42 for invalid uses of the value returned from these functions.
43 On pre-ANSI systems without 'const', the config.h file is supposed to
44 contain "#define const". */
45# define gettext(Msgid) ((const char *) (Msgid))
46# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
47# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
48# define ngettext(Msgid1, Msgid2, N) \
49 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
50# define dngettext(Domainname, Msgid1, Msgid2, N) \
51 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
52# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
53 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
54# define textdomain(Domainname) ((const char *) (Domainname))
55# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
56# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
57
58#endif
59
60/* A pseudo function call that serves as a marker for the automated
61 extraction of messages, but does not call gettext(). The run-time
62 translation is done at a different place in the code.
63 The argument, String, should be a literal string. Concatenated strings
64 and other string expressions won't work.
65 The macro's expansion is not parenthesized, so that it is suitable as
66 initializer for static 'char[]' or 'const char[]' variables. */
67#define gettext_noop(String) String
68
69#endif /* _LIBGETTEXT_H */
diff --git a/nagios-plugins.spec.in b/nagios-plugins.spec.in
index 912f5b3..2431f35 100644
--- a/nagios-plugins.spec.in
+++ b/nagios-plugins.spec.in
@@ -8,8 +8,8 @@
8%define name %{archive} 8%define name %{archive}
9%endif 9%endif
10 10
11%define version %%{VER} 11%define version %%{VERSION}
12%define release %%{REL} 12%define release %%{RELEASE}
13%define source %{archive}-%{version} 13%define source %{archive}-%{version}
14 14
15Name: %{name} 15Name: %{name}
@@ -69,8 +69,11 @@ will need to install the '--nodeps' option when invoking `rpm`
69 69
70%build 70%build
71CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \ 71CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
72--prefix=%{_prefix}/lib/nagios/plugins \ 72--prefix=%{_prefix} \
73--libexecdir=%{_prefix}/lib/nagios/plugins \ 73--exec-prefix=%{_exec_prefix} \
74--libexecdir=%{_exec_prefix}/lib/nagios/plugins \
75--sysconfdir=%{_sysconfdir}/nagios \
76--datadir=%{_datadir} \
74--with-cgiurl=/nagios/cgi-bin 77--with-cgiurl=/nagios/cgi-bin
75make 78make
76 79
@@ -90,68 +93,71 @@ rm -rf $RPM_BUILD_ROOT
90%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT 93%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT
91%doc ChangeLog command.cfg 94%doc ChangeLog command.cfg
92%defattr(775,root,root) 95%defattr(775,root,root)
93%dir %{_prefix}/lib/nagios/plugins 96%dir %{_exec_prefix}/lib/nagios/plugins
97%{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo
98%{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo
94%if %custom 99%if %custom
95%{_prefix}/lib/nagios/plugins/* 100%{_exec_prefix}/lib/nagios/plugins/*
96%else 101%else
97%{_prefix}/lib/nagios/plugins/check_by_ssh 102%{_exec_prefix}/lib/nagios/plugins/check_by_ssh
98%{_prefix}/lib/nagios/plugins/check_breeze 103%{_exec_prefix}/lib/nagios/plugins/check_breeze
99%{_prefix}/lib/nagios/plugins/check_dig 104%{_exec_prefix}/lib/nagios/plugins/check_dig
100%{_prefix}/lib/nagios/plugins/check_disk 105%{_exec_prefix}/lib/nagios/plugins/check_disk
101%{_prefix}/lib/nagios/plugins/check_disk_smb 106%{_exec_prefix}/lib/nagios/plugins/check_disk_smb
102%{_prefix}/lib/nagios/plugins/check_dns 107%{_exec_prefix}/lib/nagios/plugins/check_dns
103%{_prefix}/lib/nagios/plugins/check_dummy 108%{_exec_prefix}/lib/nagios/plugins/check_dummy
104%{_prefix}/lib/nagios/plugins/check_flexlm 109%{_exec_prefix}/lib/nagios/plugins/check_flexlm
105%{_prefix}/lib/nagios/plugins/check_ftp 110%{_exec_prefix}/lib/nagios/plugins/check_ftp
106%{_prefix}/lib/nagios/plugins/check_http 111%{_exec_prefix}/lib/nagios/plugins/check_http
107%{_prefix}/lib/nagios/plugins/check_ifoperstatus 112%{_exec_prefix}/lib/nagios/plugins/check_ifoperstatus
108%{_prefix}/lib/nagios/plugins/check_ifstatus 113%{_exec_prefix}/lib/nagios/plugins/check_ifstatus
109%{_prefix}/lib/nagios/plugins/check_imap 114%{_exec_prefix}/lib/nagios/plugins/check_imap
110%{_prefix}/lib/nagios/plugins/check_ircd 115%{_exec_prefix}/lib/nagios/plugins/check_ircd
111%{_prefix}/lib/nagios/plugins/check_load 116%{_exec_prefix}/lib/nagios/plugins/check_load
112%{_prefix}/lib/nagios/plugins/check_log 117%{_exec_prefix}/lib/nagios/plugins/check_log
113%{_prefix}/lib/nagios/plugins/check_mailq 118%{_exec_prefix}/lib/nagios/plugins/check_mailq
114%{_prefix}/lib/nagios/plugins/check_mrtg 119%{_exec_prefix}/lib/nagios/plugins/check_mrtg
115%{_prefix}/lib/nagios/plugins/check_mrtgtraf 120%{_exec_prefix}/lib/nagios/plugins/check_mrtgtraf
116%{_prefix}/lib/nagios/plugins/check_nagios 121%{_exec_prefix}/lib/nagios/plugins/check_nagios
117%{_prefix}/lib/nagios/plugins/check_nntp 122%{_exec_prefix}/lib/nagios/plugins/check_nntp
118%{_prefix}/lib/nagios/plugins/check_nt 123%{_exec_prefix}/lib/nagios/plugins/check_nt
119%{_prefix}/lib/nagios/plugins/check_ntp 124%{_exec_prefix}/lib/nagios/plugins/check_ntp
120%{_prefix}/lib/nagios/plugins/check_nwstat 125%{_exec_prefix}/lib/nagios/plugins/check_nwstat
121%{_prefix}/lib/nagios/plugins/check_oracle 126%{_exec_prefix}/lib/nagios/plugins/check_oracle
122%{_prefix}/lib/nagios/plugins/check_overcr 127%{_exec_prefix}/lib/nagios/plugins/check_overcr
123%{_prefix}/lib/nagios/plugins/check_ping 128%{_exec_prefix}/lib/nagios/plugins/check_ping
124%{_prefix}/lib/nagios/plugins/check_pop 129%{_exec_prefix}/lib/nagios/plugins/check_pop
125%{_prefix}/lib/nagios/plugins/check_procs 130%{_exec_prefix}/lib/nagios/plugins/check_procs
126%{_prefix}/lib/nagios/plugins/check_real 131%{_exec_prefix}/lib/nagios/plugins/check_real
127%{_prefix}/lib/nagios/plugins/check_rpc 132%{_exec_prefix}/lib/nagios/plugins/check_rpc
128%{_prefix}/lib/nagios/plugins/check_sensors 133%{_exec_prefix}/lib/nagios/plugins/check_sensors
129%{_prefix}/lib/nagios/plugins/check_smtp 134%{_exec_prefix}/lib/nagios/plugins/check_smtp
130%{_prefix}/lib/nagios/plugins/check_ssh 135%{_exec_prefix}/lib/nagios/plugins/check_ssh
131%{_prefix}/lib/nagios/plugins/check_swap 136%{_exec_prefix}/lib/nagios/plugins/check_swap
132%{_prefix}/lib/nagios/plugins/check_tcp 137%{_exec_prefix}/lib/nagios/plugins/check_tcp
133%{_prefix}/lib/nagios/plugins/check_time 138%{_exec_prefix}/lib/nagios/plugins/check_time
134%{_prefix}/lib/nagios/plugins/check_udp 139%{_exec_prefix}/lib/nagios/plugins/check_udp
135%{_prefix}/lib/nagios/plugins/check_ups 140%{_exec_prefix}/lib/nagios/plugins/check_ups
136%{_prefix}/lib/nagios/plugins/check_users 141%{_exec_prefix}/lib/nagios/plugins/check_users
137%{_prefix}/lib/nagios/plugins/check_wave 142%{_exec_prefix}/lib/nagios/plugins/check_wave
138%{_prefix}/lib/nagios/plugins/negate 143%{_exec_prefix}/lib/nagios/plugins/negate
139%{_prefix}/lib/nagios/plugins/utils.pm 144%{_exec_prefix}/lib/nagios/plugins/utils.pm
140%{_prefix}/lib/nagios/plugins/utils.sh 145%{_exec_prefix}/lib/nagios/plugins/utils.sh
141%{_prefix}/lib/nagios/plugins/urlize 146%{_exec_prefix}/lib/nagios/plugins/urlize
147%{_exec_prefix}/lib/nagios/plugins/check_file_age
142%endif 148%endif
143 149
144%if ! %custom 150%if ! %custom
145%files extras 151%files extras
146%defattr(775,root,root) 152%defattr(775,root,root)
147%{_prefix}/lib/nagios/plugins/check_fping 153%{_exec_prefix}/lib/nagios/plugins/check_fping
148%{_prefix}/lib/nagios/plugins/check_game 154%{_exec_prefix}/lib/nagios/plugins/check_game
149%{_prefix}/lib/nagios/plugins/check_ldap 155%{_exec_prefix}/lib/nagios/plugins/check_ldap
150%{_prefix}/lib/nagios/plugins/check_mysql 156%{_exec_prefix}/lib/nagios/plugins/check_mysql
151%{_prefix}/lib/nagios/plugins/check_pgsql 157%{_exec_prefix}/lib/nagios/plugins/check_pgsql
152%{_prefix}/lib/nagios/plugins/check_radius 158%{_exec_prefix}/lib/nagios/plugins/check_radius
153%{_prefix}/lib/nagios/plugins/check_snmp 159%{_exec_prefix}/lib/nagios/plugins/check_snmp
154%{_prefix}/lib/nagios/plugins/check_hpjd 160%{_exec_prefix}/lib/nagios/plugins/check_hpjd
155 161
156%endif 162%endif
157 163
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 6d817b1..19c02cd 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -2,7 +2,13 @@
2 2
3VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t 3VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t
4 4
5INCLUDES = -I.. -I$(top_srcdir)/lib @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ 5INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl \
6@LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@
7
8datadir = @datadir@
9localedir = $(datadir)/locale
10DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
11LIBS = @LIBINTL@ @LIBS@
6 12
7libexec_PROGRAMS = check_disk check_dummy check_http check_load \ 13libexec_PROGRAMS = check_disk check_dummy check_http check_load \
8 check_mrtg check_mrtgtraf check_nwstat check_overcr check_ping \ 14 check_mrtg check_mrtgtraf check_nwstat check_overcr check_ping \
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index ce4fd31..afb1a68 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -15,59 +15,6 @@
15* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16* 16*
17*****************************************************************************/ 17*****************************************************************************/
18
19/* progname changes depending on symlink called */
20char *progname = "check_tcp";
21const char *revision = "$Revision$";
22const char *copyright = "2002-2003";
23const char *authors = "Nagios Plugin Development Team";
24const char *email = "nagiosplug-devel@lists.sourceforge.net";
25
26const char *summary = "\
27This plugin tests %s connections with the specified host.\n";
28
29const char *option_summary = "\
30-H host -p port [-w warn_time] [-c crit_time] [-s send_string]\n\
31 [-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n\
32 [-t to_sec] [-r refuse_state] [-v] [-4|-6]\n";
33
34const char *options = "\
35 -H, --hostname=ADDRESS\n\
36 Host name argument for servers using host headers (use numeric\n\
37 address if possible to bypass DNS lookup).\n\
38 -p, --port=INTEGER\n\
39 Port number\n\
40 -4, --use-ipv4\n\
41 Use IPv4 connection\n\
42 -6, --use-ipv6\n\
43 Use IPv6 connection\n\
44 -s, --send=STRING\n\
45 String to send to the server\n\
46 -e, --expect=STRING\n\
47 String to expect in server response\n\
48 -q, --quit=STRING\n\
49 String to send server to initiate a clean close of the connection\n\
50 -m, --maxbytes=INTEGER\n\
51 Close connection once more than this number of bytes are received\n\
52 -d, --delay=INTEGER\n\
53 Seconds to wait between sending string and polling for response\n\
54 -w, --warning=DOUBLE\n\
55 Response time to result in warning status (seconds)\n\
56 -c, --critical=DOUBLE\n\
57 Response time to result in critical status (seconds)\n\
58 -t, --timeout=INTEGER\n\
59 Seconds before connection times out (default: %d)\n\
60 -r, --refuse=ok|warn|crit\n\
61 Accept tcp refusals with states ok, warn, crit (default: crit)\n\
62 -v, --verbose\n\
63 Show details for command-line debugging (Nagios may truncate output)\n";
64
65const char *standard_options = "\
66 -h, --help\n\
67 Print detailed help screen\n\
68 -V, --version\n\
69 Print version information\n\n";
70
71#include "config.h" 18#include "config.h"
72#include "common.h" 19#include "common.h"
73#include "netutils.h" 20#include "netutils.h"
@@ -137,6 +84,13 @@ int use_ssl = FALSE;
137int sd = 0; 84int sd = 0;
138char *buffer = ""; 85char *buffer = "";
139 86
87/* progname changes depending on symlink called */
88char *progname = "check_tcp";
89const char *revision = "$Revision$";
90const char *copyright = "2002-2003";
91const char *authors = "Nagios Plugin Development Team";
92const char *email = "nagiosplug-devel@lists.sourceforge.net";
93
140int 94int
141main (int argc, char **argv) 95main (int argc, char **argv)
142{ 96{
@@ -145,6 +99,10 @@ main (int argc, char **argv)
145 char *status = ""; 99 char *status = "";
146 struct timeval tv; 100 struct timeval tv;
147 101
102 setlocale (LC_ALL, "");
103 bindtextdomain (PACKAGE, LOCALEDIR);
104 textdomain (PACKAGE);
105
148 if (strstr (argv[0], "check_udp")) { 106 if (strstr (argv[0], "check_udp")) {
149 progname = strdup ("check_udp"); 107 progname = strdup ("check_udp");
150 SERVICE = strdup ("UDP"); 108 SERVICE = strdup ("UDP");
@@ -301,7 +259,7 @@ main (int argc, char **argv)
301 asprintf (&status, "%s%s", status, buffer); 259 asprintf (&status, "%s%s", status, buffer);
302 if (buffer[i-2] == '\r' && buffer[i-1] == '\n') 260 if (buffer[i-2] == '\r' && buffer[i-1] == '\n')
303 break; 261 break;
304 if (maxbytes>0 && strlen(status)>=maxbytes) 262 if (maxbytes>0 && strlen(status) >= (unsigned)maxbytes)
305 break; 263 break;
306 } 264 }
307 265
@@ -547,19 +505,68 @@ void
547print_help (void) 505print_help (void)
548{ 506{
549 print_revision (progname, revision); 507 print_revision (progname, revision);
508
550 printf ("Copyright (c) %s %s\n\t<%s>\n\n", copyright, authors, email); 509 printf ("Copyright (c) %s %s\n\t<%s>\n\n", copyright, authors, email);
551 printf (summary, SERVICE); 510
511 printf (_("\
512This plugin tests %s connections with the specified host.\n"), SERVICE);
513
552 print_usage (); 514 print_usage ();
515
553 printf ("\nOptions:\n"); 516 printf ("\nOptions:\n");
554 printf (options, DEFAULT_SOCKET_TIMEOUT); 517
555 printf (standard_options); 518 printf (_("\
519 -H, --hostname=ADDRESS\n\
520 Host name argument for servers using host headers (use numeric\n\
521 address if possible to bypass DNS lookup).\n\
522 -p, --port=INTEGER\n\
523 Port number\n\
524 -4, --use-ipv4\n\
525 Use IPv4 connection\n\
526 -6, --use-ipv6\n\
527 Use IPv6 connection\n"));
528
529 printf (_("\
530 -s, --send=STRING\n\
531 String to send to the server\n\
532 -e, --expect=STRING\n\
533 String to expect in server response\n\
534 -q, --quit=STRING\n\
535 String to send server to initiate a clean close of the connection\n"));
536
537 printf (_("\
538 -r, --refuse=ok|warn|crit\n\
539 Accept tcp refusals with states ok, warn, crit (default: crit)\n\
540 -m, --maxbytes=INTEGER\n\
541 Close connection once more than this number of bytes are received\n\
542 -d, --delay=INTEGER\n\
543 Seconds to wait between sending string and polling for response\n\
544 -w, --warning=DOUBLE\n\
545 Response time to result in warning status (seconds)\n\
546 -c, --critical=DOUBLE\n\
547 Response time to result in critical status (seconds)\n"));
548
549 printf (_("\
550 -t, --timeout=INTEGER\n\
551 Seconds before connection times out (default: %d)\n\
552 -v, --verbose\n\
553 Show details for command-line debugging (Nagios may truncate output)\n\
554 -h, --help\n\
555 Print detailed help screen\n\
556 -V, --version\n\
557 Print version information\n\n"),
558 DEFAULT_SOCKET_TIMEOUT);
559
556 support (); 560 support ();
557} 561}
558 562
559void 563void
560print_usage (void) 564print_usage (void)
561{ 565{
562 printf ("Usage: %s %s\n", progname, option_summary); 566 printf ("Usage: %s %s\n", progname, _("\
567-H host -p port [-w warn_time] [-c crit_time] [-s send_string]\n\
568 [-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n\
569 [-t to_sec] [-r refuse_state] [-v] [-4|-6]\n"));
563 printf (" %s (-h|--help)\n", progname); 570 printf (" %s (-h|--help)\n", progname);
564 printf (" %s (-V|--version)\n", progname); 571 printf (" %s (-V|--version)\n", progname);
565} 572}
diff --git a/plugins/common.h b/plugins/common.h
index 21facfc..2456c41 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -156,7 +156,14 @@ enum {
156 * 156 *
157 */ 157 */
158 158
159#define _(String) (String) 159#if ENABLE_NLS
160#define N_(String) String 160# include "gettext.h"
161#define textdomain(Domain) 161# define _(String) gettext (String)
162#define bindtextdomain(Package, Directory) 162# define gettext_noop(String) String
163# define N_(String) gettext_noop String
164#else
165# define _(String) (String)
166# define N_(String) String
167# define textdomain(Domain)
168# define bindtextdomain(Package, Directory)
169#endif
diff --git a/plugins/utils.c b/plugins/utils.c
index d0999c5..e63c8c0 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -133,8 +133,8 @@ print_revision (const char *command_name, const char *revision_string)
133 133
134 if (sscanf (revision_string, "$Revision: %[0-9.]", plugin_revision) != 1) 134 if (sscanf (revision_string, "$Revision: %[0-9.]", plugin_revision) != 1)
135 strncpy (plugin_revision, "N/A", STRLEN); 135 strncpy (plugin_revision, "N/A", STRLEN);
136 printf ("%s (nagios-plugins %s) %s\n", 136 printf ("%s (%s %s) %s\n",
137 progname, VERSION, plugin_revision); 137 progname, PACKAGE, VERSION, plugin_revision);
138 printf 138 printf
139 ("The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n" 139 ("The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"
140 "copies of the plugins under the terms of the GNU General Public License.\n" 140 "copies of the plugins under the terms of the GNU General Public License.\n"
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..6d25a92
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1 @@
fr de \ No newline at end of file
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..eb8529c
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1 @@
plugins/check_tcp.c
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..a9d5116
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,79 @@
1# German Language Translation File.
2# Copyright (C) YEAR Nagios Plugin Development Group
3# This file is distributed under the same license as the nagios-plugins package.
4# Karl DeBisschop <kdebisschop@users.sourceforge.net>, 2003.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: nagios-plugins 1.3.99\n"
10"POT-Creation-Date: 2003-07-25 23:10-0400\n"
11"PO-Revision-Date: 2003-07-20 22:24-0400\n"
12"Last-Translator: Michael Wirtgen <Michael.Wirtgen@miwi-dv.com>\n"
13"Language-Team: de <LL@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17
18#: plugins/check_tcp.c:516
19#, c-format
20msgid "This plugin tests %s connections with the specified host.\n"
21msgstr ""
22
23#: plugins/check_tcp.c:523
24msgid ""
25" -H, --hostname=ADDRESS\n"
26" Host name argument for servers using host headers (use numeric\n"
27" address if possible to bypass DNS lookup).\n"
28" -p, --port=INTEGER\n"
29" Port number\n"
30" -4, --use-ipv4\n"
31" Use IPv4 connection\n"
32" -6, --use-ipv6\n"
33" Use IPv6 connection\n"
34msgstr ""
35
36#: plugins/check_tcp.c:534
37msgid ""
38" -s, --send=STRING\n"
39" String to send to the server\n"
40" -e, --expect=STRING\n"
41" String to expect in server response\n"
42" -q, --quit=STRING\n"
43" String to send server to initiate a clean close of the connection\n"
44msgstr ""
45
46#: plugins/check_tcp.c:542
47msgid ""
48" -r, --refuse=ok|warn|crit\n"
49" Accept tcp refusals with states ok, warn, crit (default: crit)\n"
50" -m, --maxbytes=INTEGER\n"
51" Close connection once more than this number of bytes are received\n"
52" -d, --delay=INTEGER\n"
53" Seconds to wait between sending string and polling for response\n"
54" -w, --warning=DOUBLE\n"
55" Response time to result in warning status (seconds)\n"
56" -c, --critical=DOUBLE\n"
57" Response time to result in critical status (seconds)\n"
58msgstr ""
59
60#: plugins/check_tcp.c:554
61#, c-format
62msgid ""
63" -t, --timeout=INTEGER\n"
64" Seconds before connection times out (default: %d)\n"
65" -v, --verbose\n"
66" Show details for command-line debugging (Nagios may truncate output)\n"
67" -h, --help\n"
68" Print detailed help screen\n"
69" -V, --version\n"
70" Print version information\n"
71"\n"
72msgstr ""
73
74#: plugins/check_tcp.c:571
75msgid ""
76"-H host -p port [-w warn_time] [-c crit_time] [-s send_string]\n"
77"\t[-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n"
78"\t[-t to_sec] [-r refuse_state] [-v] [-4|-6]\n"
79msgstr ""
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..8f035a0
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,115 @@
1# Messages français pour Nagios Plugins
2# Copyright (C) 2003 Nagios Plugin Development Group
3# This file is distributed under the same license as the PACKAGE package.
4# Karl DeBisschop <kdebisschop@users.sourceforge.net>, 2003.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: nagios-plugins 1.3.99\n"
9"POT-Creation-Date: 2003-07-25 23:10-0400\n"
10"PO-Revision-Date: 2003-07-25 06:55-0400\n"
11"Last-Translator: Pierre-Antoine Angelini <paangelini@users.sourceforge.net>\n"
12"Language-Team: French <traduc@traduc.org>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17#: plugins/check_tcp.c:516
18#, c-format
19msgid "This plugin tests %s connections with the specified host.\n"
20msgstr "Le plugin tests a %s connection with l'host specified\n"
21
22#: plugins/check_tcp.c:523
23msgid ""
24" -H, --hostname=ADDRESS\n"
25" Host name argument for servers using host headers (use numeric\n"
26" address if possible to bypass DNS lookup).\n"
27" -p, --port=INTEGER\n"
28" Port number\n"
29" -4, --use-ipv4\n"
30" Use IPv4 connection\n"
31" -6, --use-ipv6\n"
32" Use IPv6 connection\n"
33msgstr ""
34" -H, --hostname=ADDRESS\n"
35" Host name argument for servers using host headers (use numeric\n"
36" address if possible to bypass DNS lookup).\n"
37" -p, --port=INTEGER\n"
38" Port number\n"
39" -4, --use-ipv4\n"
40" Use IPv4 connection\n"
41" -6, --use-ipv6\n"
42" Use IPv6 connection\n"
43
44#: plugins/check_tcp.c:534
45msgid ""
46" -s, --send=STRING\n"
47" String to send to the server\n"
48" -e, --expect=STRING\n"
49" String to expect in server response\n"
50" -q, --quit=STRING\n"
51" String to send server to initiate a clean close of the connection\n"
52msgstr ""
53" -s, --send=STRING\n"
54" String to send to the server\n"
55" -e, --expect=STRING\n"
56" String to expect in server response\n"
57" -q, --quit=STRING\n"
58" String to send server to initiate a clean close of the connection\n"
59
60#: plugins/check_tcp.c:542
61msgid ""
62" -r, --refuse=ok|warn|crit\n"
63" Accept tcp refusals with states ok, warn, crit (default: crit)\n"
64" -m, --maxbytes=INTEGER\n"
65" Close connection once more than this number of bytes are received\n"
66" -d, --delay=INTEGER\n"
67" Seconds to wait between sending string and polling for response\n"
68" -w, --warning=DOUBLE\n"
69" Response time to result in warning status (seconds)\n"
70" -c, --critical=DOUBLE\n"
71" Response time to result in critical status (seconds)\n"
72msgstr ""
73" -r, --refuse=ok|warn|crit\n"
74" Accept tcp refusals with states ok, warn, crit (default: crit)\n"
75" -m, --maxbytes=INTEGER\n"
76" Close connection once more than this number of bytes are received\n"
77" -d, --delay=INTEGER\n"
78" Seconds to wait between sending string and polling for response\n"
79" -w, --warning=DOUBLE\n"
80" Response time to result in warning status (seconds)\n"
81" -c, --critical=DOUBLE\n"
82" Response time to result in critical status (seconds)\n"
83
84#: plugins/check_tcp.c:554
85#, c-format
86msgid ""
87" -t, --timeout=INTEGER\n"
88" Seconds before connection times out (default: %d)\n"
89" -v, --verbose\n"
90" Show details for command-line debugging (Nagios may truncate output)\n"
91" -h, --help\n"
92" Print detailed help screen\n"
93" -V, --version\n"
94" Print version information\n"
95"\n"
96msgstr ""
97" -t, --timeout=INTEGER\n"
98" Seconds before connection times out (default: %d)\n"
99" -v, --verbose\n"
100" Show details for command-line debugging (Nagios may truncate output)\n"
101" -h, --help\n"
102" Print detailed help screen\n"
103" -V, --version\n"
104" Print version information\n"
105"\n"
106
107#: plugins/check_tcp.c:571
108msgid ""
109"-H host -p port [-w warn_time] [-c crit_time] [-s send_string]\n"
110"\t[-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n"
111"\t[-t to_sec] [-r refuse_state] [-v] [-4|-6]\n"
112msgstr ""
113"-H host -p port [-w warn_time] [-c crit_time] [-s send_string]\n"
114"\t[-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n"
115"\t[-t to_sec] [-r refuse_state] [-v] [-4|-6]\n"
diff --git a/tools/setup b/tools/setup
index 084399b..eb07b71 100755
--- a/tools/setup
+++ b/tools/setup
@@ -31,6 +31,7 @@ aclocal -I lib
31autoheader 31autoheader
32automake --add-missing --copy 32automake --add-missing --copy
33autoconf 33autoconf
34autopoint
34 35
35if [ -f debian/rules ] ; then 36if [ -f debian/rules ] ; then
36 chmod +x debian/rules 37 chmod +x debian/rules