Re: [Tails-l10n] Fwd: Bug#696833: ITP: i18nspector -- checki…

Nachricht löschen

Nachricht beantworten
Autor: sajolida
Datum:  
To: Tails localization discussion
Betreff: Re: [Tails-l10n] Fwd: Bug#696833: ITP: i18nspector -- checking tool for gettext POT, PO and MO files
On 28/12/12 10:28, intrigeri wrote:
> hi,
>
> I guess this could be interesting for us.


To copy and run it you need to do:

    hg clone https://bitbucket.org/jwilk/i18nspector
    apt-get install python3 python3-polib
    python i18nspector <file>


It doesn't have a lot of options:

    usage: i18nspector [-h] [--version] [-l <lang>] [--debian] <file>


    checking tool for gettext POT, PO and MO files


    positional arguments:
      <file>


    optional arguments:
      -h, --help            show this help message and exit
      --version             show program's version number and exit
      -l <lang>, --language <lang>
                            assume this langauge
      --debian              allow checking Debian packages


A simple run outputs things like this:

    $ i18nspector/i18nspector master/wiki/src/about.fr.po
    P: master/wiki/src/about.fr.po: no-language-header-field
    I: master/wiki/src/about.fr.po: unable-to-determine-language
    P: master/wiki/src/about.fr.po: no-version-in-project-
    id-version tails-about-fr
    W: master/wiki/src/about.fr.po: no-report-msgid-bugs-to-header-field
    W: master/wiki/src/about.fr.po: invalid-last-translator (empty
    string)


Running it on all our PO files and filtering unique messages returns the
following set of messages:

    boilerplate-in-language-team 'SPANISH <LL@???>'
    boilerplate-in-last-translator 'FULL NAME <EMAIL@ADDRESS>'
    boilerplate-in-project-id-version 'PACKAGE VERSION'
    invalid-content-transfer-encoding ENCODING => 8bit
    invalid-date PO-Revision-Date: 'YEAR-MO-DA HO:MI+ZONE'
    invalid-language Portuguese => pt
    invalid-last-translator MR
    language-team-equal-to-last-translator 'zon <oldbafox@???>'
    no-language-header-field Language: pt
    no-package-name-in-project-id-version 1.1
    no-report-msgid-bugs-to-header-field
    no-version-in-project-id-version 'sPACKAGE VERSION'
    no-version-in-project-id-version tails-talk-users-fr
    syntax-error-in-po-file line 113
    unable-to-determine-language
    unknown-poedit-language Portugues


That's not very explicit but we can surely use some of that.

Could people more knowledgeable about PO files determine which error
messages are worth dealing with? Then if we think it's worth using
i18nspector I can add it to `/contribute/l10n_tricks` and help
documenting the interesting messages.