[virt-tools-list] [virt-viewer v2] win32: Look up translations relative to installation directory

Daniel P. Berrangé berrange at redhat.com
Wed May 2 11:25:03 UTC 2018


On Wed, May 02, 2018 at 01:20:42PM +0200, Christophe Fergeau wrote:
> On Windows, we can't use bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); as
> LOCALE_DIR is a compile-time constant, while the location of the
> translations will be dependant on where the user installs virt-viewer.
> This results in an untranslated virt-viewer UI on Windows. This commit
> calls bindtextdomain() with a directory which is relative to the
> installation path so that translation are properly found.
> This is similar to what spice-gtk is doing:
> https://cgit.freedesktop.org/spice/spice-gtk/tree/src/spice-glib-main.c
> 
> Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
> ---
> Changes since v1:
> - add call to g_win32_locale_filename_from_utf8()
> 
> 
>  src/virt-viewer-util.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the virt-tools-list mailing list