The changes in the branch look fine, but I have a concern--the tests you listed explicitly pass both before and after your branch was merged and sample data was updated. Is there a prereg not listed for this branch?
I'm a big fan of these changes; I'm not really sure how the previous string format was working. %s is definitely appropriate for a boolean. And as I questioned, it turns out it does just slightly seem to speed up the doctest.
Henning--
The changes in the branch look fine, but I have a concern--the tests you listed explicitly pass both before and after your branch was merged and sample data was updated. Is there a prereg not listed for this branch?
> === modified file 'lib/lp/ translations/ doc/pofile. txt' translations/ doc/pofile. txt 2010-12-09 16:36:43 +0000 translations/ doc/pofile. txt 2010-12-09 16:36:44 +0000 getCurrentTrans lationMessage( msgid_singular. msgid translationmess age.translation s)): msgid_singular. msgid age.translation s[index] is None: age.translation s[index] msgid_plural is not None)
> --- lib/lp/
> +++ lib/lp/
> @@ -661,17 +661,17 @@
> ... for potmsgset in potmsgsets:
> ... translationmessage = potmsgset.
> ... pofile.potemplate, pofile.language)
> + ... msgid = potmsgset.
> + ... if len(msgid) > 10:
> + ... msgid = msgid[:7] + '...'
> ... for index in range(len(
> - ... msgid = potmsgset.
> - ... if len(msgid) > 10:
> - ... msgid = msgid[:7] + '...'
> ... if translationmess
> ... translation = 'None'
> ... else:
> ... translation = translationmess
> ... if len(translation) > 10:
> ... translation = translation[:7] + '...'
> - ... print "%-10s %-5s %-10s %-11s" % (
> + ... print "%-10s %-5s %-10s %s" % (
> ... msgid, index, translation,
> ... potmsgset.
I'm a big fan of these changes; I'm not really sure how the previous string format was working. %s is definitely appropriate for a boolean. And as I questioned, it turns out it does just slightly seem to speed up the doctest.