Make it possible to set the language per contact (persistent) instead of per chat tab.
This should only apply to 1:1 chats, but not to group chats.
See also the following IRC log for some discussion details:
<alin> drf__: you remember sometime ago d_ed martin helped to get my idea about tab based spelling in...
<alin> drf__: now what do you think about extending this to something like a setting for the contact... we can have some property in the contact model... with the language which we shall use for spelling for each contact
<alin> is this difficult to implement?
<eliasp> alin: good idea, as currently I'm using multiple languages within a single account and simply setting a language for a contact would be way better
<alin_> eliasp: by the way at the moment you can set the spelling language for each tab
<eliasp> alin_: yes, I know... but it isn't sticky, isn't it?
<alin_> eliasp: of course this will not work for group chats...
<alin_> eliasp: but to be sincere I did not manage to start a group chat yet
<eliasp> alin_: sure, group chats need to stay as it currently is
<eliasp> alin_: the question is just: to which component does this wish go? common-internals? where does the contacts model reside?
<alin_> eliasp: text-ui
<alin_> eliasp: this is where the user sees it
<eliasp> alin_: ok
<alin_> eliasp: the implementation we still have to decide it...
<alin_> eliasp: I do not know exactly what data is stored in these models we may already have this field
<alin_> drdanz: do you know the model for a contact?
Reproducible: Didn't try
See initial description
This should be fairly easy and does not really involve models.
You can just save the dict-contact pair into config file and simply load it and set it while opening chats.
That should do the trick for now, but it would be really interesting to support this in the ontology and have an accessor method on the aggregation library...
I'm wondering what happened to the automatic language detection in the Sonnet library? If I remember this was nearly finished ~5 years ago or so and it looked really good, but then Jacob Rideout suddenly disappeared.
With language detection, all this wouldn't be needed anymore, correct?
*** Bug 303649 has been marked as a duplicate of this bug. ***
@Elias - tbh, I have no clue. I also have a feeling that several languages in one message could easily confuse it (for example czech language uses quite some words from english, german, polish or slovak..furthermore consider all slavic languages, which are very similar).
However I still maintain the statement that his is easy to do, I'll even mark it as JJ. Maybe I'll get around doing it myself ;)
To avoid confusion there can be one or more algorithms:
One possible approach:
if you detect a word that can be in different languages, you could parse and check the language of other words in the same sentence to find out.
You have the word "Bravo". This word might be considered as English, Italian or German, or part of even more languages.
You could check other words in the sentence:
f.e: "Bravo, you are smart"- language detection:English
If there are not any other words, you make detection based on previous possible language detections.
If this is the first message, you spellcheck in English.
Of course, this is just an idea.
I'm happy to review any patches doing this (though I believe the proper place for this is Sonnet), but please start any further discussion about auto-spellcheck-language detection in a new, separate bug. Thanks.
Ok Martin, there can be a big discussion about auto spell-checking after all!!
As about this specific bug here,I am working on this right now, trying to fix it.
The code for this one is ready.I will send it for review probably today or tomorrow.
I am saving the pair <targetId,option> to avoid that two contacts have the same name.
Code is now sent for review (in git reviewboard).
Does this solution store the spell checking in the contact so that this could be used for determining the spell checking language in Kmail too? Would be cool, if the solution for telepathy contacts could also solve this for Kmail.
Not really, no. KMail can load it up though, but at the moment there doesn't exist any connection between KMail's contacts and Telepathy contacts. There will be however in the future. But that's for another bug report (against not-yet existing component ;)
Actually before we can do anything, it should be supported by PIMO/Shared Desktop Ontology. So the component already exists ;)
I opened a ticket upstream: https://sourceforge.net/apps/trac/oscaf/ticket/142
> Git commit 0e7a48a466f93e3e1732b10e136fc044eecec201 by David Edmundson, on behalf of Nick Lou.
> Committed on 28/09/2012 at 01:20.
> Pushed by davidedmundson into branch 'master'.
> Save and restore spell check language used.
> Save and restore the spell check language for a particular contact if different to the system default
> REVIEW: 106575
> M +33 -2 lib/chat-widget.cpp
> M +6 -0 lib/chat-widget.h
I made a proposal here , but we need to decide whether we need what we want to achieve before closing this bug, so I'm reopening it
Method 1: The user sets the language manually and we store it in Nepomuk so that we can use it in ktp and in kmail
Method 2: We use an automatic detection of the language (I believe that Sonnet can do that already) and we don't store it. I think that Kopete used this approach.
Method 3: We use an automatic detection of the language and store it in Nepomuk anyway so that the next time we start with the right language (possibly). We can combine this with the dropdown menu to choose the language manually.
Methods 1 and 3 require extra stuff in the ontology therefore we need to discuss the required changes upstream (see ).
What do you think?
Can we not reopen bug reports to discuss new things, it breaks the changelogs.
Thanks for chasing this up, please open a new bug on kpeople instead
(FYI, auto detection of language was something promised, but never materialised)
Some news about Sonnet's language detection --> http://lists.kde.org/?l=kde-core-devel&m=138808061808894&w=2