code improvements found by compat2core scripts/add_text.py

- replace site.lang by site.code because family method is code based
- use page.title() method instead of deprecated one

Change-Id: I9ba6e8f461532efc1b41a013f6fd56308b30a45a