Refactor render_msg

* Fix PHP notices.
* Make message texts I18n ready.
* `msg_text` propery was used only inside this functon, replaced
with local variable.
* Ref: #3