Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ikedas opened this issue Feb 23, 2023 · 0 comments
Open

Comments

@ikedas
Copy link

ikedas commented Feb 23, 2023

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant