Control: tags -1 + confirmed patch

Am 10.09.2017 um 09:32 schrieb Vladimir Isaev:

> strace gnome-clocks for gnome-clocks.mo:
>     open("/locale/ru_RU.UTF-8/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1
>     ENOENT (No such file or directory)
>     open("/locale/ru_RU.utf8/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1
>     ENOENT (No such file or directory)
>     open("/locale/ru_RU/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1 ENOENT
>     (No such file or directory)
>     open("/locale/ru.UTF-8/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1
>     ENOENT (No such file or directory)
>     open("/locale/ru.utf8/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1
>     ENOENT (No such file or directory)
>     open("/locale/ru/LC_MESSAGES/gnome-clocks.mo", O_RDONLY) = -1 ENOENT (No
>     such file or directory)
> 
> So, for whatever reason gnome-clocks does not search for interface 
> localisation at /usr/share/locale.

Thanks for your bug report.
This is indeed broken. It's a result of the switch to the meson build
system. The broken code is this:

> conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), 
> get_option('datadir'), '/locale'))

The API doc says this about join_paths [1]:

Joins the given strings into a file system path segment. For example
join_paths('foo', 'bar') results in foo/bar. If any one of the
individual segments is an absolute path, all segments before it are
dropped. That means that join_paths('foo', '/bar') returns /bar.

So the trivial fix is as simple as the attached patch.
That said, it's unfortunate that gnome-photos redefines localedir when
meson already provides the localedir variable, see meson --help →
--localedir


[1] http://mesonbuild.com/Reference-manual.html#join_paths
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/meson.build b/meson.build
index 7c87e26..e27a957 100644
--- a/meson.build
+++ b/meson.build
@@ -41,7 +41,7 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version())
 conf.set_quoted('VERSION', meson.project_version())
 conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
-conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('datadir'), '/locale'))
+conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
 if have_first_weekday
   conf.set('HAVE__NL_TIME_FIRST_WEEKDAY', '1')
 endif

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to