These tools should make your documentation life easier:

xml_helper.py           - helps you to seperate your language from the XML,
                        and merge your changes back. Run with --help
                        option to see how to use it

validate_references.py  - validates the references to image files in the
                        XML files. Run with -h option to see how to use it.



xml_helper.py
=============

Requirements:
    - elementtree from http://effbot.org/downloads/

Usage:
    rip_lang.py --rip|--merge|--format  [--no-format] [--no-clone-content]
    [--no-create-tags]
    --lang=xx,yy,zz file1, file2 ...filen

    This script Will create versions of these XML files at %s directory
    containing only the tags that include the selected languages (and
    creating empty tags if there is a tag for one language and not for
    the others).

    The tags that already exist will receive a xmlid attribute - keep it
    unchanged, or the merger script won't work.

    It will also create a .helper directory in that same directory,
    where it will store a version of the original XML with some helper
    tags.  Do not remove these files, or the merger script won't be able
    to merge your modifications back into the main XML.

Operation modes:

    --rip:
        will generate a new XML document containing only the desired
        languages (see --lang). XML created this way have an extra xmlid
        attrib in all tags. This is used when integrating back into  the
        main XML. You may write more tags for a given language, and they
        will be integrated - leave these without a "xmlid" attrib. All
        new tags must have a lang attrib or be inside a tag with alang
        attrib.


    --merge:
        will integrate back a working copy of a XML file into the main
        XML structure. The hidden version in .helper dir must exist.
        Merged files are formated as for the --format mode, unless
        stated otherwise.  N.B. the paths to the files passed to the
        script are the paths on main src tree, not the in the working
        dir.

    --format:
        will format target xml files as per the guidelines in the
        HACKING file.  NOT FULLY IMPLEMENTED - At this time, this will
        just sort the tags by the lang attrib.

    --help:
        Displays this help and exits

    --version:
        Displays the script version and exits


Options:

        --langs:
            mandatory for the --rip and --merge modes - the selected
            languages that will be kept on the working version (ruip) or
            merged back in the main XML (merge).  The oprder matters in
            (rip) mode - the first language specified is the one that
            will be clonned in newly created tags for the other
            languages if they don't exist.  Usage: --langs=xx,yy,zz, ...
            where xx, yy and zz are language codes

        --no-create-tags:
            in --rip mode, doesn't create tags that do not exist for a
            given language, when compared to the first language
            specified

        --no-clone-content:
            create new language tags, but empty tags, instead of copying
            the content of the first language specified. NB - tags
            created in this way are self closed ( <tag  />  ), by the
            xml generator.  Dont forget to change the format to <tag>
            </tag>  when adding content.
        --no-format:
            passed to merge mode - doesn't run the formatting routines
            after merging the xml file.

        --no-delete-rip:
            To avoid conflicts, the working XML version is deleted when
            merging is successfull. If passing this option, the file is
            preserved (the xmlids change when merging, so it is
            basically impossible to use this script to merge a XML a
            second time.

General Notes:

    If a version of the XML being split already exists in the .helper
    dir, it will mark changed tags since the last split with a
    'changed=""' XML attribute. This way translations can be kept in
    sink without further resource to Harry Potter style magic.

    This script will not normally  supress existing XML tags. If a tag
    is deleted in the working file, it's copy in the  .helper file will
    be used.

Workflow example :

    cd gimp-help-2
    ./tools/rip_lang.py --rip --langs=en,pt_BR src/gimp.xml
    cd %s/src
    <editor_of_choice> gimp.xml
    <translate>
    <save><exit>
    cd ../..
    ./tools/rip_lang.py --merge --langs=pt_BR src/gimp.xml


validate_references.py
======================

Requirements:
    - pyxml from http://pyxml.sourceforge.net

Call the script from the gimp-help-2 root:

    python tools/validate_references.py

Use the --help option for more information.


show_translation_progress.py
============================
XXX - can still be buggy XXX

This script parses the gimp-help.xml which has been generated during
transformation from DocBook/XML to HTML. It compares the ids with the
gimphelp-ids.h header file located in the gimp source tree and creates
statistics.

Requirements:
    - GIMP sources

Call the script from the gimp-help-2 root:

    python tools/show_translation_progress.py -g ../gimp


check_lang_attributes.pl
==========================

Removed after changing to gettext-based documentation.


get_po_status.pl
================

This Perl script searches for po files in the specified directory
and prints statistics about translation progress as well as a
short summary (number of files and strings, number of translated,
fuzzy, or untranslated strings).

Requirements:
    - Perl
    - msgfmt (package "gettext" or "gettext-runtime")

Usage:
    Call the script from the gimp-help-2 root:

        tools/get_po_status.pl [options] po-directory

Options:
        --[no]files       [Don't] print file statistics
        --[no]summary     [Don't] print summary
        --[no]progress    [Don't] print "progress" bar
        --todo            Only print files with untranslated messages
        --lang LANG       Add language "LANG" for naming the progress bar

Use "perldoc tools/get_po_status.pl" for more information.


check_image_resolutions.sh
==========================

A simple shell script to find images with resolution != 144x144 dpi.

Requirements:
    - identify (from the ImageMagick package: http://www.imagemagick.org)
    - awk

Usage:
    tools/check_image_resolutions.sh DIR [DIR ...]


check_keywords_property.pl
==========================

Removed, we do not need "svn:keywords" any more
(and "git" won't support them).
