[vlc-devel] Getting xgettext to process lua html scripts (bring i18n to html intf)

Francois Cartegnie fcvlcdev at free.fr
Thu Oct 20 16:44:46 CEST 2011

lua provides gettext functions for i18n and we can use it in html
interfaces then.

xgettext does recognize the language by looking at the file extensions,
and html isn't in its list.

"<?vlc ?>" would match php short tags: xgettext can parse this language.
We could force php mode on xgettext's command line.

Unfortunately, we can't change the po/Makefile.in.in, as it is always
overwritten with the one provided by gettext's library.

We have 3 way to solve this:

- Add extra rules files in po/ to be processed by gettext's Makefile.
Would mean duplicating part of gettext's Makefile.in.in code, and
require maintaining it.

- Change lua's html scripts to php extension and write redirects for
backward compatibility.
Would break documentation, and require lots of changes for that minor
feature. No way.

- Process html script files as-is.
That works, except a warning.
But as it is being processed as C code by default, we can't guarantee
its behaviour when running into C comments strings. It might miss some
strings then.

I'd like to opt for the 3rd one then.


More information about the vlc-devel mailing list