Hi all!
I’ve enabled the spell check option in the tryton client (Form->Spell checking) but I’m still not getting spell check on the text fields. Should I do anything else to configure this option?
Best regards!
Hi all!
I’ve enabled the spell check option in the tryton client (Form->Spell checking) but I’m still not getting spell check on the text fields. Should I do anything else to configure this option?
Best regards!
You must be sure to have gtkspell installed.
And you must test on field with spell
attribute (we must document this attribute).
By the way if you are using bundled client, we do not embed gtkspell for now. I’m checking to include them.
Thank you!!!
I’ve installed gtkspell:
sudo apt install python3-gtkspellcheck
I’ve tried out with some text fields with a similar output (no spell checking)
I’ve searched the attribute spell inside source code of tryton and I cannot find any sample of usage.
Could please tell how can I add to a field.Text()
the attribute spell?
Thanks in advance!
It is used on comment
of sale and purchase. It is an XML attribute that must have a PYSON
statement that evaluate to language code.
Thank you again!
@classmethod
def view_attributes(cls):
attributes = [
('/form//field[@name="comment"]', 'spell', Eval('party_lang'))]
if Transaction().context.get('modify_header'):
attributes.extend([
('//group[@id="states"]', 'states', {'invisible': True}),
('//group[@id="amount_buttons"]',
'states', {'invisible': True}),
('//page[@name="invoices"]',
'states', {'invisible': True}),
('//page[@name="shipments"]',
'states', {'invisible': True}),
])
return attributes
But honestly it’s a way too far from my current tryton knowledge… Could you help me with this? I’ve thought that I had to add directly some attribute to my fields. Maybe it’s something I should let for the moment…
Best!
I guess it is because you do not have the spell dictionary for the language.
If you launch tryton with -l DEBUG
you should get an error message if it can not activate a language.