extra apps and locales

Mario Sanchez Prada msanchez at gnome.org
Thu Feb 16 10:32:44 UTC 2017


Hi,

Thanks Rob for sending the email and Bastien for your quick feedback.

See some comments below...

On 15/02/17 20:19, Bastien Nocera wrote:
> [...]
> There are multiple ways to fix or work-around this problem:
> 1) Call bindtextdomain() again for those domains which don't live in
> /usr. From reading the man page, it seems to overwrite the existing
> directory configured. This is useful if you can modify the program, and
> all the libraries from which you need translations are init'ed at the
> same time

We are not building VLC from sources, so we can't really do this.

> 2) Patch the binary. Easy to do if your locale path will be shorter
> than Debian's. Pretty sure that could be a 'sed' script.

Unfortunately, the path would be longer as it would have to be changed from
/usr/share/locale to /app/extra/share/locale, so not an option either.

> 3) Use LD_PRELOAD to intercept bindtextdomain() calls. Also pretty easy
> to do, especially if as you have the libc sources.

Good point. I think that would probably work for the translations of the app
itself (i.e. VLC in this case) but, unless I'm missing something, I'm not so
sure about the translations for the extra dependencies that the application
links against (e.g. zvbi, for the case of VLC), which would come bundled
with the application's flatpak.

Those deps would have their translations under /app/share/locale, meaning
that we'd have to do the implementation of our custom bindtextdomain()
function in a way that only overrides the bound directory when called from
VLC itself, and not when doing from any of the linked libraries.

In any case, I haven't thought of LD_PRELOAD until you mentioned it, and I
think I will still give it a go in case we don't find another way to deal
with this situation, so thanks again for mentioning it.

Still, I think it would be nicer to have some kind of bind mount like the
one Rob described, as that would allow us to solve this situation in a more
generic way, right from the JSON file, so I'd like to investigate that a bit
more, see if I can find a way. Thing is, I'm not very familiar with those
kind of things, so any extra comment/suggestion on this regard will also be
greatly appreciated, of course.

Thanks!
Mario



More information about the xdg-app mailing list