Hi, > On 12 Feb 2024, at 18:36, TAKAHASHI Kaoru <kaoru-ml-gn...@trans-nt.com> wrote: > > Hi, > > It seems difficult for GTKTranslate() to handle msgid with context > (e.g. "noun|Move"). > > The following changes might work: > - "noun|Move" -> "Move" (remove context msgid) > - "verb|Move" -> "verb|Move" (unchange) > - "Move" in sound settings -> "Confirm move" or "Submit move", etc > > The patch is attached.
I am not sure that this is the correct fix. The macro(!) `N_(msgid)` is supposed to be expanded to just `msgid`. The idea is to only mark a string constant as translatable without actually translating anything. So this is the expected behaviour of `N_()`. That means that probably `N_(”noun|Move”)` should be replaced with `NC_(”noun”, ”Move”)` instead, see https://developer-old.gnome.org/glib/unstable/glib-I18N.html#NC-:CAPS. But that will require more changes to the code because you have to make sure that the translation to the argument of `NC_()` is retrieved with `C_()` and not just `_()`. I will try to have a deeper look into the source code myself later. But I will probably need some time to set up CVS, haven’t done that for ages. :) Cheers, Guido