HOWTO: Convert a contemporary Mozilla dictionary for use with Pale Moon

General discussion and chat (archived)
Locked
User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2542
Joined: 2015-12-09, 15:45

HOWTO: Convert a contemporary Mozilla dictionary for use with Pale Moon

Post by moonbat » 2020-07-19, 15:30

Caveat emptor - These instructions are for your own personal use only.

Also understand the terminology and be sure you download a dictionary only -
Dictionary - Like its namesake, a list of words used for spellchecking when you type anywhere on a webpage.
Language pack - Changes the language used by the browser - so that the menu options, dialogs, button captions and preferences pages will display in that language.
  • Install Firefox, find your desired dictionary (which is different from a language pack) here, and install it in Firefox.
  • Click on Help-Troubleshooting information, and on the page that opens, find the entry marked 'Profile directory' and click the 'open directory' button next to it.
  • Close Firefox and switch to the file explorer window that should have your Firefox profile directory open in it. Select the 'extensions' subfolder and open it.
  • From the list of extensions shown here, look for one with a name like tr-fix@dictionaries.addons.mozilla.org.xpi. If the name has dictionaries in it, chances are that's the file you want.
  • Copy this file to another location (preferably an empty directory, let's call it 'dict') and open it with a zip program. 7-zip or Winzip or whatever on your platform. A .XPI file is nothing but a .zip file with a different extension.
  • From within this file, you should see a directory called 'dictionaries'. Extract this directory to your working directory.
  • Create a file called install.rdf in your working directory and use this template to fill it -

    Code: Select all

    <?xml version="1.0"?>
    <!-- This Source Code is subject to the terms of the Mozilla Public License
       - version 2.0 (the "License"). You can obtain a copy of the License at
       - http://mozilla.org/MPL/2.0/. -->
    <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:em="http://www.mozilla.org/2004/em-rdf#">
      <Description about="urn:mozilla:install-manifest"
                   em:id="tr-TR@dictionaries.thereisonlyxul.org"
                   em:version="1.0.0"
                   em:name="Turkish dictionary"
                   em:license="GPL-2.0"
                   em:type="64"
                   em:unpack="true">
    				<em:targetApplication>
    						<Description name="Pale Moon"
    								em:id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}"
    								em:minVersion="28.0"
    								em:maxVersion="29.*"/>
    				</em:targetApplication>
      </Description>
    </RDF>
  • Change the id and name to match the language you are using. For example, tr-TR in this example is for Turkish, for German it would be de-DE, French fr-FR and so on.
  • Now create a fresh zip file called dictionary.zip out of the contents of your working directory. Do not zip the working directory itself. The zip file is correct if and only if at the top level it contains just two elements - the dictionaries subfolder and the install.rdf file.
  • Change the extension to xpi, so that dictionary.zip becomes dictionary.xpi.
  • Open Pale Moon's addons page, click the button to the left of the 'search all addons' textbox, select 'Install addon from file' and install the dictionary.
  • That's it - your dictionary will now be listed under 'Dictionaries' on the addons page.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8546
Joined: 2012-10-09, 19:37
Location: Skaro

Re: HOWTO: Convert a contemporary Mozilla dictionary for use with Pale Moon

Post by New Tobin Paradigm » 2020-07-19, 16:11

This only assumes that the format used for dictionaries doesn't eventually change due to different lib or different version of lib. That is why I specifically used the versions targeted for us.

I wish people would think things through before going ahead and instructing people who have no intention on doing anything but for them selves in unsupported ways.
return NS_OK;
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 28806
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: HOWTO: Convert a contemporary Mozilla dictionary for use with Pale Moon

Post by Moonchild » 2020-07-19, 22:00

Just no. Moving this to archived stuff because it's just bad advice.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Locked