Bug 406680 - LanguageTools: kmail restart loses configuration of local server address in favor of default remote
Summary: LanguageTools: kmail restart loses configuration of local server address in f...
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messagecomposer (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-19 13:54 UTC by avlas
Modified: 2019-05-20 05:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2019-04-19 13:54:06 UTC
I've download and set up a local server for LanguageTools to test this new functionality (which is very cool, btw).

This works fine, but Kmail setting about the location of the server is lost after quitting in favor of the default remote one.

Also, it seems I cannot set English (US) instead of English. When I do, the change reverts itself.
Comment 1 avlas 2019-04-19 14:10:30 UTC
It seems LanguageTools settings are not stored in kontactrc. This is the only thing I see:

[LanguageToolConfigDialog]
Size=500,300


In the meantime, to work around this, how should I manually add the LanguageTools server and language setting to kontactrc?

By the way, having the possibility to easily change the LanguageTools language setting in composer would be great as many users write emails in 2+ languages :)
Comment 2 avlas 2019-04-19 14:26:30 UTC
(In reply to avlas from comment #1)

> In the meantime, to work around this, how should I manually add the
> LanguageTools server and language setting to kontactrc?


Tried to figure it out checking kontactrc, but couldn't find the way.

But I did find a typo in Markdown settings that appear in the [Mardown] section (note the missing 'k')
Comment 3 Laurent Montel 2019-04-19 18:33:01 UTC
> But I did find a typo in Markdown settings that appear in the [Mardown]
> section (note the missing 'k')

Indeed but it's not a problem as all code use Mardown.
I will fix it soon
Comment 4 Laurent Montel 2019-04-19 18:33:26 UTC
(In reply to avlas from comment #0)
> I've download and set up a local server for LanguageTools to test this new
> functionality (which is very cool, btw).
> 
> This works fine, but Kmail setting about the location of the server is lost
> after quitting in favor of the default remote one.
> 
> Also, it seems I cannot set English (US) instead of English. When I do, the
> change reverts itself.


Indeed It seems that there is a bug.
Comment 5 Laurent Montel 2019-04-19 18:34:01 UTC
> By the way, having the possibility to easily change the LanguageTools
> language setting in composer would be great as many users write emails in 2+
> languages :)

Ok it seems a good idea.
I will look at how to implement it
Comment 6 Laurent Montel 2019-04-19 18:44:23 UTC
Git commit 5f46365914929620906d3ed565fe058bc71f6c7e by Laurent Montel.
Committed on 19/04/2019 at 18:43.
Pushed by mlaurent into branch 'master'.

Fix markdown group config

M  +2    -2    kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp
M  +1    -1    kmail/editorconvertertextplugins/markdown/markdowninterface.cpp
M  +1    -0    kmail/grammarplugins/languagetool/CMakeLists.txt
A  +14   -0    kmail/grammarplugins/languagetool/kconf_update/languagetool_kmail.upd

https://commits.kde.org/kdepim-addons/5f46365914929620906d3ed565fe058bc71f6c7e
Comment 7 Laurent Montel 2019-04-20 07:56:47 UTC
Git commit 7ee05c910ee2bea9bc33d51e8915a4aa1934849c by Laurent Montel.
Committed on 20/04/2019 at 07:55.
Pushed by mlaurent into branch 'Applications/19.04'.

Fix Bug 406680 - LanguageTools: kmail restart loses configuration of local server address in favor of default remote

FIXED-IN: 5.11.1

M  +1    -0    kmail/grammarplugins/languagetool/src/languagetoolconfigwidget.cpp

https://commits.kde.org/kdepim-addons/7ee05c910ee2bea9bc33d51e8915a4aa1934849c
Comment 8 avlas 2019-04-20 13:28:08 UTC
Excellent!

Is it easy for you to show how that settings section looks like in kontactrc/kmail2rc settings? That would be a workaround until the fix is released.

> > By the way, having the possibility to easily change the LanguageTools
> > language setting in composer would be great as many users write emails > > in 2+ languages :)
>
>
> Ok it seems a good idea.
> I will look at how to implement it

