Difference between revisions of "Troubleshoot Spellcheck"

From Gramps
Jump to: navigation, search
(Created page with "{{subst:Template:How_do_I}}")
 
m (Preferences)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages}}
+
<!--
{{man warn|1=&#x1F6A7; Work In Progress|2=This wikipage is an outline from a template being roughed in. Please don't edit '''''just yet'''''. Instead, contribute suggestions on the Discussion page. <br /><br />This page is not planned be linked to a public page until about 2 weeks after 27 June 2021. <br /><br />If this notice remains after that date, please feel welcome to remove this notice and consider the content 'fair game' for unlimited editing.}}
+
{{Languages|Troubleshoot_Spellcheck}}
== See also ==
+
 
*Feature documentation:[[Start_with_Genealogy|Start with Genealogy]]
+
languages bar disabled with commenting. Should not be enabled until there is at least 1 translation
 +
-->
 +
{{man warn|1=&#x1F6A7; Work In Progress|2=This wikipage is an outline... imported from a template and being roughed in. But it needs all the help it can get. '''To avoid stepping on other editor's work, edit a section rather than the entire page.'''<br /><br />Most of the Gramps discussion of Spellcheck is from a decade ago. So we need to find people who have personal knowledge to contribute. <br /><br />This page is not planned be linked to a public page until basic useful information is built out. (At which point, this notice will be removed.)}}
 +
from :
 +
[[Translating_the_Gramps_User_manual#Where_to_begin....3F|Translating the Gramps User manual - Where to begin...?]]
 +
 
 +
Gramps uses PyEnchant for Spellchecking and Grammar composition. A Dictionary is used for localized spellcheck within Note objects. The Affix file contains the rules to allow reports to compose sentences following grammatically correct plural and tense forms.
 +
 
 +
The Dictionary and Affix files are available from a variety of providers (such as aspell, ispell and myspell). Find the Dictionary and Affix files for your language and install the files in the right place for Gramps to use them. Translate the instructions.
 +
==Installing Dictionary and Affix files==
 +
 
 +
==Enabling and Disabling Spell and Grammar checking==
 +
=== Preferences ===
 +
 
 +
[[File:EditPreferences-General-tab-example-51.png|Right|thumb|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} General Preferences (Linux)]]
 +
 
 +
Select {{Man menu|Edit -> Preferences&hellip;}} to access the {{man label|General}} tab. This tab contains a {{man label|General Gramps Settings}} section with the option for enabling and disabling the Spellcheck for text in the [[Gramps_Glossary#note|Note]] objects.
 +
 
 +
*{{checkbox|0}}{{man label|Enable spelling checker}}: This checkbox option controls the enabling and disabling of the spelling checker for within the [[Gramps_{{man version}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#Editing_information_about_notes|Note editor]]. The '''gtkspell''' package must be loaded for this to have an effect.
 +
 
 +
 
 +
[[File:NewNote-editor-dialog-example-50.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} New Note - editor dialog - example]]
 +
 
 +
[[File:Gramps-notes.png|left]] [[File:Gtkspell working on gramps40.png]]
 +
 
 +
{{-}}
 +
 
 +
==Additional Languages==
 +
===Finding Alternate Language file providers===
 +
 +
==Selecting a preferred Language==
 +
===Setting a secondary Language===
 +
===Adding Custom Entries===
 +
 
 +
<hr />
 +
 
 +
=Reference Materials that can be used to write this article=
 +
 
 +
From [[Download]]:
 +
=== eMail Archive ===
 +
<pre>
 +
Date format:" is set to either European "little-endian" style DAY MONTH YEAR orders, the Parser interprets using the American style MONTH DAY YEAR order
 +
https://gramps-project.org/bugs/view.php?id=10747
 +
 
 +
 
 +
Language checking
 +
This article covers spell checking and grammar checking software.
 +
https://wiki.archlinux.org/title/Language_checking
 +
 
 +
 
 +
 
 +
0003826: Language detection in spelling does not work
 +
https://gramps-project.org/bugs/view.php?id=3826
 +
 
 +
0003866: Two "spell" entries
 +
https://gramps-project.org/bugs/view.php?id=3866
 +
 
 +
0003976: When enchant is NOT available, setting the environment to LANG=en_GB does not set spell checking to en_GB
 +
https://gramps-project.org/bugs/view.php?id=3976
 +
 
 +
0003977: Spell checking interface to gtk is flawed
 +
https://gramps-project.org/bugs/view.php?id=3977
 +
 
 +
0004302: Installs French Only
 +
http://gramps-project.org/bugs/view.php?id=4302
 +
 
 +
https://sourceforge.net/p/gramps/mailman/gramps-users/thread/CANUvGHdqKfVjqUBS1XXZXW_9RBdq_c06VQ4YGXtcAcYcQpxtuA%40mail.gmail.com/#msg35558222
 +
installer for 4.2.5 the translation files are
 +
optionals  (around 60 MB versus 80MB)
 +
 
 +
It is first "official" installer where languages and dictionaries are
 +
optional. Previously it was only in Gramps5-alpha builds.
 +
Installer size is a little smaller, size of installed app is 3x smaller.
 +
Size of all translations is 30MB and dictionaries 39MB when installed so
 +
users have option to install only those they need.
 +
 
 +
Gramps Debug is gone due to the change of tools with which it was
 +
created. Now gramps and grampsw are created with cx_freeze stubs.
 +
 
 +
 
 +
 
 +
 
 +
https://sourceforge.net/p/gramps/mailman/gramps-devel/thread/4DE25BDD.3000302%40pisoj.com/#msg27572370
 +
Re: [Gramps-devel] Spell checking in Windows for Gramps 3.3 (and 3.2.6)
 +
From: Josip <[email protected]> - 2011-05-28 22:34:46
 +
 
 +
On 28.05.2011 22:31, Peter Landgren wrote:
 +
> Hi Windows people,
 +
>
 +
> I have been trying to fix spell checking for Swedish (or any other language) in Gramps 3.3.
 +
> I started with Gramps 3.2.6 and got that OK.
 +
> See: http://www.gramps-project.org/bugs/view.php?id=3866
 +
>
 +
> I must add sv_SE.aff and se_SE.dic from the Open Office spell catalog
 +
> (C:\Program\OpenOffice.org 3\share\uno_packages\cache\uno_packages\32.tmp_\dict-sv.oxt\) to:
 +
> C:\Python26\Lib\site-packages\enchant\share\enchant\myspell>
 +
> in order to get Swedish spelling working.
 +
>
 +
 
 +
You need dictionary for yours language if you wont spell-check to work.
 +
It is explained on wiki.
 +
 
 +
  Peter Landgren <[email protected]> - 2011-05-29 09:34:30  Yes, I know, but the link to the Swedish dictionary ends in a non existent page.
 +
 
 +
> Note:
 +
> 1. enchant must be installed
 +
> 2. Aspell is NOT installed.
 +
>
 +
 
 +
OpenOffice uses myspell so aspell is not needed (although it can be used
 +
if you like to use aspell dicts)
 +
 
 +
 
 +
> Now I have spell checking working in both 3.2.6 and 3.3.0 for Windows XP.
 +
> Remains to test in Windows 7.
 +
>
 +
> Note. In 3.3.0 I had to fix Spell.py
 +
>
 +
 
 +
From: Benny Malengier <[email protected]> - 2011-05-29 11:02:14
 +
 
 +
We used pyenchant only to build a list of installed languages, but gramps
 +
spellcheck has always been 100% using gtkspell.
 +
I looked into replacing gtkspell with the pyenchant, and it would be less
 +
usable if we don't implement it by ourselves as gtkspell. (no red wiggle
 +
underline but instead you need to use a toolbar button which then lists
 +
words with problems)
 +
 
 +
We received a patch so as not to need python-enchant anymore for the list of
 +
languages. It works in ubuntu 10.04 -11-04 and Mac, so the old Turkish bug
 +
is gone at least a year.
 +
If we still need python-enchant for windows, it should come from the windows
 +
developers as a patch checking against windows to import it.
 +
 
 +
Benny
 +
 
 +
Vassilii Khachaturov
 +
 
 +
https://gramps-project.org/bugs/view.php?id=7097
 +
0007097: 3.2K note causes ~10s hang upon open on my system with spellcheck enabled
 +
 
 +
https://gramps-project.org/bugs/view.php?id=3348
 +
0003348: Gramps has 7x faster startup without Spell 
 +
</pre>
 +
=== Missing other languages ===
 +
[[File:Microsoft Window Gramps AIO Installer Choose Components-Selection-51.png|right|thumb|450px|Microsoft Window Gramps AIO Installer Choose Components-Selection window.]]
 +
The default Gramps AIO installer will embed the US dialect of English for the interface with the British spellcheck dictionary.
 +
 
 +
If you prefer a different language (or spell with the US or Australian dialects of English), please ensure that you pay special attention to the Choose Components phase of the installation.
 +
 
 +
To install a language other than English, select from both the '''Translations''' ''and'' '''Dictionaries''' during the Choose Components phase of the installation.
 +
 
 +
Even your primary language is installed by default, you might anticipate the need to spellcheck Notes in other than the British dialect of English. Be certain to select the appropriate languages from '''Dictionaries'''. Gramps will not access your Operating System's native dictionary.
 +
 
 +
There is no simple facility for adding interface or dictionary languages after installation.
 +
{{-}}
 +
 
 +
 
 +
{{man tip|Spell Checking:|Gramps uses a different spell checker than the one provided by Mac OS X, with different spelling dictionary requirements. We can't easily provide dictionaries for all of the supported languages in the bundle, but they're easily downloaded from [https://extensions.openoffice.org/ OpenOffice.org's website]. Download the language you want and save it, then navigate to the download in Finder. Most browsers have a downloads window that offers "Show in Finder" in its context menu. Change the file extension from <tt>oxt</tt> to <tt>zip</tt>, then from the context menu select '''Open with... Archive Utility''' to decompress it. In the decompressed folder or perhaps in a subfolder you'll find the dictionary files in pairs, <tt>foo.aff</tt> and <tt>foo.dic</tt>. Some languages have more than one pair with a README file to explain why. Select a pair and copy it to /Library/Dictionaries (you'll have to authenticate with an administrator id and password), and if 'foo' isn't already a language or locale code, make it one. For example, the French package includes several pairs with names like <tt>fr-moderne.aff</tt> and <tt>fr-moderne.dic</tt>. The spell checker doesn't recognize those names, so when you copy them to /Library/Dictionaries you must rename them to <tt>fr.aff</tt> and <tt>fr.dic</tt> or <tt>fr_FR.aff</tt> and <tt>fr_FR.dic</tt>. You can have more than one dictionary pair installed if you use several languages, but one '''must''' match the language you use for Gramps or spell checking won't be enabled at all.}}
  
*[[Gramps_Glossary#active_person|Active Person]] Gramps Glossary definition
 
  
*based on the [https://sourceforge.net/p/gramps/mailman/gramps-users/ Gramps-users] archived threads:
+
== See also ==
 +
* PyEnchant
 +
** [https://pypi.org/project/pyenchant/ Python Package Index (PyPI) repository Project description]
 +
** [https://pyenchant.github.io/pyenchant  PyEnchant 3.2.1 documentation - GitHub Pages]
 +
** [https://pyenchant.github.io/pyenchant/install.html Installation — PyEnchant 3.2.1 documentation - GitHub Pages]
 +
** ArchLinux [https://wiki.archlinux.org/title/Language_checking Language_checking] - article covers spell checking and grammar checking software.
 +
* [[GEPS_029:_GTK3-GObject_introspection_Conversion|GEPS 029]]: GTK3-GObject introspection Conversion - [[GEPS_029:_GTK3-GObject_introspection_Conversion#Spell_Check_Install|Spell Check Install]]
 +
* Discourse forum:
 +
** [https://gramps.discourse.group/t/how-do-i-change-the-grampsportable-windows-language/1523 How do I change the GrampsPortable (Windows) Language?]<br /> [https://nsis-dev.github.io/NSIS-Forums/html/t-318996.html installer scripting with NSIS - Nullsoft Scriptable Install System] <br />[https://portableapps.com/node/64251 Language selection & the standalone installer]
 +
** [https://gramps.discourse.group/t/dictionary-changes-not-saving/1499/16 Dictionary Changes not saving]
 +
*Feature documentation:[[Gramps_5.1_Wiki_Manual_-_Settings#General_Gramps_settings|Start with Genealogy]]
 +
*based on the [https://sourceforge.net/p/gramps/mailman/gramps-users/ Gramps-users] &amp; [https://sourceforge.net/p/gramps/mailman/gramps-devel/ Gramps-devel] archived threads:
 +
<!--
 
:[https://sourceforge.net/p/gramps/mailman/message/36617953/ The Group As name override]  
 
:[https://sourceforge.net/p/gramps/mailman/message/36617953/ The Group As name override]  
:[https://sourceforge.net/p/gramps/mailman/search/?q=%22unify+similar+surmanes+%3F%3F%22&mail_list=all unify similar surmanes &#91;sic&#93; thread]
+
-->
:[https://sourceforge.net/p/gramps/mailman/search/?q=%22Group+As+name%22 threads with "Group As name"]
+
:Search mail archive for [https://sourceforge.net/p/gramps/mailman/search/?q=spellcheck Spellcheck threads]  
 +
:Search mail archive for [https://sourceforge.net/p/gramps/mailman/search/?q=pyenchant PyEnchant threads]
 +
* Bug {{bug|7097}}: 3.2K note causes ~10s hang upon open on my system with spellcheck enabled
 +
* [[Howto:Change_the_language_of_reports|Howto:Change the language of reports]]
 +
* [[Report-writing_tutorial#Using_ReportOptions|Composing report text that is numerically aware]]
  
 
+
{{DEFAULTSORT:How do I...troubleshoot SpellCheck|noreplace}}
{{DEFAULTSORT:How do I...new category location|noreplace}}
 
 
[[Category:Tutorial]]
 
[[Category:Tutorial]]
[[Category:WikiContributors]]
 
 
[[Category:How do I...]]
 
[[Category:How do I...]]
  
 
+
<!--
 
<div style="background:lightcyan">
 
<div style="background:lightcyan">
  
Line 148: Line 319:
 
{{man note|Example Note |Notes text.}}
 
{{man note|Example Note |Notes text.}}
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 +
 +
-->

Latest revision as of 03:14, 28 June 2021

Gnome-important.png
🚧 Work In Progress

This wikipage is an outline... imported from a template and being roughed in. But it needs all the help it can get. To avoid stepping on other editor's work, edit a section rather than the entire page.

Most of the Gramps discussion of Spellcheck is from a decade ago. So we need to find people who have personal knowledge to contribute.

This page is not planned be linked to a public page until basic useful information is built out. (At which point, this notice will be removed.)

from : Translating the Gramps User manual - Where to begin...?

Gramps uses PyEnchant for Spellchecking and Grammar composition. A Dictionary is used for localized spellcheck within Note objects. The Affix file contains the rules to allow reports to compose sentences following grammatically correct plural and tense forms.

The Dictionary and Affix files are available from a variety of providers (such as aspell, ispell and myspell). Find the Dictionary and Affix files for your language and install the files in the right place for Gramps to use them. Translate the instructions.

Installing Dictionary and Affix files

Enabling and Disabling Spell and Grammar checking

Preferences

Fig. .1 General Preferences (Linux)

Select Edit -> Preferences… to access the General tab. This tab contains a General Gramps Settings section with the option for enabling and disabling the Spellcheck for text in the Note objects.

  • Enable spelling checker: This checkbox option controls the enabling and disabling of the spelling checker for within the Note editor. The gtkspell package must be loaded for this to have an effect.


Fig. .2 New Note - editor dialog - example
Gramps-notes.png

Gtkspell working on gramps40.png


Additional Languages

Finding Alternate Language file providers

Selecting a preferred Language

Setting a secondary Language

Adding Custom Entries


Reference Materials that can be used to write this article

From Download:

eMail Archive

Date format:" is set to either European "little-endian" style DAY MONTH YEAR orders, the Parser interprets using the American style MONTH DAY YEAR order
https://gramps-project.org/bugs/view.php?id=10747


Language checking
This article covers spell checking and grammar checking software. 
https://wiki.archlinux.org/title/Language_checking



0003826: Language detection in spelling does not work 
https://gramps-project.org/bugs/view.php?id=3826

0003866: Two "spell" entries
https://gramps-project.org/bugs/view.php?id=3866

0003976: When enchant is NOT available, setting the environment to LANG=en_GB does not set spell checking to en_GB
https://gramps-project.org/bugs/view.php?id=3976

0003977: Spell checking interface to gtk is flawed 
https://gramps-project.org/bugs/view.php?id=3977

0004302: Installs French Only
http://gramps-project.org/bugs/view.php?id=4302

https://sourceforge.net/p/gramps/mailman/gramps-users/thread/CANUvGHdqKfVjqUBS1XXZXW_9RBdq_c06VQ4YGXtcAcYcQpxtuA%40mail.gmail.com/#msg35558222
installer for 4.2.5 the translation files are
optionals  (around 60 MB versus 80MB)

It is first "official" installer where languages and dictionaries are 
optional. Previously it was only in Gramps5-alpha builds.
Installer size is a little smaller, size of installed app is 3x smaller.
Size of all translations is 30MB and dictionaries 39MB when installed so 
users have option to install only those they need.

Gramps Debug is gone due to the change of tools with which it was 
created. Now gramps and grampsw are created with cx_freeze stubs.




https://sourceforge.net/p/gramps/mailman/gramps-devel/thread/4DE25BDD.3000302%40pisoj.com/#msg27572370
Re: [Gramps-devel] Spell checking in Windows for Gramps 3.3 (and 3.2.6)
From: Josip <[email protected]> - 2011-05-28 22:34:46

On 28.05.2011 22:31, Peter Landgren wrote:
> Hi Windows people,
>
> I have been trying to fix spell checking for Swedish (or any other language) in Gramps 3.3.
> I started with Gramps 3.2.6 and got that OK.
> See: http://www.gramps-project.org/bugs/view.php?id=3866
>
> I must add sv_SE.aff and se_SE.dic from the Open Office spell catalog
> (C:\Program\OpenOffice.org 3\share\uno_packages\cache\uno_packages\32.tmp_\dict-sv.oxt\) to:
> C:\Python26\Lib\site-packages\enchant\share\enchant\myspell>
> in order to get Swedish spelling working.
>

You need dictionary for yours language if you wont spell-check to work. 
It is explained on wiki.

   Peter Landgren <[email protected]> - 2011-05-29 09:34:30  Yes, I know, but the link to the Swedish dictionary ends in a non existent page. 

> Note:
> 1. enchant must be installed
> 2. Aspell is NOT installed.
>

OpenOffice uses myspell so aspell is not needed (although it can be used 
if you like to use aspell dicts)


> Now I have spell checking working in both 3.2.6 and 3.3.0 for Windows XP.
> Remains to test in Windows 7.
>
> Note. In 3.3.0 I had to fix Spell.py
>

From: Benny Malengier <[email protected]> - 2011-05-29 11:02:14

We used pyenchant only to build a list of installed languages, but gramps
spellcheck has always been 100% using gtkspell.
I looked into replacing gtkspell with the pyenchant, and it would be less
usable if we don't implement it by ourselves as gtkspell. (no red wiggle
underline but instead you need to use a toolbar button which then lists
words with problems)

We received a patch so as not to need python-enchant anymore for the list of
languages. It works in ubuntu 10.04 -11-04 and Mac, so the old Turkish bug
is gone at least a year.
If we still need python-enchant for windows, it should come from the windows
developers as a patch checking against windows to import it.

Benny

Vassilii Khachaturov

https://gramps-project.org/bugs/view.php?id=7097
0007097: 3.2K note causes ~10s hang upon open on my system with spellcheck enabled

https://gramps-project.org/bugs/view.php?id=3348		
0003348:	Gramps has 7x faster startup without Spell  

Missing other languages

Microsoft Window Gramps AIO Installer Choose Components-Selection window.

The default Gramps AIO installer will embed the US dialect of English for the interface with the British spellcheck dictionary.

If you prefer a different language (or spell with the US or Australian dialects of English), please ensure that you pay special attention to the Choose Components phase of the installation.

To install a language other than English, select from both the Translations and Dictionaries during the Choose Components phase of the installation.

Even your primary language is installed by default, you might anticipate the need to spellcheck Notes in other than the British dialect of English. Be certain to select the appropriate languages from Dictionaries. Gramps will not access your Operating System's native dictionary.

There is no simple facility for adding interface or dictionary languages after installation.


Tango-Dialog-information.png
Spell Checking:

Gramps uses a different spell checker than the one provided by Mac OS X, with different spelling dictionary requirements. We can't easily provide dictionaries for all of the supported languages in the bundle, but they're easily downloaded from OpenOffice.org's website. Download the language you want and save it, then navigate to the download in Finder. Most browsers have a downloads window that offers "Show in Finder" in its context menu. Change the file extension from oxt to zip, then from the context menu select Open with... Archive Utility to decompress it. In the decompressed folder or perhaps in a subfolder you'll find the dictionary files in pairs, foo.aff and foo.dic. Some languages have more than one pair with a README file to explain why. Select a pair and copy it to /Library/Dictionaries (you'll have to authenticate with an administrator id and password), and if 'foo' isn't already a language or locale code, make it one. For example, the French package includes several pairs with names like fr-moderne.aff and fr-moderne.dic. The spell checker doesn't recognize those names, so when you copy them to /Library/Dictionaries you must rename them to fr.aff and fr.dic or fr_FR.aff and fr_FR.dic. You can have more than one dictionary pair installed if you use several languages, but one must match the language you use for Gramps or spell checking won't be enabled at all.


See also

Search mail archive for Spellcheck threads
Search mail archive for PyEnchant threads