Summary: | Lokalize uses wrong language for spell checking | ||
---|---|---|---|
Product: | [Applications] lokalize | Reporter: | Karl Ove Hufthammer <karl> |
Component: | editor | Assignee: | Simon Depiets <sdepiets> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | adrian, sdepiets |
Priority: | NOR | ||
Version: | 2.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/sonnet/422fac8a6f927e1e8df291773b8eba934b00aa1d | Version Fixed In: |
Description
Karl Ove Hufthammer
2018-05-16 20:23:34 UTC
Please, check that on the system-level spellchecking settings you do not have the first option checked, which enables automatic language detection, and works awfully for Galician. I experienced the issue you are describing and it turned out that was the cause, and not Lokalize. (In reply to Adrián Chaves (Gallaecio) from comment #1) > Please, check that on the system-level spellchecking settings you do not > have the first option checked, which enables automatic language detection, > and works awfully for Galician. Thanks, Adrián. That did the trick! But I still think this is a bug though. Automatic language detection is useful for applications where the files don’t have language information (e.g. for Kate). But for applications like Lokalize, there should be a way to override to automatic language detection. I've tried to fix it by forcing the language (my lokalize is switching between various french dictionnaries and it is annoying indeed because you add exceptions and they are forgotten) but this is defined globally by Sonnet and not overridable (located in a private instance of Speller and loaded from global Settings). Sonnet/Highlighter.cpp line 339 https://api.kde.org/frameworks/sonnet/html/highlighter_8cpp_source.html const bool autodetectLanguage = d->spellchecker->testAttribute(Speller::AutoDetectLanguage); I've opened a ticket for Sonnet with a patch, feel free to support. https://phabricator.kde.org/D20935 Git commit 422fac8a6f927e1e8df291773b8eba934b00aa1d by Albert Astals Cid, on behalf of Simon Depiets. Committed on 03/05/2020 at 15:17. Pushed by aacid into branch 'master'. Allow overriding to disable auto language detection Summary: Currently, if language detection is enabled at Sonnet-wide level level, there is no way to disable it in a specific context. In Lokalize for instance, the language of the source and target strings are already known by the application. In that context, the language detection feature creates a lot of uncertainty in terms of spellchecking, as it may change quickly from one language to another or from one dictionnary to another within the same language. A user should not have to disable Sonnet-wide language detection to work around this, as it can be very useful elsewhere. https://bugs.kde.org/show_bug.cgi?id=394347 Reviewers: #frameworks, cullmann, mlaurent, mludwig Subscribers: aacid, mludwig, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D26342 M +25 -0 autotests/test_highlighter.cpp M +13 -1 src/core/backgroundchecker.cpp M +19 -0 src/core/backgroundchecker.h M +2 -0 src/core/backgroundchecker_p.h M +14 -1 src/ui/highlighter.cpp M +19 -0 src/ui/highlighter.h https://commits.kde.org/sonnet/422fac8a6f927e1e8df291773b8eba934b00aa1d |