XWIKI-4923: PrettyNames of class properties are not being translated in the object editor
- Also done minor formatting to improve the readability of the code
(cherry picked from commit f351568ffc3ea6584f2337bb0ca77462d0901edf)