hg diff Bug 1695756 - Import the 'Adding a new word to the en-US dictionary' doc r=firefox-source-docs-reviewers,flod,championshuttler DONTBUILD
authorSylvestre Ledru <sledru@mozilla.com>
Tue, 02 Mar 2021 13:25:44 +0000
changeset 569312 e6a6aac8b3ede67438867f8accc2759d9f89b190
parent 569311 2dc2909262886706f96e123956d421c604199dee
child 569313 ed65070d30fb3e5abce3ad51bbc262c74eca91f1
push id137524
push usersledru@mozilla.com
push dateTue, 02 Mar 2021 13:56:40 +0000
treeherderautoland@e6a6aac8b3ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-source-docs-reviewers, flod, championshuttler
bugs1695756
milestone88.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
hg diff Bug 1695756 - Import the 'Adding a new word to the en-US dictionary' doc r=firefox-source-docs-reviewers,flod,championshuttler DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D106830
docs/contributing/contribution_quickref.rst
extensions/spellcheck/docs/index.rst
extensions/spellcheck/moz.build
toolkit/docs/index.rst
--- a/docs/contributing/contribution_quickref.rst
+++ b/docs/contributing/contribution_quickref.rst
@@ -79,16 +79,17 @@ This will take a while; a few minutes to
 To run it:
 
 .. code-block:: shell
 
      $ ./mach run
 
 :ref:`More information about Linux <Building Firefox On Linux>` / :ref:`More information about MacOS <Building Firefox On MacOS>`
 
+.. _write_a_patch:
 
 To write a patch
 ----------------
 
 Make the changes you need in the codebase. You can look up UI text in `Searchfox <https://searchfox.org>`__ to find the right file.
 
 Then:
 
new file mode 100644
--- /dev/null
+++ b/extensions/spellcheck/docs/index.rst
@@ -0,0 +1,28 @@
+Adding new words to the en-US dictionary
+========================================
+
+Occasionally bugs are filed pointing out situations where perfectly
+legitimate words are missing from the English spell check dictionary in
+Firefox. This article describes the process for adding a word to the
+dictionary.
+
+The process is pretty straight-forward:
+
+#. Get a clone of mozilla-central (see :ref:`Firefox Contributors' Quick Reference`), if
+   you don't already have one, and make sure you can build it
+   successfully.
+#. Get into the dictionary sources directory using this command:
+   ``cd extensions/spellcheck/locales/en-US/hunspell/dictionary-sources``
+#. There's a special script used for editing dictionaries. The script
+   only works if you have the environment variable ``EDITOR`` set to the
+   executable of an editor program; if you don't have it set, you can use
+   ``EDITOR=vim sh edit-dictionary`` to edit using vim (or you can
+   substitute some other editor), or you can just type
+   ``sh edit-dictionary`` if you have an ``EDITOR`` already specified.
+#. Add and remove words in the dictionary file, then quit the editor.
+#. Use ``sh merge-dictionaries`` to process the dictionary changes you've
+   made.
+#. Move the revised dictionary file into position: ``mv en-US.dic ..``
+#. Build Firefox and test your updated dictionary. Once you're
+   satisfied, use the process described in :ref:`write_a_patch` to create a
+   patch.
--- a/extensions/spellcheck/moz.build
+++ b/extensions/spellcheck/moz.build
@@ -8,10 +8,12 @@ DIRS += ["idl", "hunspell", "src"]
 
 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
     # GeckoView disables hunspell spellchecker.
     DIRS += ["locales"]
 
 MOCHITEST_CHROME_MANIFESTS += ["tests/chrome/chrome.ini"]
 MOCHITEST_MANIFESTS += ["tests/mochitest/mochitest.ini"]
 
+SPHINX_TREES["/extensions/spellcheck"] = "docs"
+
 with Files("**"):
     BUG_COMPONENT = ("Core", "Spelling checker")
--- a/toolkit/docs/index.rst
+++ b/toolkit/docs/index.rst
@@ -20,8 +20,9 @@ This is the nascent documentation of the
    components/prompts/prompts/index
    modules/subprocess/toolkit_modules/subprocess/index
    components/telemetry/index
    components/glean/index
    modules/toolkit_modules/index
    content/toolkit_widgets/index
    components/url-classifier/url-classifier/index
    components/extensions/webextensions/index
+   /extensions/spellcheck/index