xref: /freebsd/contrib/libxo/xopo/xopo.1 (revision adf376485712c8fffbf3be330d505a969647f479)
1.\" #
2.\" # Copyright (c) 2015, Juniper Networks, Inc.
3.\" # All rights reserved.
4.\" # This SOFTWARE is licensed under the LICENSE provided in the
5.\" # ../Copyright file. By downloading, installing, copying, or
6.\" # using the SOFTWARE, you agree to be bound by the terms of that
7.\" # LICENSE.
8.\" # Phil Shafer, July 2015
9.\"
10.Dd July 9, 2015
11.Dt XOPO 1
12.Os
13.Sh NAME
14.Nm xopo
15.Nd turn libxo format strings into simplified form
16.Sh SYNOPSIS
17.Nm
18.Op Fl options
19.Sh DESCRIPTION
20The
21.Nm
22utility simplifies libxo format strings into the form used for
23.Xr gettext
24lookups by the
25.Nm libxo
26library.
27Using
28.Nm ,
29users can turn
30.Em .pot
31files generated by
32.Xr xgettext
33into data useful for libxo-enabled applications.
34.Pp
35Since
36.Xr gettext
37uses the string as the key into the message catalog,
38.Nm libxo
39uses a simplified version of the format string that removes
40unimportant field formatting and modifiers, stopping minor formatting
41changes from impacting the expensive translation process.
42A developer
43change such as changing "/%06d" to "/%08d" should not force hand
44inspection of all .po files.
45.Pp
46.Nm
47inspects the input file, looking for lines that begin with "msgid"
48which carry format strings as the remainder of the input line.
49These strings are passed to
50.Nm libxo
51for simplification and the resulting strings are replaced into the
52output stream, allowing
53.Nm
54to operated as a filter.
55.Pp
56.Bl -tag -width indent
57.It Ic -f Ar pofile | Ic --po  Ar pofile
58Use the given po file for input.
59.It Ic --help
60Display this help text
61.It Ic -o Ar file | Ic --output Ar file
62Write output content to the given file
63.It Ic -s Ar text | Ic --simplify Ar text
64Generate the simplified version of a single text string.
65.It Ic -W | Ic --warn
66Generate warnings while parsing the format strings
67.It Ic --version
68Display version information
69.El
70.Pp
71.Sh EXAMPLE
72.Bd -literal
73  % xopo -f foo.pot -o foo.pot.new
74.Ed
75.Sh SEE ALSO
76.Xr libxo 3 ,
77.Xr xo_format 5
78.Sh HISTORY
79The
80.Nm libxo
81library first appeared in
82.Fx 11.0 .
83.Sh AUTHORS
84.Nm libxo
85was written by
86.An Phil Shafer Aq Mt phil@freebsd.org .
87
88