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 "12345678901234567" 57.It Fl "-simplify OR -s <text>" 58Generate the simplified version of a single text string. 59.It Fl "-po OR -f <pofile>" 60Use the given po file for input. 61.It Fl "-help" 62Display this help text 63.It Fl "-output OR -o <file>" 64Write output content to the given file 65.It Fl "-warn OR -W" 66Generate warnings while parsing the format strings 67.It Fl "-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