logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

podiff - compare textual information in two PO files

Authors

       Sergey Poznyakoff

Bug Reports

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

Bugs

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

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 Generatingdifftext  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:

       -dCMD Use CMD as a diff utility.

       -DOPTION
              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.

       -wNUM 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.

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

Name

       podiff - compare textual information in two PO files

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.

See Also

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

Synopsis

podiff [OPTIONS] FILE1FILE2podiff [OPTIONS] PATHOLD-FILEOLD-HEXOLD-MODENEW-FILENEW-HEXNEW-MODEpodiff-t [OPTIONS] FILEpodiff [-vh]

See Also