GNOME Bugzilla – Bug 790569
Translatable strings not extracted from nautilus module
Last modified: 2017-11-20 08:35:36 UTC
There are four strings in `nautilus-fileroller.c`[0] which are not translated: - Extract Here - Extract the selected archive to the current position - Extract To… - Extract the selected archive These strings are not translated since the meson port. This is due to the `preset` list of options used in meson[1] which doesn't include `g_dgettext`. This list follows the `Migration from Intltool to Gettext` guide[2] that declares a `glib-approved` list. [0] https://git.gnome.org/browse/file-roller/tree/nautilus/nautilus-fileroller.c [1] https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/i18n.py#L25 [2] https://wiki.gnome.org/MigratingFromIntltoolToGettext
Created attachment 364012 [details] [review] nautilus-fileroller: Avoid the use of g_dgettext nautilus-fileroller is using g_dgettext which may cause problems when extracting strings on some systems. As explained in the first comment, this is due to `g_dgettext` not being present in the meson `gettext` option list. Although there are different solutions which can be applied here, I've chosen `_`, because is used in almost the entire source code. It also changes the module behaviour, because `g_dgettext` is used only under some fixed conditions. However, I don't know if this behaviour change is that important. Any comment would be very appreciated.
I think the domain is necessary because a nautilus module has 'nautilus' has default domain and without setting the domain to 'file-roller' you don't get the translated string.
Created attachment 364013 [details] [review] nautilus-fileroller: Avoid the use of g_dgettext (In reply to Paolo Bacchilega from comment #2) > I think the domain is necessary because a nautilus module has 'nautilus' has > default domain and without setting the domain to 'file-roller' you don't get > the translated string. Thanks for the explanation. Here goes another approach, which uses `g_dcgettext` instead of `g_dgettext`, following the behaviour of `dgettext` and `dcgettext`, where the latter can be expressed in terms of the first by using: dcgettext (domain, string, LC_MESSAGES) This shouldn't modify the original behaviour. [0] https://www.gnu.org/software/libc/manual/html_node/Translation-with-gettext.html
Patch pushed to master, thank you.