Efraim Flashner <efr...@flashner.co.il> skribis: > On Thu, 05 Nov 2015 22:28:42 +0100 > l...@gnu.org (Ludovic Courtès) wrote: > >> Efraim Flashner <efr...@flashner.co.il> skribis: >> >> > * gnu/packages/qt.scm (qtkeychain): New variable. >> >> [...] >> >> > + (modify-phases >> > + %standard-phases >> >> ‘%standard-phases’ goes on the previous line. >> >> > + (add-before >> > + 'configure 'set-qt-trans-dir >> > + (lambda _ >> > + (substitute* "CMakeLists.txt" >> > + (("\\$\\{qt_translations_dir\\}") >> > + >> > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations"))))))) >> >> Is Qt able to find translations installed there? Is some environment >> variable needed to tell it where to look for them? > > I don't really know.
Could you check by running it with a non-English locale listed that appears in the ‘translations’ directory? Maybe run the application in ‘strace’ to see whether/where it looks for its translation files. > Without this it tries to install them to > /gnu/store/...qt5/translations, so I tried to make a directory that > would make sense. In this patch I've changed it to just /translations, > but I still didn't see it in .guix-profile/share/{de,ro}/LC_MESSAGES/, > so I don't really know what to do with it. Qt has its own mechanism for translation of UI messages. The LC_MESSAGES thing is used by the ‘gettext’ function, part of libc. Applications using ‘gettext’ tell libc the location of their translations using ‘bindtextdomain’. Qt must have a way to know where translations are; maybe it has a function similar to ‘bindtextdomain’, in which case things will just work regardless of where translations are installed. TIA, Ludo’.