Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables
Fix bug 1171936
Change-Id: Id6a900899db328be067b8139a49c12ce802dd415