If possible, a nice way to implement this could be setting the language of LanguageTools in sync with composer's dictionary (this would apply to those languages that are available in both addons, while the rest would just use default, i.e. English, I guess).

This way the UI would not change and the "magic" would happen under the hood. Not sure how hard this may be to implement though.
Comment 9 Laurent Montel 2019-04-20 19:37:40 UTC
[LanguageTool]
language=en
languagetoolpath=https://languagetool.org/api/v2
Comment 10 Laurent Montel 2019-04-20 19:39:01 UTC
> If possible, a nice way to implement this could be setting the language of
> LanguageTools in sync with composer's dictionary (this would apply to those
> languages that are available in both addons, while the rest would just use
> default, i.e. English, I guess).
> 
> This way the UI would not change and the "magic" would happen under the
> hood. Not sure how hard this may be to implement though.

The problem is that we don't have the same settings between composer dictionary and languagetools...
I can try to create a map but not sure that it will easy.
I will investigate it
Comment 11 avlas 2019-04-20 20:06:46 UTC
(In reply to Laurent Montel from comment #9)
> [LanguageTool]
> language=en
> languagetoolpath=https://languagetool.org/api/v2

Thanks!
Comment 12 avlas 2019-04-20 20:07:09 UTC
(In reply to Laurent Montel from comment #10)
> > If possible, a nice way to implement this could be setting the language of
> > LanguageTools in sync with composer's dictionary (this would apply to those
> > languages that are available in both addons, while the rest would just use
> > default, i.e. English, I guess).
> > 
> > This way the UI would not change and the "magic" would happen under the
> > hood. Not sure how hard this may be to implement though.
> 
> The problem is that we don't have the same settings between composer
> dictionary and languagetools...
> I can try to create a map but not sure that it will easy.
> I will investigate it

+1
Comment 13 avlas 2019-04-20 20:19:34 UTC
(In reply to Laurent Montel from comment #9)
> [LanguageTool]
> language=en
> languagetoolpath=https://languagetool.org/api/v2

It seems I also need to manually add the bool for enabling the local path. Could you please let me know how to add that setting?
Comment 14 Laurent Montel 2019-04-21 08:03:05 UTC
Git commit 0b266d79433553a8fffd3c8ae0db43840397174d by Laurent Montel.
Committed on 21/04/2019 at 08:02.
Pushed by mlaurent into branch 'Applications/19.04'.

Add missing uselocalinstance settings

M  +2    -0    kmail/grammarplugins/languagetool/src/languagetoolmanager.cpp

https://commits.kde.org/kdepim-addons/0b266d79433553a8fffd3c8ae0db43840397174d
Comment 15 Laurent Montel 2019-04-21 08:04:26 UTC
(In reply to avlas from comment #13)
> (In reply to Laurent Montel from comment #9)
> > [LanguageTool]
> > language=en
> > languagetoolpath=https://languagetool.org/api/v2
> 
> It seems I also need to manually add the bool for enabling the local path.
> Could you please let me know how to add that setting?

Indeed but code was missing...
Ok you can't use locale instance until 19.04.1 ;(
Sorry.
Comment 16 avlas 2019-04-21 12:58:49 UTC
(In reply to Laurent Montel from comment #15)
> (In reply to avlas from comment #13)
> Ok you can't use locale instance until 19.04.1 ;(
> Sorry.

No big deal, 19.04.1 it's behind the corner :)

It's great to see all these nice addons in Kmail, very much appreciated!
Comment 17 Laurent Montel 2019-05-20 05:55:56 UTC
Git commit fbcc93078bdb8c9ad4e130b27ca8f995f2ae996b by Laurent Montel.
Committed on 20/05/2019 at 05:54.
Pushed by mlaurent into branch 'master'.

Allow to select "languagetool" language.

M  +1    -1    kmail/grammarplugins/languagetool/src/languagetoolresultwidget.cpp

https://commits.kde.org/kdepim-addons/fbcc93078bdb8c9ad4e130b27ca8f995f2ae996b