[Scribus] Spell checking

avox avox
Mon May 21 03:40:16 CEST 2007

Gora Mohanty-3 wrote:
> Hi,
>   I have a first-cut version of the spell-checking plugin which seems to
> be working. I need to add a mechanism to get text from Scribus, and run
> it through the spell-checker. Petr has pointed me to the shortwords
> plugin, and I will try to work that in over the next couple of days.
> On Sat, 2007-05-19 at 09:46 -0400, Louis Desjardins wrote:
>> 2007/5/18, avox <avox at arcor.de>:
> [...]
>>         In 1.3.4 there is a charstyle property "language()" which
>>         should be used for 
>>         spellchecking, hyphenation and shortwords.
> OK. I will look at it. There are essentially two things that need
> to be solved for choosing an appropriate default for the user in
> need of spell-checking, the first being the language that she
> would use, and the second the character encoding that the words
> would be entered in. From where things stand, it should be possible
> to accommodate both, but I think that the first version of the
> plugin will assume Unicode (UTF-8) for the character encoding. Are
> there any issues, other than efficiency, with this?

Scribus uses only Unicode internally. QStrings are UTF-16, but it's also
easy to get a zero-terminated UTF-8 string.

>> As an additionnal note, I think the default language for spellchecking
>> should be the GUI language of the app.

I dont support this.

> I will need more information about this. Is this information
> available somewhere, e.g., as some Scribus preference setting.

In Scribus the information flows from Document language -> Default CharStyle
language -> Text language
It's best to use the locally marked language all the time.

>>  On top of that, once the char style are fully implemeted, the
>> spellchecking could then by tributary to the language selected for a
>> particular stylesheet.  Could this be done on the fly through an
>> entire document where many languages would be used and each would be
>> spellchecked with the appropriate dictionary?
> This is possible, but I am not so convinced about its utility. The
> current version of the plugin has a settings tab that can be used to
> select a different aspell dictionary (loosely speaking, different
> language, but one language might have multiple dictionaries). Does
> that suffice?

We should use some standard language/country codes, then the user can
attach any dictionary to a given code.

>>  Also, user has to make a language choice when a text is not set using
>> stylesheets. This then calls for a dialog displaying the language it
>> is set to and the ability to change it from within that dialog. 

If not otherwise set, the text will use the language of the default
So every character/word* has a language attribute.

So, should there be an "unknown" language, so that any words tagged with
"unknown" are either ignored or checked against a user specified dictionary?


*) This technically allows to have different languages in the same word. The
spellchecker should probably just check the first char of a word and assume 
that language for the whole word -- it's probably easier to put
words in an exception dictionary than require that the user marks up *parts*
of the word with the correct language.
View this message in context: http://www.nabble.com/Re%3A-Spell-checking-tf3716182.html#a10712095
Sent from the Scribus mailing list archive at Nabble.com.

More information about the scribus mailing list