Skip to content

"Placeholders" quality check ignores "smalltalk-format" flag in .po file #6919

@ikedas

Description

@ikedas

Steps to reproduce:

  1. Create a template .pot including smalltalk-format flag:

    #. (list.name,domain)
    #: default/mail_tt2/listmaster_notification.tt2:345
    #, smalltalk-format
    msgid "Listmaster: list %1@%2 at 100 percents error"
    msgstr ""
    
    ...
  2. Add it into a project on Pootle, and make that project use "l20n" Quality Checks.

  3. On Pootle GUI, add a translation including escaped "%" character:

    ...
    
    msgstr "Listmaster : la liste %1@%2 est à 100%% d'erreur"

Results (Expected/Actual):

Expected result

A smalltalk format string "starts with ‘%’ and is followed by ‘%’ or a nonzero digit (‘1’ to ‘9’)". [ref]

So if smalltalk-format flag exists, the "%%" in the translation should be treated as a single "%" sign and shouldn't be treated as an error.

Actual result

The "%%" is treated as a critical error:

image

Environment (i.e. 'pootle --version', DB, OS, Browser):

$ pootle --version
Pootle 2.8.2 (Django 1.10.8, Translate Toolkit 2.2.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions