Documentation
</> Developer Portal

NAME

rtir-message-catalog - maintain RTIR translation files

SYNOPSIS

    devel/tools/rtir-message-catalog extract [--rt-dir /path/to/rt] [po-file ...]
    devel/tools/rtir-message-catalog clean [po-file ...]
    devel/tools/rtir-message-catalog stats

DESCRIPTION

RTIR translation files live in po/. po/rtir.pot is the template listing every localizable string found in the RTIR source. Each po/<lang>.po is a translation.

RT merges its own message catalog with every plugin's catalog for the same language, so an RTIR po file only needs to contain strings that are specific to RTIR. Strings that RT core already translates are removed from RTIR po files by the extract and clean commands so translators are not shown entries they should not touch.

Run all commands from the top of the RTIR checkout.

extract

Regenerates po/rtir.pot from the RTIR source using RT's devel/tools/extract-message-catalog, then updates every po file (or only the po files given on the command line), adding new strings and removing strings no longer in the source. Strings translated by RT core are then removed from each po file.

This requires an RT source checkout. Give its location with --rt-dir or the RTHOME environment variable.

clean

Removes from each po file (or only the po files given on the command line) any entry whose msgid is present in RT core's catalog for the same language, and any translation that is identical to its msgid. Does not touch the source or the pot file.

stats

Prints the number of translated strings in each po file, relative to the number of RTIR-specific strings in po/rtir.pot.

← Back to index