Next: , Up: Submit   [Contents][Index]


2.1 Verification

Before constructing a submission message, wyslij-po first verifies if the PO file in question matches several important conditions. It is done in order to reduce the unwanted traffic and the impact on the TP mail server and robot.

As of version 3.3, the following tests are implemented:

  1. PO revision date.

    The values of the PO headers PO-Revision-Date and POT-Creation-Date are compared. If POT-Creation-Date is newer than PO-Revision-Date, the PO file is obviously outdated and therefore it is not submitted.

    This test is controlled by the following command line options:

    --verify-po-time

    Verify PO modification time (default).

    --no-verify-po-time

    Disable PO modification time verification.

    In configuration file, this test is controlled by the verify-po-time boolean statement (see verify-po-time).

  2. Package version

    This test verifies if this PO file is created for the latest version of the package available. To verify this the following algorithm is used. First, the textual domain url is built using the following schema:

    http://translationproject.org/domain/${domain}.html
    

    where ${domain} is replaced with the project name obtained from the Project-Id-Version PO header.

    Then, the contents of this page is retrieved, and the following extended regular expression is applied to it:

    The current template for this domain is <a href=".[^"]*/(.[^"]*)">
    

    If the expression matches, the value of the first parenthesized subexpression is retrieved, the optional ‘.pot’ suffix is removed from it and the result is compared with the value of Project-Id-Version PO header, converted as described in canonical-name. The two strings must be equal in order for the test to succeed.

    This test is controlled by the following command line options:

    --verify-version

    Enable package version verification (default).

    --no-verify-version

    Disable package version verification.

    In configuration file, this test is controlled by the verify-version boolean statement (see verify-version).

    Two configuration file statements are provided for tuning this test. The tp-url statement changes the textual domain template (see tp-url) and the pot-regex statement changes the regular expression (see pot-regex).


Next: , Up: Submit   [Contents][Index]