Share code for getting source strings

Signed-off-by: Michal Čihař <michal@cihar.com>
Test priority editing

Signed-off-by: Michal Čihař <michal@cihar.com>
Test source string expansion editing

Signed-off-by: Michal Čihař <michal@cihar.com>