Katello/katello — pull request #833 by iNecas (2012-10-10 18:08:02+00:00)
Title: Fix gettext strings

We had a gettext stings in our server code base which were causing problems in translations:

1. interpolations using #{} such as _("This is #{wrong})
this strings were ignored completely by gettext
2. more variables in the sting without specifying which is which, such as _("Here is %s and %s") % [var1, var2]
this causes problems in languages with different word order.

This pull request should fix all the gettext strings with this issue.

Additionally, there is a new script: src/script/check-gettext.rb, which detects these problems in our code base. The checking algorithms is only part of the script. The rest is a logic that allows fixing such a strings automatically (or semi-automatically for the second type of issues).

This script (in checking mode) is run in katello.spec, making sure no such malformed strings get into nightly build, allowing us fast detection.