generate_statistics() should just return a string
Bug #446803 reported by
Jonas Häggqvist
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yardbird |
Confirmed
|
Low
|
Space Hobo |
Bug Description
Having to return a formatting string and matching tuple seems fairly useless for generate_
The only possible upside I can come up with is a slightly higher chance that numbers will be properly formatted according to l10n.
To post a comment you must log in.
The l10n question is one that I've kind of avoided for now. I'm not convinced that it really applies in this instance, because the app author can always _() the format string before returning it anyway. If anything, the l10n of the apps is the app maintainers' responsibility, and core yardbird shouldn't have po files for (say) the clickolinko app.
The current architecture was a half-considered thing. The other direction we could take it is to have the format string replaced with a template to render and the stats represented as a dictionary. Then one could customize/localize the text at the template level (which is where most of this sort of skinning happens anyway).