Small fixes and string localization.

- Fixed some variables missing local declaration.
- Added localization for 'X of Y selected' text.