https://bugs.kde.org/show_bug.cgi?id=444795
Bug ID: 444795 Summary: Using KDE_L10N_SYNC_TRANSLATIONS option does not lead to compiling translations Product: releaseme Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: ash...@linuxcomp.ru CC: sit...@kde.org Target Milestone: --- When user uses cmake option KDE_L10N_SYNC_TRANSLATIONS, he expect that the translations will be downloaded and built. However, it does not happen. I tried to understand how things work. The l10n.rb defines get method with the parameter edit_cmake which defaults to true: https://invent.kde.org/sdk/releaseme/-/blob/b830efbdd392150b0b56e944bb34c07606492d4b/lib/releaseme/l10n.rb#L29-30 That edit_cmake means the following lines will be added to cmakelists.txt (as needed): ``` find_package(KF5I18n CONFIG REQUIRED) ki18n_install(po) ``` The tarme.rb calls that method without specifying edit_cmake parameter: https://invent.kde.org/sdk/releaseme/-/blob/b830efbdd392150b0b56e944bb34c07606492d4b/tarme.rb#L81 and it becomes true (because of default in l10n.rb) and prepared tar will have edited cmakelists.txt. The fetchpo.rb when running invoking get method specify the edit_cmake to false: https://invent.kde.org/sdk/releaseme/-/blob/b830efbdd392150b0b56e944bb34c07606492d4b/fetchpo.rb#L60-61 so running it will not trigger editing cmakelists.txt But that fetchpo.rb is invoked by cmake module KDECMakeSettings.cmake: https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/8f7831c83f11f38c060fd0717b925b1fa28cd3d8/kde-modules/KDECMakeSettings.cmake#L356-361 The result is that the translations are not compiled to the package. STEPS TO REPRODUCE 1. git clone https://invent.kde.org/pim/zanshin.git 2. mkdir build 3. cd build 4. cmake -B . -S ../zanshin -DBUILD_TESTING=OFF -DKDE_L10N_SYNC_TRANSLATIONS=ON 6. cmake --build . 7. DESTDIR="$pkgdir" cmake --install build # from package() function in PKGBUILD OBSERVED RESULT The translations were downloaded, but not compiled. The built package does not contain translations. EXPECTED RESULT The translations are downloaded and compiled. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.23.2 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION The solution could be to make fetchpo.rb to be able to accept parameter --edit-cmake, and pass it to the get method. And then two variants to do: Variant 1: Then add "--edit-cmake TRUE" to fetch_commands in the KDECMakeSettings.cmake. Variant 2: Make --edit-cmake parameter default to true in fetchpo.rb. Then editing KDECMakeSettings.cmake will not be necessary. -- You are receiving this mail because: You are watching all bug changes.