Bug 484448 - Some account templates are missing
Summary: Some account templates are missing
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: packaging (show other bugs)
Version: git (master)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 12:30 UTC by Ralf Habacker
Modified: 2024-03-28 08:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2


Attachments
Screenshot showing missing german account templates (33.73 KB, image/png)
2024-03-25 12:30 UTC, Ralf Habacker
Details
Screenshot showing diff in contained resources between linux and windows (28.20 KB, image/png)
2024-03-28 06:57 UTC, Thomas Baumgart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-03-25 12:30:38 UTC
Created attachment 167736 [details]
Screenshot showing missing german account templates

STEPS TO REPRODUCTION
1. download from https://cdn.kde.org/ci-builds/office/kmymoney/master/windows/kmymoney-master-3149-windows-cl-msvc2019-x86_64.7z
2. unpack the archive
3. enter the unzipped directory and start bin/kmymoney
4. select "File->New book"

OBSERVED RESULT
When creating the new book, I expected "German account templates" to be displayed as the language for the Windows host and application is "German", but they are missing as the attached screenshot shows. 

EXPECTED RESULT
German account templates should be available

SOFTWARE/OS VERSIONS
Windows: 10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Comment 1 Thomas Baumgart 2024-03-27 12:25:33 UTC
It's not only German, but also Mexican, US, Chinese and some more. Looking at the source directory, we have about 48 countries (i.e. sub-directories) listed but the attached screenshot shows only a part of them.
Comment 2 Ralf Habacker 2024-03-27 12:40:00 UTC
(In reply to Thomas Baumgart from comment #1)
> It's not only German, but also Mexican, US, Chinese and some more. Looking
> at the source directory, we have about 48 countries (i.e. sub-directories)
> listed but the attached screenshot shows only a part of them.

$ find ~/src/kmymoney-master/kmymoney/templates/ -name '*.kmt' | wc -l
530

$ find kmymoney-master-3149-windows-cl-msvc2019-x86_64 -name '*.kmt' | wc -l
0

Looks like they are not included when the package is created
Comment 3 Ralf Habacker 2024-03-27 12:51:09 UTC
(In reply to Ralf Habacker from comment #2)
> Looks like they are not included when the package is created

$ sh -x ./kmymoney-master-3149-linux-gcc-x86_64.AppImage --appimage-mount /tmp/mount_myXXXX
/tmp/.mount_kmymon1ejUGl 

$find /tmp/.mount_kmymon1ejUGl -name '*.kmt' | wc -l

It seems to be a general problem with the packaging.
Comment 4 Thomas Baumgart 2024-03-27 17:37:47 UTC
No, they are contained in the binary as Qt resources. Your check is wrong.
Comment 5 Ralf Habacker 2024-03-27 17:54:20 UTC
(In reply to Thomas Baumgart from comment #4)
> No, they are contained in the binary as Qt resources. Your check is wrong.

This explains the differences, but makes it more difficult to investigate the causes due to their hidden nature. You can no longer search with strace or similar where they should be.
Comment 6 Thomas Baumgart 2024-03-28 06:57:39 UTC
Created attachment 167877 [details]
Screenshot showing diff in contained resources between linux and windows

The problem is created by the cmake code that constructs the resource definition file and does not extract files in locale directories named templates/xx_XX/ but only those of directories named templates/xx/ on windows. Screenshot shows the difference of the generated file between its linux (left pane) and windows (right pane) version.
Comment 7 Thomas Baumgart 2024-03-28 08:07:19 UTC
Git commit 3478af260352b1be16cd1a7b6df38fda960d9e81 by Thomas Baumgart.
Committed on 28/03/2024 at 08:06.
Pushed by tbaumgart into branch 'master'.

Fix generation of account template resources on windows
FIXED-IN: 5.2

M  +3    -1    kmymoney/templates/CMakeLists.txt

https://invent.kde.org/office/kmymoney/-/commit/3478af260352b1be16cd1a7b6df38fda960d9e81