]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/xopo/xopo.1
MFstable/11 334731
[FreeBSD/FreeBSD.git] / contrib / libxo / xopo / xopo.1
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
20 The
21 .Nm
22 utility simplifies libxo format strings into the form used for
23 .Xr gettext
24 lookups by the
25 .Nm libxo
26 library.
27 Using
28 .Nm ,
29 users can turn
30 .Em .pot
31 files generated by
32 .Xr xgettext
33 into data useful for libxo-enabled applications.
34 .Pp
35 Since
36 .Xr gettext
37 uses the string as the key into the message catalog,
38 .Nm libxo
39 uses a simplified version of the format string that removes
40 unimportant field formatting and modifiers, stopping minor formatting
41 changes from impacting the expensive translation process.
42 A developer
43 change such as changing "/%06d" to "/%08d" should not force hand
44 inspection of all .po files.
45 .Pp
46 .Nm
47 inspects the input file, looking for lines that begin with "msgid"
48 which carry format strings as the remainder of the input line.
49 These strings are passed to
50 .Nm libxo
51 for simplification and the resulting strings are replaced into the
52 output stream, allowing
53 .Nm
54 to operated as a filter.
55 .Pp
56 .Bl -tag -width indent
57 .It Ic -f Ar pofile | Ic --po  Ar pofile
58 Use the given po file for input.
59 .It Ic --help
60 Display this help text
61 .It Ic -o Ar file | Ic --output Ar file
62 Write output content to the given file
63 .It Ic -s Ar text | Ic --simplify Ar text
64 Generate the simplified version of a single text string.
65 .It Ic -W | Ic --warn
66 Generate warnings while parsing the format strings
67 .It Ic --version
68 Display 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
79 The
80 .Nm libxo
81 library first appeared in
82 .Fx 11.0 .
83 .Sh AUTHORS
84 .Nm libxo
85 was written by
86 .An Phil Shafer Aq Mt phil@freebsd.org .
87