freebsd-dev/contrib/libxo/xopo/xopo.1
Phil Shafer fd5e3f3ec6 Update from libxo-0.8.1 to 0.8.4:
0.8.4:
    - void anchor width optimization when we have a custom formatter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221130)
    - make "{[:/18}" do the right thing (also allows "{[:/%s}", wide ? 40 : 10)
    - Can't skip anchor formatting in non-display styles
    - add test case for {[:/18}
    - add upload-xohtml-files to 'make upload'
  0.8.3:
    - xohtml: Add "-w" option to pull support files from gh_pages
    - Add "upload-xohtml-files" target to publish support files in gh_pages/
    - add HISTORY/AUTHORS section to man pages
  0.8.2:
    - xohtml: Add div.units as standard CSS text
    - Don't treat values as format strings; they are not
    - add "-p" to "mkdir -p build" in setup.sh
    - add test case for {U:%%} (from df.c)
    - detect end-of-string in '%' and '' escaping
    - make xo_simple_field, for common simple cases
    - xohtml: nuke "n" in "echo" commands
    - rename "format" to "fmt" for consistency; same for "str" to "value"

Submitted by:	phil
2017-08-03 15:47:42 +00:00

88 lines
2.0 KiB
Groff

.\" #
.\" # Copyright (c) 2015, Juniper Networks, Inc.
.\" # All rights reserved.
.\" # This SOFTWARE is licensed under the LICENSE provided in the
.\" # ../Copyright file. By downloading, installing, copying, or
.\" # using the SOFTWARE, you agree to be bound by the terms of that
.\" # LICENSE.
.\" # Phil Shafer, July 2015
.\"
.Dd July 9, 2015
.Dt XOPO 1
.Os
.Sh NAME
.Nm xopo
.Nd turn libxo format strings into simplified form
.Sh SYNOPSIS
.Nm
.Op Fl options
.Sh DESCRIPTION
The
.Nm
utility simplifies libxo format strings into the form used for
.Xr gettext
lookups by the
.Nm libxo
library.
Using
.Nm ,
users can turn
.Em .pot
files generated by
.Xr xgettext
into data useful for libxo-enabled applications.
.Pp
Since
.Xr gettext
uses the string as the key into the message catalog,
.Nm libxo
uses a simplified version of the format string that removes
unimportant field formatting and modifiers, stopping minor formatting
changes from impacting the expensive translation process.
A developer
change such as changing "/%06d" to "/%08d" should not force hand
inspection of all .po files.
.Pp
.Nm
inspects the input file, looking for lines that begin with "msgid"
which carry format strings as the remainder of the input line.
These strings are passed to
.Nm libxo
for simplification and the resulting strings are replaced into the
output stream, allowing
.Nm
to operated as a filter.
.Pp
.Bl -tag -width indent
.It Ic -f Ar pofile | Ic --po Ar pofile
Use the given po file for input.
.It Ic --help
Display this help text
.It Ic -o Ar file | Ic --output Ar file
Write output content to the given file
.It Ic -s Ar text | Ic --simplify Ar text
Generate the simplified version of a single text string.
.It Ic -W | Ic --warn
Generate warnings while parsing the format strings
.It Ic --version
Display version information
.El
.Pp
.Sh EXAMPLE
.Bd -literal
% xopo -f foo.pot -o foo.pot.new
.Ed
.Sh SEE ALSO
.Xr libxo 3 ,
.Xr xo_format 5
.Sh HISTORY
The
.Nm libxo
library first appeared in
.Fx 11.0 .
.Sh AUTHORS
.Nm libxo
was written by
.An Phil Shafer Aq Mt phil@freebsd.org .