build: i18n-scan.pl: use xgettext to extract message strings
authorJo-Philipp Wich <jo@mein.io>
Tue, 21 Jan 2020 17:39:32 +0000 (18:39 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 29 Jan 2020 07:33:37 +0000 (08:33 +0100)
commit529d6b726828e8e290de4d75422897266eddb807
treec0b78fcca7181c0b96be6f5ea376233df3de1368
parente578ff9b1caef8b50059dedb1c44b4e1fd3562cb
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)
build/i18n-scan.pl