PODIFF

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
DOWNLOADS
SEE ALSO
BUGS
AUTHORS
BUG REPORTS
COPYRIGHT

NAME

podiff - compare textual information in two PO files

SYNOPSIS

podiff [OPTIONS] FILE1 FILE2
podiff
[OPTIONS] PATH OLD-FILE OLD-HEX OLD-MODE NEW-FILE NEW-HEX NEW-MODE
podiff -t
[OPTIONS] FILE
podiff
[-vh]

DESCRIPTION

The podiff utility finds differences in translatable strings and translations between two PO files or between two revisions of the same file. It uses diff(1) to generate the output. Before comparing, it eliminates all comments and multiple empty lines, sorts the two files by their msgid and reformats all textual strings in a uniform manner. The utility is intended to help translators obtain meaningful information about changes they do to PO files.

When supplied two non-optional arguments podiff acts as a standalone program and outputs differences between the two PO files. Its exit code is 1 if the two files differ and 0 otherwise.

When given 7 arguments (second case above), podiff compares OLD-FILE and NEW-FILE. This mode is intended for use as a git(1) external diff utility (see GIT_EXTERNAL_DIFF in git(1) and Generating diff text in gitattributes(5)). In this mode its exit code is always 0, except if some errors occur. See the EXAMPLE section below.

The podiff utility understand the following command line options:

-d CMD

Use CMD as a diff utility.

-D OPTION

Pass OPTION as an option to the diff utility.

-f

Ignore fuzzy translations.

-k

Keep user comments on output.

-L

External diff understands the -L option. If this option is given, podiff will pass two additional options to diff: -La/FILE -Lb/FILE, where FILE is the pathname of the file being diff’ed.

-w NUM

Limit output width to NUM columns (see BUGS below, though).

-t

Test mode. In this mode, podiff takes a single file name as its argument and acts as a preprocessor for this file, producing its normalized version on the standard output. This mode is intended for debugging.

-h

Prints a terse usage summary.

-v

Prints program version and licence information.

RETURN VALUE

In standalone mode (2 arguments), the return code is 0 if the two files don’t differ and 1 otherwise.

In Git mode, the return code is 0 unless errors occur.

The return code is 2 if an invalid command line option or invalid number of arguments is given.

EXAMPLE

The following example shows how to use podiff as an external diff utility in git(1). The system diff utility will be passed the -u and two -L options.

First, add the following section to the .git/config file:

[diff "podiff"]
command = /usr/bin/podiff -D-u -L

Next, to the .gitattributes file in the directory with your PO files, add the following line:

*.po diff=podiff

DOWNLOADS

Podiff is available for download from this location.

The latest version is podiff-1.3.

Recent news, changes and bugfixes can be tracked from the project's development page.

SEE ALSO

diff(1), git(1), gitattributes(5).

BUGS

The -w option actually operates on bytes, not characters, therefore actual output width can be less than its argument.

AUTHORS

Sergey Poznyakoff

BUG REPORTS

Report bugs to <gray@gnu.org.ua>.

COPYRIGHT

Copyright © 2011,2012,2013 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


Manpage server at man.gnu.org.ua.

Powered by mansrv 1.1