Bug 406144 - HTML Export theme names/descriptions are not translatable
Summary: HTML Export theme names/descriptions are not translatable
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: HTML generator (show other bugs)
Version: GIT master
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-02 10:24 UTC by Alexander Potashev
Modified: 2020-02-09 22:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.6
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2019-04-02 10:24:11 UTC
SUMMARY
HTML Export theme names/descriptions are not translatable. E.g. cannot translate "KPhotoAlbum Blue" in kphotoalbum.po or other .po files.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Johannes Zarl-Zierl 2019-04-02 19:48:41 UTC
For others following along: the relevant code is in the function HTMLDialog::populateThemesCombo().

I have to admit that localization is not an area where I have too much expertise, just immense gratitude to the translators who make the magic happen… So bear with me if I'm asking stupid questions.

I guess wrapping the strings that we read from the theme files with i18n() calls won't be sufficient to fix this. How can I feed text from non-source files into the translation workflow?
Comment 2 Christoph Feck 2019-04-25 18:47:54 UTC
Johannes, I suggest to ask on the kde-i18n-doc mailing list.
Comment 3 Johannes Zarl-Zierl 2019-06-22 22:20:22 UTC
A solution would be to use kconfig to read the theme files, because they are similar enough to .desktop files and could use the same translation methods.

Source:
https://marc.info/?l=kde-i18n-doc&m=155622699012733&w=2
Comment 4 Johannes Zarl-Zierl 2019-06-22 22:33:06 UTC
Git commit 90498d5c9a888040cbacf63f4c5e6ac3968d163d by Johannes Zarl-Zierl.
Committed on 22/06/2019 at 22:28.
Pushed by johanneszarl into branch 'master'.

Allow translations of theme files.

This commit adds an ExtraDesktop.sh file that allows translation tools
to pick up theme files.

The .theme files can be translated and are handled just like .desktop
files.

A  +4    -0    ExtraDesktop.sh

https://commits.kde.org/kphotoalbum/90498d5c9a888040cbacf63f4c5e6ac3968d163d
Comment 5 Johannes Zarl-Zierl 2019-06-22 22:35:38 UTC
The only component missing apparently was the ExtraDesktop.sh script. Can you please verify that the files are now picked up correctly by the translation tooling?