Passing include paths to lupdate from l10n-kf5 scripts

MichaƂ Policht michal at policht.pl
Thu Sep 24 17:33:01 BST 2020


Hi,

I have modified l10n-kf5 scripts a bit to address the issue mentioned on
[stackoverflow](https://stackoverflow.com/questions/6504902/lupdate-error-qualifying-with-unknown-namespace-class),
which happens to affect CuteHMI project as well.

Program "lupdate" requires header files to be visible in order to
properly set translation context with tr() function. If header files are
kept in separate directories you'll get a warning "Qualifying with
unknown namespace/class" and generated "pot" files will be missing
namespace qualifier in message context.

I'm sending you minimal reproducible example. Just do the usual stuff

```
$ svn checkout svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/scripts
$ PATH=/path/to/scripts:$PATH bash /path/to/scripts/extract-messages.sh
```
I have modified scripts to accept -I|--include argument and pass it to
lupdate.
To test the difference comment/uncomment appropriate line in Messages.sh

Regards,
MP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scripts.modified.tar.gz
Type: application/x-gzip
Size: 2831 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20200924/6d07e19b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MRE.tar.gz
Type: application/x-gzip
Size: 562 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20200924/6d07e19b/attachment-0001.bin>


More information about the kde-i18n-doc mailing list