Hi there,

Here’s the feedback after my translation efforts: Pan is part of GNOME (Other Apps) and its translations are managed by the Damned Lies website of GNOME. So if you want to submit a new translation or update an existing one, you need to create an account there and join the corresponding language team. Let’s consider French: from <https://l10n.gnome.org/module/pan/> you’d go to <https://l10n.gnome.org/vertimus/pan/master/po/fr/> and after registering and joining the team, you’d reserve the translation from the drop down menu at the bottom of the page to make other members aware that you’re working on it. Download the gettext file, open it with say poedit and happy translating! When your work is finished, upload the translation on the same page and wait for someone to review and commit it. That’s all there is to it. The update for the French language, new translations for the help in French and Turkish have been submitted and are patiently waiting.

Additionally, to answer your following remark:

I've applied your fr.po file to my git repo, and I get this kind of diff:
-#: ../pan/data/cert-store.cc:328
+#: pan/data/cert-store.cc:359
 msgid ""
 "Error initializing Certificate Store. Check that the permissions for the "


The path of the source file has changed in the comment (the ../ part is gone). I've no idea if that may cause problems for the next French translator.

Could you check the impact ?

I asked to a fellow translator, and it seems that there's no impact. Anyway, translations will land from GNOME, so you shouldn't have to worry about that.

Also, I (sort of) worked out why the version compiled “by hand” didn’t take into account language changes on Ubuntu, whereas the version from the repositories happily switched languages according to the desktop settings (MATE in my case).

Firstly, I had to modify the CMakeLists.txt file at the root directory of the extracted tarball by adding
target_link_libraries(pan ${Gettext_LIBRARIES})
and later, just beneath
set(GETTEXT_PACKAGE pan)
I added
find_package(Gettext REQUIRED)
and
include_directories(${Gettext_INCLUDE_DIRS})
otherwise it just didn’t care about gettext files.

Then, Pan happily installs language files at /usr/local/share/locale/fr/LC_MESSAGES/pan.mo for French, and the help file goes to /usr/local/share/help/fr/pan/index.docbook for French again. But apparently it looks for these files in /usr/share/locale/<lang>/LC_MESSAGES/pan.mo, therefore never finds the translation (and translated help) files and falls back to English.

I played a little bit with the “main” CmakeLists.txt file to make Pan take into account the translations. I’m attaching a patch in case it would be useful. It can certainly be simplified, but as it does what I need I didn’t touch it any further. Besides, in order to build new help languages when they're committed, you may need to to update the
set(lang_list cs de es fr sv tr)
line of CMakeLists.txt file in the help subdirectory.

Finally, you may want to add the cmake-gui package to the Fedora dependency list.

I hope this is useful in some way.

Best regards.
--- ./original/CMakeLists.txt	2025-05-25 16:27:28.000000000 +0300
+++ ./new/CMakeLists.txt	2025-07-12 23:57:23.366915135 +0300
@@ -17,17 +17,17 @@
   DESCRIPTION "Pan usenet reader"
   HOMEPAGE_URL "https://gitlab.gnome.org/GNOME/pan";
 )
-
+message(STATUS "CMAKE_INSTALL_PREFIX is ${CMAKE_INSTALL_PREFIX}")
+message(STATUS "PANLOCALEDIR will be ${CMAKE_INSTALL_PREFIX}/share/locale")
 # #cmakedefine completely refuses to recognise CMAKE_PROJECT_VERSION_xxxx or
 # PROJECT_VERSION_xxxx
 set(VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
 set(VERSION_MINOR ${PROJECT_VERSION_MINOR})
 set(VERSION_PATCH ${PROJECT_VERSION_PATCH})
 set(VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
-
+set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale" CACHE PATH "Locale directory")
 set(PAN_DBUS_SERVICE_NAME      "org.gnome.pan")
 set(PAN_DBUS_SERVICE_PATH      "/news/pan/NZB")
-
 # Standard CMake modules
 include(CTest)
 
@@ -70,8 +70,12 @@
 
 # https://cmake.org/cmake/help/latest/command/add_executable.html
 add_executable(pan pan/gui/pan.cc pan/gui/gui.cc)
+target_link_libraries(pan ${Gettext_LIBRARIES})
+target_compile_definitions(pan PRIVATE PANLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\")
 # remove this so pan binary lands in build dir. But this requires
 # first to rename pan/ dir to src/
+target_link_libraries(pan ${Gettext_LIBRARIES})
+
 set_target_properties(pan PROPERTIES RUNTIME_OUTPUT_DIRECTORY "pan/gui")
 target_compile_options(pan PRIVATE "${CXX_STD}" "-Wreorder" "-Wzero-as-null-pointer-constant")
 
@@ -102,6 +106,8 @@
 check_symbol_exists(localtime_r "time.h" HAVE_LOCALTIME_R)
 
 set(GETTEXT_PACKAGE pan)
+find_package(Gettext REQUIRED)
+include_directories(${Gettext_INCLUDE_DIRS})
 
 find_package(PkgConfig REQUIRED)
 
@@ -232,8 +238,6 @@
 # https://cmake.org/cmake/help/latest/command/configure_file.html
 configure_file(${CMAKE_SOURCE_DIR}/config-cmake.h.in ${CMAKE_BINARY_DIR}/config.h)
 
-target_compile_definitions(pan PRIVATE "PANLOCALEDIR=\"${LOCALEDIR}\"")
-
 # https://cmake.org/cmake/help/latest/command/target_link_libraries.html
 target_link_libraries(pan
   pan-cc-gui
_______________________________________________
Pan-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to