Bug 410122 - KMail ignores file association for .pot, always opens in Libreoffice Impress
Summary: KMail ignores file association for .pot, always opens in Libreoffice Impress
Status: RESOLVED NOT A BUG
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.11.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-22 22:29 UTC by Alexander Potashev
Modified: 2019-07-23 06:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
ktraderclient5 output (6.06 KB, text/plain)
2019-07-23 06:07 UTC, Alexander Potashev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2019-07-22 22:29:44 UTC
SUMMARY
KMail ignores file association for .pot, always opens in Libreoffice Impress.

STEPS TO REPRODUCE
1. Make sure .pot files are associated with Lokalize.
2. In KMail, open an email with an attachment file <something>.pot.
3. Click on the attachment.

OBSERVED RESULT
A dialog is opened where a button says "Open with LibreOffice Impress". At the same time Dolphin opens .pot files in Lokalize by default.

EXPECTED RESULT
A dialog is opened where a button says "Open with Lokalize".

SOFTWARE/OS VERSIONS
Операционная система: Fedora 30
Версия KDE Plasma: 5.15.5
Версия KDE Frameworks: 5.59.0
Версия Qt: 5.12.4
Версия ядра: 5.1.16-300.fc30.x86_64
Архитектура: 64-битная
Процессоры: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Память: 15,4 ГиБ ОЗУ

ADDITIONAL INFORMATION
Comment 1 Christophe Marin 2019-07-22 23:05:17 UTC
Nothing particularly wrong, org.kde.lokalize.desktop contains:

MimeType=application/x-xliff;text/x-gettext-translation;application/x-lokalize-project;

The mimetype for template files is x-gettext-translation-template.

iow, lokalize doesn't support template files, only .po ones.

Confirmed by looking for x-gettext-translation-template after running 'kcmshell5 filetypes'
Comment 2 Alexander Potashev 2019-07-22 23:10:31 UTC
(In reply to Christophe Giboudeaux from comment #1)
> Nothing particularly wrong, org.kde.lokalize.desktop contains:
> 
> MimeType=application/x-xliff;text/x-gettext-translation;application/x-
> lokalize-project;
> 
> The mimetype for template files is x-gettext-translation-template.
> 
> iow, lokalize doesn't support template files, only .po ones.
> 
> Confirmed by looking for x-gettext-translation-template after running
> 'kcmshell5 filetypes'

You need to add x-gettext-translation-template manually, see Step 1 in "STEPS TO REPRODUCE".
Comment 3 Christophe Marin 2019-07-22 23:11:21 UTC
No issue in KMail if I choose Open With, select lokalize and check "remember application association..." 

lokalize is added to the list of suitable applications for template files and KMail suggests this application afterwards.

In KMail settings, security tabs, then miscellaneous, I suggest clicking on the "re-enable all 'Do not ask again' warnings"
Comment 4 Alexander Potashev 2019-07-22 23:54:23 UTC
(In reply to Christophe Giboudeaux from comment #3)
> No issue in KMail if I choose Open With, select lokalize and check "remember
> application association..." 
> 
> lokalize is added to the list of suitable applications for template files
> and KMail suggests this application afterwards.

I did the same: clicked "Open With", checked "remember application association". However KMail keeps suggesting LibreOffice Impress, even after I restarted KMail.

Do you have LibreOffice Impress installed?
Comment 5 Christophe Marin 2019-07-23 05:33:51 UTC
Impress is installed, but is not in the list of applications supporting this mimetype (libreoffice writer appears).

Let's try something else, please paste the output of 'ktraderclient5 --mimetype text/x-gettext-translation-template'
Comment 6 Alexander Potashev 2019-07-23 06:07:50 UTC
Created attachment 121687 [details]
ktraderclient5 output
Comment 7 Christophe Marin 2019-07-23 06:52:13 UTC
Still nothing wrong.
Things you can try:

- Quit KMail, rename the ~/.cache folder, run kbuildsycoca5 --noincremental, retry

Another test:
- Quit KMail, rename ~/.config/kmail2rc, retry