Replace deprecated wfMsg() and friends

- Replaced two wfMsgHtml calls
- Replaced other deprecated functions
- Defined variables
- Add type hint

Bug: T70750
Change-Id: Ic6854cd117dded96d96a645f007d7894f1ab84d9