tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH 2/2] Added manpage for gettext(1)



This is an initial revision, and it will probably need a lot of work before it
can be published.
---
 src/usr.bin/gettext/gettext.1 | 103 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 src/usr.bin/gettext/gettext.1

diff --git a/src/usr.bin/gettext/gettext.1 b/src/usr.bin/gettext/gettext.1
new file mode 100644
index 0000000..1f601df
--- /dev/null
+++ b/src/usr.bin/gettext/gettext.1
@@ -0,0 +1,103 @@
+.\"
+.\" Copyright (c) 2015 William Orr <will%worrbase.com@localhost>,
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd November 10, 2004
+.Dt GETTEXT 1
+.Os
+.Sh NAME
+.Nm gettext
+.Nd message translation front-end
+.Sh SYNOPSIS
+.Nm
+.Op Fl h
+.Nm
+.Op	Fl en
+.Op Ar TEXTDOMAIN
+.Ar MSGID
+.Nm
+.Fl s
+.Op Fl n
+.Op Ar MSGID...
+.Sh DESCRIPTION
+.Nm
+attempts to translate a given
+.Ar MSGID
+into the locale-specific string as determined by the environment.
+If a translation file is not found, or a translation for the given
+.Ar MSGID
+is not found, the original string will be echoed.
+.Pp
+If the
+.Ar TEXTDOMAIN
+is not provided as an argument, the
+.Ev TEXTDOMAIN
+environment variable will be consulted instead.
+.Pp
+By default
+.Nm
+will look for message catalogs in
+.Pa /usr/share/locale .
+If the environment variable
+.Ev TEXTDOMAINDIR
+is defined, then that will override the default location.
+.Pp
+The following flags are available:
+.Bl -tag -width Ds
+.It Fl e
+Interpret backslash escape sequences prior to translation.
+.It Fl h
+Print the usage information
+.It Fl n
+If
+.Fl s
+is used, do not add the trailing newline. If
+.Fl s
+is not provided, this flag will do nothing.
+.It Fl s
+Act similarly to
+.Xr echo 1 .
+All
+.Ar MSGID
+arguments will be translated, and a newline will be appended to the output
+string.
+.Sh ENVIRONMENT
+.Bl -tag -width Ds
+.It Ev TEXTDOMAIN
+The domain to use when looking up
+.Ar MSGIDs
+.It Ev TEXTDOMAINDIR
+The location of message catalogs to use, overriding
+.Pa /usr/share/locale
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+.Bd -literal -offset indent
+$ LANG=es gettext grep 'writing output'
+escribiendo el resultado
+.Ed
+.Sh SEE ALSO
+.Xr gettext 3
+.Xr echo 1
+.Xr environ 7
-- 
2.4.2



Home | Main Index | Thread Index | Old Index