Missing format specification in translation string should render error message.

Bug #74433 reported by Diogo Matsubara
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Low
Unassigned

Bug Description

Steps to reproduce (using sample data):
1. Open http://translations.launchpad.dev/distros/ubuntu/hoary/+source/pmount/+pots/pmount/pt_BR/+translate?start=10
2. For the string "Error: invalid charset name '%s'" enter "foo" as the translation;
3. Click Save & continue;
4. You're redirected to the next translation page while you should have received an error message.

The error message should complain about the missing format specification.

Revision history for this message
Данило Шеган (danilo) wrote :

Note that it doesn't check for starting/ending whitespace either (which is also the syntax error).

So, I think this bug is basically about enabling per-string syntax checking on save, but I am setting it as 'wishlist' at the moment.

Changed in rosetta:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

I would like to see the importance of this raised, I got:
https://bugs.edge.launchpad.net/ubuntu/+source/language-support-ar/+bug/277902

today and had quite a few of those in the past. I wrote my own validator because its such a common problem, especially for ngettext() usage.

Thanks,
 Michael

Shahar Or (mightyiam)
tags: added: hebrew
Revision history for this message
Данило Шеган (danilo) wrote :

We do support this if the template has appropriate c-format or python-format flags (i.e. check that msgfmt catches an error, and if it does, Launchpad will too).

tags: removed: hebrew
Changed in rosetta:
status: Triaged → Invalid
Revision history for this message
Michael Rooney (mrooney) wrote :

This is a bit delayed but Michael, you shouldn't need to write your own validator; running msgfmt with the -c option should catch that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.