#670 "% !TeX spellcheck = <unknown dict>" selects first dict instead of default one

None
closed
nobody
None
1
2014-12-23
2013-01-06
Denis Bitouzé
No

If a file contains:

% !TeX spellcheck = <unknown dict>

the selected dictionary is the first one whereas it should, IMHO, be the default one instead. Or, maybe better, a warning should be emitted (at least in 'Structure -> MAGIC_COMMENTS').

This may be tested with the following file:

% !TeX spellcheck = en_US

Discussion

  • Tim Hoffmann
    Tim Hoffmann
    2013-01-06

    Just as a comment (maybe fixing the above and below could be in one go):
    There's a general flaw in the design. Internally in LatexDocument, the language is handled as a QLocale. It would be better to handle it as QString because the current implementation does not allow to access dictionaries with names other than the language strings.

     
    Last edit: Tim Hoffmann 2013-01-08
  • Tim Hoffmann
    Tim Hoffmann
    2013-01-06

    • summary: 669 "% !TeX spellcheck = <unknown dict="">" selects first dict instead of default one --> "% !TeX spellcheck = <unknown dict="">" selects first dict instead of default one
    • milestone: -->
     
  • Tim Hoffmann
    Tim Hoffmann
    2013-01-08

    not reproducible here.

    Can you give more details?

     
    Last edit: Denis Bitouzé 2013-01-08
    • Denis Bitouzé
      Denis Bitouzé
      2013-01-08

      Create a document containing:

      % !TeX spellcheck = en_GB
      \documentclass{article}
      \begin{document}
      Test.
      \end{document}
      

      The dictionary status bar says "en_GB". So far, so good.

      Now, change in this file "en_GB" in "en_US" (for instance). Then, the dictionary status bar says "cs_CZ" (the first item, in alphabetic order, of the list of the dictionaries known by TXS).

       
  • Tim Hoffmann
    Tim Hoffmann
    2013-01-10

    fixed in rev. 3683

    n.b.: Now, nothing happens on invalid spellers. In the above example, the active speller remains en_GB. If you load a file with an invalid dictionary, the default one remains active.

    Warning will be added later.

     
  • Tim Hoffmann
    Tim Hoffmann
    2013-01-14

    • status: open --> closed