build: i18n-scan.pl: use xgettext to extract message strings
Using xgettext has a few benefits compared to the previous perl extraction
approach. The xgettext utility is able to properly distinguish commented
from uncommented code and it is able handle concatenated constant
expressions such as `_("Some " + "string")`.
A further benefit is the ability to extract translations with disambiguation
contexts and plural translation calls.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
901a0821f66b1623ea04d1930a2e6e336138263a)